All posts

Connect Codex to Google Ads and Meta Ads with MCP

TL;DR: Use Codex to connect to the Lazy Ads MCP server at https://mcp.lazyads.ai/mcp with an API key from Settings, then API Keys, sent as a Bearer token. ChatGPT on the web custom connector is not supported with an API key, because that flow requires OAuth or no authentication, and the Lazy Ads MCP server does not use OAuth. After you connect Meta and Google under Settings, then Platforms, you can call list_platform_connections, get_campaign_performance, pause_resume_campaign, and set_campaign_budget, plus get_optimization_suggestions on Starter and above.

ChatGPT desktop setup is coming soon.

Lazy Ads is an AI media buyer across nine ad networks including Meta. It runs in the ad accounts you already own. The MCP server is one hosted endpoint for those networks, including Google Ads and Meta, so Codex can list accounts, read performance, pause or resume campaigns, and change budgets through the tools below.

If you already use Claude, the setup on Connect Claude to Google Ads and Meta Ads is the same server and the same key, with a different client. Endpoint, auth, and the full tool list live on the MCP setup hub.

What you need

  1. Your own Google Ads and Meta ad accounts, connected in Lazy Ads under Settings, then Platforms. The same key also covers the other networks you connect there.
  2. A Lazy Ads account and API key. Free includes an API key for read-only MCP access: 18 read tools for your ad accounts, campaigns and reports. Every paid plan, including BYOA, gets the 39 bridge tools. Starter and above get 53 tools, which adds 14 Lazy Ads AI tools.
  3. A Lazy Ads API key from Settings, then API Keys. Send it as Authorization: Bearer. X-API-Key is also accepted. The Lazy Ads MCP server does not use OAuth.
  4. Codex CLI.

Create a key and connect your ad accounts

  1. Sign in at lazyads.ai and connect Google Ads and Meta under Settings, then Platforms.
  2. Open Settings, then API Keys, and create a key. Copy it once. Store it in an environment variable, for example LAZY_ADS_API_KEY. Do not paste the key into chat.
  3. Point Codex at https://mcp.lazyads.ai/mcp over Streamable HTTP, using the steps below.

The variable name in the examples is LAZY_ADS_API_KEY. The official OpenAI docs require the name of the variable in config, not the token itself.

Set it up in Codex CLI

This is the path OpenAI documents for a streamable HTTP server that uses a bearer token. From Developer commands: codex mcp add registers a server in ~/.codex/config.toml; --url registers a streamable HTTP server; --bearer-token-env-var takes the environment variable whose value is sent as a bearer token.

Export the key in the same environment you will use to run Codex:

export LAZY_ADS_API_KEY="la_your_api_key"

Add the server:

codex mcp add lazyads --url https://mcp.lazyads.ai/mcp --bearer-token-env-var LAZY_ADS_API_KEY

Confirm the entry:

codex mcp list

The CLI writes this table to ~/.codex/config.toml (you can also add the table by hand):

[mcp_servers.lazyads]
url = "https://mcp.lazyads.ai/mcp"
bearer_token_env_var = "LAZY_ADS_API_KEY"

In the Codex terminal UI, type /mcp to see active MCP servers. Then ask Codex to list your connected ad platforms.

Add the export line to your shell profile if you want new terminals to keep the variable. The flag takes the variable name. Do not pass the key itself to --bearer-token-env-var. Keep the key out of the config file.

ChatGPT on the web is not supported with an API key

Do not add Lazy Ads as a custom MCP server in ChatGPT on the web.

OpenAI's custom MCP server guide applies to ChatGPT on the web. Authentication options there are OAuth, no authentication, and OAuth or no authentication. That UI has no field for a static API key or an Authorization: Bearer header. The Lazy Ads MCP server authenticates with a Bearer API key (or X-API-Key) and does not use OAuth.

OpenAI also states that ChatGPT on the web uses remote MCP tools through plugins and does not read local Codex configuration files. A server you add in Codex does not appear in ChatGPT on the web.

First prompts, mapped to real tools

Start with a read, then a small write, and review each write in the client before you approve it. Changes go to the live ad accounts you connected.

  • "Which ad platforms am I connected to?" calls list_platform_connections.
  • For a performance read, ask for results on your connected campaigns over the last 7 days. That maps to get_campaign_performance.
  • "Pause campaign [name or id]." calls pause_resume_campaign.
  • To change a daily budget, name the campaign and the amount in the account currency. That maps to set_campaign_budget.
  • "What optimizations do you suggest for this campaign?" calls get_optimization_suggestions. That tool is part of the Lazy Ads AI set on Starter and above. It is not in the 39-tool bridge.

If Codex can see the server but these tools are missing, run tools/list or ask it to list Lazy Ads tools, and confirm the plan: BYOA sees the bridge set, and Starter and above see all 53.

Plans and tool counts

MCP access is included on every paid plan. The endpoint, rate limits, and full inventory are on the MCP setup hub. Prices are on Pricing.

  • Bridge: 39 tools on every paid plan, including BYOA from $19/mo billed annually. Your agent supplies strategy and copy. Lazy Ads is the connector and the dashboard. list_platform_connections, get_campaign_performance, pause_resume_campaign, and set_campaign_budget are in this set.
  • Full: 53 tools on Starter and above, which is the 39 bridge tools plus 14 Lazy Ads AI tools, including get_optimization_suggestions, build_ai_campaign, and generate_creative. Starter is from $79/mo billed annually on Starter ($99 billed monthly).
  • Free includes an API key for read-only MCP access: 18 read tools for your ad accounts, campaigns and reports.

Full Autopilot requires a monthly ad-spend cap.

For a closer look at Google's official MCP server and when a hosted bridge helps, see Google Ads MCP.

FAQ

Can I add Lazy Ads to ChatGPT on the web?

No. ChatGPT on the web custom MCP authentication is OAuth, no authentication, or a mix of the two. The Lazy Ads MCP server uses a static API key sent as Authorization: Bearer or X-API-Key, and it does not use OAuth. Use Codex CLI instead.

How do I connect Codex to Lazy Ads MCP?

Export your API key, then run codex mcp add lazyads --url https://mcp.lazyads.ai/mcp --bearer-token-env-var LAZY_ADS_API_KEY. Confirm with codex mcp list or /mcp.

Can I use ChatGPT desktop?

ChatGPT desktop setup is coming soon. Use Codex CLI today. ChatGPT on the web is not supported with an API key.

Does Lazy Ads use OAuth for MCP?

No. Lazy Ads uses a static API key from Settings, then API Keys, sent as Authorization: Bearer or X-API-Key on every request.

Do I need my own Google Ads and Meta ad accounts?

Yes. Connect the accounts you already own under Settings, then Platforms. Lazy Ads does not mint a Google Ads or Meta account for you. Media spend is billed by those networks on your accounts.

How much does it cost, and which tools do I get?

MCP is included on every paid plan. BYOA is from $19/mo billed annually and includes the 39 bridge tools. Starter is from $79/mo billed annually on Starter ($99 billed monthly) and includes all 53 tools on Starter and above, including get_optimization_suggestions. See Pricing.

Create an API key, point Codex at the hosted MCP server, and manage the ad accounts you already own. Free includes an API key for read-only MCP access: 18 read tools for your ad accounts, campaigns and reports.