Convert Claude JSON to Codex
Claude uses an mcpServers JSON object. Codex reads TOML tables under [mcp_servers.<name>]. MCP Config Lab translates the structure, including stdio commands, arguments, environment variables, remote URLs and bearer-token references.
{
"mcpServers": {
"docs": {
"url": "https://example.com/mcp",
"headers": {
"Authorization": "Bearer ${MCP_TOKEN}"
}
}
}
}
Becomes:
[mcp_servers.docs] url = "https://example.com/mcp" bearer_token_env_var = "MCP_TOKEN"Convert Claude to Codex →
Where does the Codex MCP config go?
Use ~/.codex/config.toml for user-wide servers or .codex/config.toml inside a trusted project for project-specific configuration. Restart or reload the client after changing its configuration.
What the converter preserves
command,argsandenvfor stdio servers- Remote HTTP URLs and request headers
- Environment-variable bearer tokens without exposing their values
- Codex startup and tool timeout fields when already present
Before you copy
Review every command in an MCP config before running it. Avoid committing real API keys, access tokens or passwords. The built-in validator flags common credential patterns and insecure remote URLs.