To connect Google Ads to the Claude Agent SDK, add an http MCP server for https://mcp.paidsync.ai/mcp with your PaidSync.ai API key in the Authorization header, and list its tools in allowedTools. Your agent can then call PaidSync.ai tools for Google Ads, Meta Ads and 12 other platforms.
The Agent SDK takes MCP servers in its options. For a remote server you need:
http, the URL and a headers object.mcp__paidsync__tool_name.The SDK does not open a browser or run an interactive OAuth flow, so a header token is the route. Anthropic's docs say MCP tools need explicit permission through allowedTools.
| Setting | Value |
|---|---|
| Server type | http |
| URL | https://mcp.paidsync.ai/mcp |
| Header | Authorization: Bearer, from an environment variable |
| Tool names | mcp__paidsync__ followed by the tool name |
| Key limit | Reads and previews on Google Ads |
Applying a Google Ads change needs PaidSync.ai's OAuth sign-in. If you complete that flow in your own app, you can send the access token in the same header.
Do these in order. The code box holds the exact setup from Claude Agent SDK MCP docs.
Sign up at paidsync.ai and connect Google Ads on Google's own sign-in screen.
Create a key in your dashboard and export it as PAIDSYNC_API_KEY.
Pass the snippet below as your options.
List read tools such as mcp__paidsync__get_wasted_spend_report in allowedTools.
Look at the init message's mcp_servers list and confirm paidsync shows connected.
Claude Agent SDK with PaidSync.ai
import asyncio, os
from claude_agent_sdk import query, ClaudeAgentOptions, ResultMessage
options = ClaudeAgentOptions(
mcp_servers={
"paidsync": {
"type": "http",
"url": "https://mcp.paidsync.ai/mcp",
"headers": {"Authorization": "Bearer " + os.environ["PAIDSYNC_API_KEY"]},
}
},
allowed_tools=["mcp__paidsync__get_wasted_spend_report"],
)
async def main():
async for message in query(prompt="Run get_wasted_spend_report for the last 30 days.", options=options):
if isinstance(message, ResultMessage) and message.subtype == "success":
print(message.result)
asyncio.run(main())Read the init message first. A status of connected for paidsync means the key works.
Setup follows Anthropic's Agent SDK documentation, checked on 24 October 2026. Source: Claude Agent SDK MCP docs. Every Google Ads tool is on the Google Ads MCP server page, and the full list of clients is on Connect your ads.
Yes. Anthropic's docs describe http and sse servers with headers, in Python and TypeScript.
Anthropic's docs say the SDK does not run an interactive OAuth flow. Pass a token in headers.
Use mcp__paidsync__ followed by the tool name, or mcp__paidsync__* for all of them.
Yes. The same server exposes Meta Ads tools. See the Meta Ads MCP server page.
PaidSync.ai is free for 15 tasks a month with no card. Pro starts at $99 a month. See pricing.
PaidSync.ai runs 630+ tools across 14 ad and analytics platforms. Connect your accounts once and use them in the AI assistant you already work in.
Get Started Free Book a Demo