Skip to content
Get MCP Ads, home

How to connect your ad accounts to Codex

Add your advertising accounts to Codex as a remote MCP server: one codex mcp add command, or four lines in config.toml, then OAuth sign-in.

guides/setup/codex.md

Connection URL

https://mcp.getmcpads.com/mcp

The same URL in every client. Sign in once when Codex asks; nothing is installed and no key is issued.

Both readings are on this page.

For you

What the answer looks like, and what to type to get it.

Codex speaks the Model Context Protocol, so there is nothing to install. You paste one URL, sign in once, and your advertising accounts become tools it can call.

Setup

bash · The command
codex mcp add get-mcp-ads --url https://mcp.getmcpads.com/mcp
codex mcp login get-mcp-ads

Or write it yourself, in ~/.codex/config.toml:

toml · ~/.codex/config.toml
[mcp_servers.get-mcp-ads]
url = "https://mcp.getmcpads.com/mcp"

Then codex mcp login get-mcp-ads to walk the OAuth flow. A .codex/config.toml in a project applies to that project only, and the directory has to be trusted.

Before it can answer anything

Connecting the client is one half. The other is connecting at least one advertising platform in the dashboard and ticking which accounts to expose. Both need you, not the assistant: one is a consent screen at Google or Meta, the other is a decision about which accounts a machine may read.

For your agent

The tool sequence, the parameters that matter, and what will be refused.

Both readings as Markdown: /guides/setup/codex.md

Setting up Codex against this gateway. The endpoint is https://mcp.getmcpads.com/mcp, and each source also has its own endpoint if a narrower tool list is wanted.

What the client does on its own

  1. It requests https://mcp.getmcpads.com/mcp and receives a 401 with a WWW-Authenticate header.
  2. It reads the protected resource metadata named in that header.
  3. It registers itself through dynamic client registration. No key is issued or pasted.
  4. It opens the authorisation page with PKCE and waits for the person to approve.
  5. It calls tools/list and receives the tools for the connected sources, plus four routing tools.

Checking it worked

Call list_accounts. It answers without touching any advertising API, so it separates a connection problem from an account problem. An empty list means the platform is connected but nothing was ticked.

Manage your ads from your AI assistant

Start for free

Free with 1 ad account, no card. Pro is free for 7 days.