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:
- MCPServerStreamableHttp, with the URL and headers in its params.
- A PaidSync.ai API key in an environment variable. The docs recommend an Authorization header over a URL.
- A PaidSync.ai login with Google Ads connected.
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
| Setting | Value |
|---|---|
| Class | MCPServerStreamableHttp |
| URL | https://mcp.paidsync.ai/mcp |
| Header | Authorization: Bearer, from an environment variable |
| Passed to | Agent(mcp_servers=[server]) |
| Key limit | Reads 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.
Connect Google Ads to PaidSync.ai
Sign up at paidsync.ai and connect Google Ads on Google's own sign-in screen.
Create an API key
Create a key in your dashboard and export it as PAIDSYNC_API_KEY.
Create the server
Use the snippet below. The async context manager opens and closes the connection.
Pass it to an Agent
Give the Agent mcp_servers=[server] and call Runner.run.
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.
How PaidSync.ai Protects You
- Keys stay out of URLs. The key goes in a header from an environment variable.
- Reports change nothing. The wasted spend and performance reports only read your account.
- Sign-in for changes. A key cannot apply a Google Ads change.
- A change log. Applied changes are logged, on a best-effort basis, with a before-and-after result.
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.
Add to ChatGPT: open PaidSync.ai in ChatGPT's plugin directory, install it, then sign in.
Add to Claude: open PaidSync.ai in Claude's connector directory, click Connect, then sign in.
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 100 tasks a month, worth $50, with no card. Pro starts at $99 a month. See pricing.
Related Guides
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