Skip to main content
Codex CLI reads its MCP servers from a TOML config file, or accepts them through its own mcp subcommand.

Add the server

The quickest route is the CLI:
Or edit ~/.codex/config.toml directly:
~/.codex/config.toml
Codex moves quickly and the exact key names for remote servers have changed between releases - some versions also require a flag to enable the HTTP transport. If the config above is rejected, check codex mcp --help and the Codex documentation for your version.Whatever the shape, the three values never change: the URL https://mcp.2extract.com/mcp, transport Streamable HTTP, and the header Authorization: Bearer 2xt_....

Verify

2extract should be listed. Then start Codex and ask:
What is my 2extract balance?
A number comes back, and no proxy was created.

Troubleshooting

Run codex mcp list. If the entry is missing, the config file was not picked up - confirm the path is ~/.codex/config.toml and that the TOML parses.If the entry is there but not connecting, your build may not have remote HTTP transport enabled. Check codex mcp --help.
The header must be exactly Authorization: Bearer 2xt_.... In TOML, keep the whole value in one quoted string, including the word Bearer.
A scope problem rather than a connection problem. The key is missing the scope those tools need - see Overview.

Next steps

Tools

Everything the agent can call.

Other clients

The three values any MCP client needs.