Skip to main content

MCP Protocol

This API uses the Model Context Protocol (MCP) — a standard for exposing tool-based APIs via JSON-RPC 2.0 over HTTP.

How it works

Each ad platform source (Meta, LinkedIn, Google Ads) exposes its operations as MCP tools. All tools for a source share a single HTTP endpoint:
The specific tool is identified by the params.name field in the JSON-RPC request body.

Request format

Every MCP tool call follows this structure:

Response format

The result.content array contains one or more content blocks. For this API, results are always type: "text" with a JSON-stringified payload in text.

Error responses

Tool-level errors return isError: true in the result:
HTTP-level errors (auth, rate limiting) return standard HTTP status codes with an error body. See Error Handling.

Tool discovery

List all available tools for a source:
Response includes each tool’s name, description, and JSON Schema input definition.

Stateless design

Each HTTP request creates a fresh MCP server instance — there is no session state between requests. This means:
  • No initialize handshake needed
  • No session tokens to manage
  • Each request is fully self-contained