Skip to main content
Each example makes read-only calls, so it is safe to run against any account. They use an API key from an environment variable; an OAuth access token works the same way in the Authorization header. For browser sign-in instead, use Connect in five minutes.
There is no Semicola client SDK package yet. These starters use the official MCP SDKs and plain HTTP.

curl: MCP

The MCP endpoint serves stateless Streamable HTTP requests, so without a session each call is one POST with a JSON-RPC body. (SDK clients that initialize get a session instead; see MCP client setup.)
The answer’s result.structuredContent names the active account, your role, readiness and next actions. List the tools your account can call:
Search for existing records before creating anything:
Calls from a browser carry an Origin header and are refused unless that origin is registered under Settings → API keys → Browser origins. Server-side calls like these send no origin.

curl: REST

REST answers in a { "data": …, "error": … } envelope. An API key is bound to one account, so X-Account-Id is optional; add X-Advertiser-Id to narrow to one advertiser.
Every REST endpoint is in the Buyer API reference and Storefront API reference groups.

TypeScript

Node.js 20 or newer, with the official MCP SDK. This starter connects, reads the tool list and makes one get_status call, all within 15 seconds.
package.json
src/main.ts
When the call works, follow Build an agent to add tool discovery, confirmation gates, idempotency keys and retries. To run against a local stack, set SEMICOLA_MCP_URL=http://localhost:4000/mcp/v3.

Python

Python 3.10 or newer, with the official MCP SDK.
requirements.txt
main.py

Next steps