# Mimeo and Codex

Connect OpenAI Codex to Mimeo through its MCP server and the manager repo, so Codex can build flows, write emails and push changes through a diff.

**The short version:** Codex works on your Mimeo through the MCP server your Mimeo runs at /mcp, and in the Mimeo Manager repo, where your flows, emails and segments are files it can pull, change, diff and push.

## What Codex can do in Mimeo

- **Build and change flows.** Read the schema, save a draft flow, validate it, dry-run it on a real subscriber, and make it live only when you say so.
- **Write emails and segments.** Draft an email, preview it as a real person, send yourself a test, and define segments as rules.
- **Answer questions from live data.** Look people up, read their email activity and pull reports for any email, sequence, flow or broadcast.
- **Work on files you review.** In the manager repo, `./bin/mimeo pull`, edit, `./bin/mimeo diff`, then `./bin/mimeo push`, which validates and rehearses the change on your Mimeo before it applies.

The [MCP docs](https://mimeohq.com/docs/mcp#what-it-can-do) list every tool.

## Setting it up

1. Set up the manager repo: download the Mimeo Manager ZIP from your [Mimeo account](https://account.mimeohq.com/login), create a token under **Settings → Agents & API → Manager repo**, and run `./bin/mimeo init --host https://mimeo.example.com` with your own address. See [your manager repo](https://mimeohq.com/docs/manager-repo).
2. Put the token in your environment: `export MIMEO_TOKEN="$(cat .mimeo/token)"`.
3. Add Mimeo's MCP server to Codex's `~/.codex/config.toml`, or to the project's `.codex/config.toml`:

```
[mcp_servers.mimeo]
url = "https://your-mimeo.com/mcp"
bearer_token_env_var = "MIMEO_TOKEN"
```

4. Start Codex in the manager repo and check the server under `/mcp`. Ask it to read the repo's `CLAUDE.md` first: it holds the operating rules, such as rehearsing a flow before it goes live.

## Questions

### Does Codex read the manager repo's .mcp.json?

No. Codex keeps MCP servers in its own config.toml, so add Mimeo there once, as below.

### Can Codex send email by mistake?

MCP needs a full-access token, and full access includes sending. Ask Codex to rehearse a flow and test-send before anything goes live; [let an AI agent run your email without accidental sends](/guides/agent-safe-email) shows the checks.

### Does it work with other agents?

Yes. Any MCP client works, and [Claude Code](/integrations/claude-code) is wired up by the manager repo already.

## Sources

1. [MCP](https://mimeohq.com/docs/mcp), checked 2026-11-10
2. [Your manager repo](https://mimeohq.com/docs/manager-repo), checked 2026-11-09
3. [CLI](https://mimeohq.com/docs/cli), checked 2026-11-02
4. [Model Context Protocol](https://developers.openai.com/codex/mcp), checked 2026-11-09

---

This is the Markdown copy of https://mimeohq.com/integrations/codex.
