Codex supports MCP servers in both the CLI and the IDE extension. Configuration is shared between them, so you only set it up once.
Option A, CLI
Run from your terminal:
codex mcp add openfinance-tech --url https://api.openfinance.tech/agent/mcp
Verify it is configured:
Option B, edit config.toml
Open ~/.codex/config.toml (or a project-scoped .codex/config.toml in trusted projects) and add:
Public-only
With wallet tools
[mcp_servers.openfinance-tech]
url = "https://api.openfinance.tech/agent/mcp"
[mcp_servers.openfinance-tech]
url = "https://api.openfinance.tech/agent/mcp"
http_headers = { "x-api-key" = "open_xxxxx" }
Codex uses TOML, not JSON. The header block is a TOML inline table, note the = instead of :.
First-time MCP users
If this is your first MCP server in Codex, you may need to enable the rmcp client. Add the following to ~/.codex/config.toml:
[features]
experimental_use_rmcp_client = true
Verify
After starting Codex (CLI or IDE), run /mcp in the TUI or open the IDE MCP panel. openfinance-tech should appear with its tools listed.