---
title: 'Codex for Meta ads, with approvals | Plainrouter'
description: 'Connect Codex to Meta ads with an environment-held Read Workspace key. Review account evidence and approve supported changes through Plainrouter.'
canonical: 'https://plainrouter.com/agents/codex/meta'
last_updated: '2026-11-10'
---

# Codex for Meta ads, with your approval.

For Codex, choose Plainrouter’s Meta Ads MCP when you want an approval queue for ad changes and your own arrival and conversion counts beside Meta’s figures. You can connect Meta’s official server alongside Plainrouter, but changes sent through Meta’s server get no Plainrouter approval or receipt.

[Start for free](/register) · [Connect through MCP](/quickstart-mcp.md)

## What can Codex do with Meta ads?

Codex can read account context, retained performance, the creative library and stored signal-health evidence, then explain the returned data alongside your development work. Ask it to state the reporting period and missing inputs rather than treating every stored read as fresh Meta data.

Connect Plainrouter’s remote MCP server within your existing Codex workflow, using an environment-held workspace key. Begin with Read access, then switch to Write when you want to prepare proposals for individual approval in Ask mode.

With Write access, supported actions include pauses and resumes for selected campaigns, ad sets and ads, eligible daily-budget changes, and creative tests. Preview a supported change before proposing it; new ad copies start paused and require a separate governed resume to activate. See the [shared Meta ads agent capabilities](/solutions/meta-ads-agent) for the supported workflow, not unrestricted API access.

## How do I connect Codex to Meta ads?

Sign up in Plainrouter, connect Meta and create a Read Workspace key. Supply `PLAINROUTER_WORKSPACE_TOKEN` through your protected environment before launching Codex. Configure the remote MCP endpoint in `~/.codex/config.toml`:

```toml
[mcp_servers.plainrouter]
url = "https://plainrouter.com/mcp"
bearer_token_env_var = "PLAINROUTER_WORKSPACE_TOKEN"
```

The configuration stores the variable name, not the key. Never put the key in a Codex prompt, a committed file or a literal bearer-header example.

Run `codex mcp list` to check the entry, then request an authenticated account read through `plainrouter` and verify the intended workspace. A listed server alone does not prove tool access. Name the ad account if the workspace has several. Use the [Plainrouter connection reference](/docs/mcp/setup#confirm-a-read-only-production-connection) and [Codex MCP configuration guide](https://learn.chatgpt.com/docs/extend/mcp) for full setup and client options.

## How do approvals work in Codex?

Codex’s approval to call an MCP tool is not Plainrouter’s approval to change an ad. You can allow a client tool call without approving the resulting Action.

Read access cannot preview or propose Actions; use it for the initial account review.

When ready for proposals, configure Write access and select Ask mode in Plainrouter. Ask Codex to preview a named change first, inspect the returned evaluations, then submit the proposal if appropriate. Codex displays tool results in its conversation; the proposal result is not a receipt that Meta executed the change. Review the specific proposal in Plainrouter’s Inbox and check its decision receipt.

Full runs agent changes that pass admission and workspace policy automatically. In Custom, your switches decide which agent changes run on their own. A prompt asking Codex to wait does not replace Ask mode. All three modes block rule violations. Plainrouter’s kill switch stops further changes, including queued work; it does not undo completed actions. Revoke the workspace key when removing the connection.

## What can’t Codex do through this connection?

Plainrouter’s focused workflow does not provide audience creation, lifetime-budget changes or unrestricted [Marketing API access](/library/meta-ads-api). A Codex recommendation cannot guarantee better ad performance, and a preview cannot authorize execution by itself.

Codex also needs the token in the environment of the process making the connection. A variable available in one terminal is not necessarily available in another launcher. If authentication fails, inspect that process environment and the workspace key instead of sharing the credential in the chat.

## How do I verify a read-only connection?

After connecting with Read access, ask Codex:

> Use the plainrouter MCP server to read account state. Show which workspace and ad account answered, and identify any missing information. Do not preview, propose or execute changes.

Check the returned workspace and account against the ones you intended to connect. Read-only access does not demonstrate that a preview or proposal is available; those require Write access.

## How does this differ from Meta’s official Ads MCP?

Plainrouter is an independent hosted server with its own policy, approval and conversion-check workflow. Meta’s official server is an alternative when you only need Meta’s own tools.

Compare the [Meta Ads MCP options](/library/meta-ads-mcp-options) rather than assuming both servers expose the same controls.

## Frequently asked questions

### Does Codex need an OAuth login for this setup?

This documented configuration uses a Plainrouter workspace key through `bearer_token_env_var`. It does not require pasting the key into the conversation.

### How do I check that Codex is connected to the right account?

Request an authenticated account-state read through the `plainrouter` server and inspect the returned workspace and ad account. Name the intended ad account when several are available; a server appearing in `codex mcp list` does not by itself prove a successful read.

### Can Codex change spend with a Read key?

No. Action previews and proposals require Write. A Read key covers account, creative and tracking reads; the optional ingestion diagnostic is a separate test-event operation.

### Are Codex costs included?

No. Your AI client’s charges are separate. Plainrouter includes MCP on every plan and does not meter MCP calls; see [current pricing](/pricing).

## Related guides

- [What your Meta ads agent can do](</solutions/meta-ads-agent>)
- [Hosted Meta Ads MCP overview](</solutions/meta-ads-mcp>)
- [AI agent safety checklist](</library/ai-agent-meta-ads-safety>)
- [Agents hub](</agents>)
- [Claude Code for Meta ads](</agents/claude/meta>)
- [ChatGPT for Meta ads](</agents/chatgpt/meta>)
- [Connection and workspace access](</docs/mcp/setup>)
