Purpose-built MCP conversion
A generic JSON-to-TOML converter cannot understand that an MCP server name must become a table path, or that a bearer-token environment reference can become Codex’s bearer_token_env_var. This converter understands the MCP client formats and applies those mappings deliberately.
{
"mcpServers": {
"filesystem": {
"command": "npx",
"args": ["-y", "@modelcontextprotocol/server-filesystem", "/projects"],
"env": { "LOG_LEVEL": "info" }
}
}
}
Is converted to:
[mcp_servers.filesystem] command = "npx" args = ["-y", "@modelcontextprotocol/server-filesystem", "/projects"] [mcp_servers.filesystem.env] LOG_LEVEL = "info"Convert MCP JSON to TOML →
Supported MCP fields
- Local stdio servers using
commandandargs - Per-server environment variables
- Remote Streamable HTTP server URLs
- Literal HTTP headers and environment-backed headers
- Bearer-token environment-variable references
- Codex startup and tool timeout values
Why the result is safer to review
The converter reports definitions that contain both a command and a URL, insecure remote HTTP endpoints, direct shell execution, legacy SSE transports and values that resemble real credentials. A passing check means the configuration shape is plausible; it does not guarantee the MCP server’s code is trustworthy.
Where to save the TOML
For a user-wide OpenAI Codex configuration, merge the generated tables into ~/.codex/config.toml. For a project-scoped configuration, use .codex/config.toml inside a trusted repository. Do not overwrite unrelated Codex settings when adding the generated MCP tables.