PaidSync>Blog>Connect Google Ads to the Claude Agent SDK with MCP

Connect Google Ads to the Claude Agent SDK with MCP

Founder written
Author: Ahmed Ashraf|4 min read|Updated October 24, 2026
$1B+ ad revenue generated $500M+ managed Ex-Scandiweb paid media lead 630+ MCP tools

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.

What the Agent SDK Needs

The Agent SDK takes MCP servers in its options. For a remote server you need:

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.

How the Connection Works

SettingValue
Server typehttp
URLhttps://mcp.paidsync.ai/mcp
HeaderAuthorization: Bearer, from an environment variable
Tool namesmcp__paidsync__ followed by the tool name
Key limitReads 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.

How to Connect Google Ads to the Claude Agent SDK in 5 Steps

Do these in order. The code box holds the exact setup from Claude Agent SDK MCP docs.

1

Connect Google Ads to PaidSync.ai

Sign up at paidsync.ai and connect Google Ads on Google's own sign-in screen.

2

Create an API key

Create a key in your dashboard and export it as PAIDSYNC_API_KEY.

3

Add the server

Pass the snippet below as your options.

4

Allow only what you need

List read tools such as mcp__paidsync__get_wasted_spend_report in allowedTools.

5

Check the init message

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())

How to Check the Connection

Read the init message first. A status of connected for paidsync means the key works.

"Run get_wasted_spend_report for the last 30 days and list the search terms with cost and no conversions."
Run this to confirm the connection.
"List my Google Ads accounts."
Run this to confirm the connection.

How PaidSync.ai Protects You

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.

Frequently Asked Questions

Does the Claude Agent SDK support remote MCP servers?

Yes. Anthropic's docs describe http and sse servers with headers, in Python and TypeScript.

Why a key and not OAuth?

Anthropic's docs say the SDK does not run an interactive OAuth flow. Pass a token in headers.

How do I name PaidSync.ai tools in allowedTools?

Use mcp__paidsync__ followed by the tool name, or mcp__paidsync__* for all of them.

Does it work for Meta Ads?

Yes. The same server exposes Meta Ads tools. See the Meta Ads MCP server page.

How much does it cost?

PaidSync.ai is free for 15 tasks a month with no card. Pro starts at $99 a month. See pricing.

Connect your ads to Claude, ChatGPT, Gemini and more→Google Ads MCP Server with Full Write Access→PaidSync.ai MCP Server for 14 Ad Platforms→Build Your Own Ads Agent→

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