I'm calling an agent
Buyer side. The rest of this page walks through calling the public test agent — no signup, copy-pasteable curl.
I'm building an agent
Publisher or seller side. Stand up an agent buyers can call.
Setup
Use the public test token to get started immediately — no signup required:/sales/mcp serves media-buy tools (this quickstart’s path), and sibling URLs serve the other specialisms — /signals/mcp, /governance/mcp, /creative/mcp, /creative-builder/mcp, /brand/mcp. Hit /.well-known/adagents.json for the full tenant + tool list.
For your own API key (org-scoped, usage tracking), create one at the AAO dashboard.
To test an OAuth connect flow, use /sales/mcp and follow its 401
WWW-Authenticate challenge to the protected-resource metadata at
/.well-known/oauth-protected-resource/sales/mcp.
The metadata links to current OAuth connection instructions, served by the training agent.
Use the advertised authorization server, PKCE, and the exact resource indicator
https://test-agent.adcontextprotocol.org/sales/mcp. Sign in with an AgenticAdvertising.org account
and select an organization where you have an active owner, admin, or member
role. The OAuth credential uses an organization-scoped sandbox; a paid
subscription is not required. Other specialism endpoints continue to use bearer
test tokens or API keys.
Live GCS reporting under /sales/reporting is limited to owners and admins of
the private training buyer canary organization with provisioned local grants. Those callers retain their
private buyer identity on /sales/mcp; ordinary members of the canary
organization use the separate sandbox. A denied OAuth call returns 403
with BUYER_ACCESS_DENIED, an error_description, and a
WWW-Authenticate: Bearer error="insufficient_scope" header. Surface the
description instead of retrying sign-in or treating it as an MCP discovery
failure. If you have no organization access, use the shared bearer token above.
1. Discover products
AdCP over MCP uses JSON-RPC 2.0. The transport is Streamable HTTP — responses arrive as server-sent events.content[0].text:
2. Handle errors
Send an invalid tool name to see what errors look like:isError, then parse the error payload:
INVALID_REQUEST (bad input), RATE_LIMITED (retry with backoff), UNAUTHORIZED (check credentials).
3. Create a media buy (idempotently)
Use the product IDs from step 1 to create a campaign. Every mutating request MUST carry anidempotency_key — a client-generated UUID v4 that makes retries safe. Send the same key with the same payload and the seller returns the original result instead of creating a duplicate buy:
replayed: true. Send the same key with a different payload and you get IDEMPOTENCY_CONFLICT. Check a seller’s window via get_adcp_capabilities:
IDEMPOTENCY_CONFLICT, IDEMPOTENCY_EXPIRED, and UUID v4 guidance for AdCP Verified agents.
Response (IDs will differ on each call):
4. Push notifications (signed webhooks)
Production agents send webhooks for long-running operations. AdCP 3.0 signs webhooks with the same RFC 9421 HTTP Message Signatures profile used for agent-to-agent requests — one verifier, one JWKS, one trust surface. No shared HMAC secrets. Point the agent at your webhook endpoint and advertise your JWKS. The agent signs each POST with a key it trusts; you fetch the agent’s JWKS and verify the signature before acting on the payload:idempotency_key so your receiver can dedupe retries:
keyid with Agent resolution (the seller’s identity.brand_json_url leads to its brand.json agents[].jwks_uri), keep only keys that match any publisher adagents.json signing_keys[] pin that applies, run the AdCP webhook verifier checklist, and reject unknown keys, expired dates, or mismatched digests with a typed webhook_signature_* reason code:
Using the client library
The examples above use raw HTTP for clarity. In practice, use the AdCP client library which handles SSE parsing, retries, and authentication:What’s next
- Build an agent — use skill files to generate a storyboard-compliant agent with a coding agent
- Validate your agent — test your agent with storyboards and compliance checks
- Compliance Catalog — the domains and specialisms an agent can claim, and the storyboards that verify each claim
- MCP integration guide — transport, sessions, auth details
- A2A integration guide — streaming, artifacts, push notifications
- Media buy lifecycle — state machine, sequenced flow, guaranteed deal IO path, creative sync timing
- Task reference — all available tasks with testable examples
- Error handling — error codes, recovery strategies
- Authentication — production credential setup