PaidSync>Blog>Connect Google Ads to the OpenAI Agents SDK with MCP

Connect Google Ads to the OpenAI Agents 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 OpenAI Agents SDK, create an MCPServerStreamableHttp for https://mcp.paidsync.ai/mcp with your PaidSync.ai API key in the Authorization header, then pass it to your Agent. The agent can then call PaidSync.ai tools for Google Ads, Meta Ads and 12 other platforms.

What the Agents SDK Needs

The SDK offers two ways to use a remote MCP server. PaidSync.ai works with the one where your code manages the connection:

The SDK also has a hosted MCP tool, where OpenAI's Responses API makes the calls for you. The docs do not describe the SDK running an OAuth flow, so a header is the route here.

How the Connection Works

SettingValue
ClassMCPServerStreamableHttp
URLhttps://mcp.paidsync.ai/mcp
HeaderAuthorization: Bearer, from an environment variable
Passed toAgent(mcp_servers=[server])
Key limitReads and previews on Google Ads

Applying a Google Ads change needs PaidSync.ai's OAuth sign-in, and a key cannot do it. The SDK's tool approval setting can hold write tools for a person.

How to Connect Google Ads to the OpenAI Agents SDK in 5 Steps

Do these in order. The code box holds the exact setup from OpenAI Agents 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

Create the server

Use the snippet below. The async context manager opens and closes the connection.

4

Pass it to an Agent

Give the Agent mcp_servers=[server] and call Runner.run.

5

Check the tool call

Read the run's output and confirm a PaidSync.ai tool was used.

OpenAI Agents SDK with PaidSync.ai

import asyncio, os from agents import Agent, Runner from agents.mcp import MCPServerStreamableHttp async def main(): async with MCPServerStreamableHttp( name="PaidSync", params={ "url": "https://mcp.paidsync.ai/mcp", "headers": {"Authorization": "Bearer " + os.environ["PAIDSYNC_API_KEY"]}, "timeout": 10, }, cache_tools_list=True, ) as server: agent = Agent(name="Ads analyst", mcp_servers=[server]) result = await Runner.run(agent, "List my Google Ads accounts.") print(result.final_output) asyncio.run(main())

How to Check the Connection

Start with the account list, which only reads, then move to the wasted spend report.

"List my Google Ads accounts."
Run this to confirm the connection.
"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.

How PaidSync.ai Protects You

Setup follows the OpenAI Agents SDK documentation, checked on 24 October 2026. Source: OpenAI Agents 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 OpenAI Agents SDK support MCP?

Yes. It supports hosted MCP tools and Streamable HTTP servers that your code manages.

Which should I use for PaidSync.ai?

MCPServerStreamableHttp with a Bearer header is the documented, simple route.

Can the agent change my Google Ads account?

With a key it reads and previews. Applying a Google Ads change needs the OAuth sign-in.

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