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.
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.
| 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.
Do these in order. The code box holds the exact setup from OpenAI Agents 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.
Use the snippet below. The async context manager opens and closes the connection.
Give the Agent mcp_servers=[server] and call Runner.run.
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())Start with the account list, which only reads, then move to the wasted spend report.
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.
Yes. It supports hosted MCP tools and Streamable HTTP servers that your code manages.
MCPServerStreamableHttp with a Bearer header is the documented, simple route.
With a key it reads and previews. Applying a Google Ads change needs the OAuth sign-in.
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