Setup
Get your API key from the AAO dashboard under API Keys, then: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
Use the product IDs from step 1 to create a campaign:4. Push notifications (webhooks)
Production agents support push notifications for long-running operations. The sandbox test agent does not send webhooks, but you can include the configuration to see how it works. Addpush_notification_config to your tool arguments:
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
- MCP integration guide — transport, sessions, auth details
- A2A integration guide — streaming, artifacts, push notifications
- Task reference — all available tasks with testable examples
- Error handling — error codes, recovery strategies
- Authentication — production credential setup