AgentDomains MCP for OpenAI Codex CLI
Configure AgentDomains in OpenAI Codex CLI via ~/.codex/config.toml with bearer_token_env_var or stdio npx agentdomains-mcp.
MCP tool flow: OpenAI Codex CLI sends JSON-RPC calls to mcp.agentdomains.co and receives a live HTTPS domain.
Add Config
Open ~/.codex/config.toml and paste the snippet below.
Reload Tools
Refresh MCP tools in OpenAI Codex CLI. Confirm 20 AgentDomains tools appear.
Run Prompt
Paste the test prompt below to check, claim, and route a live domain.
~/.codex/config.toml
1. Install & Configure OpenAI Codex CLI
Choose hosted Streamable HTTP for zero local setup, or pick local stdio to reuse your Go CLI config.
codex mcp add agentdomains --url https://mcp.agentdomains.co
[mcp_servers.agentdomains]
url = "https://mcp.agentdomains.co"
bearer_token_env_var = "AGENTDOMAINS_API_KEY"
[mcp_servers.agentdomains]
command = "npx"
args = ["-y", "agentdomains-mcp"]
env = { AGENTDOMAINS_API_KEY = "adom_YOUR_KEY" }
2. Tested First Prompt
Reload MCP tools in OpenAI Codex CLI. Run this prompt to check a name, claim it, and set routing.
Check availability of codex-demo on makes.fyi, claim it, and set_proxy to codex-demo.fly.dev.
3. OpenAI Codex CLI Setup Notes
- Codex CLI uses TOML (~/.codex/config.toml), not JSON — use bearer_token_env_var so secrets stay in your shell environment.
- Export AGENTDOMAINS_API_KEY in your shell before running codex so bearer_token_env_var resolves cleanly.
- In sandboxed approval modes, Codex will prompt before invoking outbound network MCP tools unless configured otherwise.
4. Available MCP Tools (20 total)
OpenAI Codex CLI gets all 20 tools across account auth, domain claims, DNS records, and edge routing.
Account & Auth 5 tools
Domains & Stats 6 tools
DNS & ACME 4 tools
Edge Proxy & Forward 5 tools
Frequently asked questions
Does OpenAI Codex CLI work with Streamable HTTP or stdio?
OpenAI Codex CLI supports Streamable HTTP & stdio. Pick hosted Streamable HTTP when available for zero local Node setup, or run npx -y agentdomains-mcp for stdio.
Where does OpenAI Codex CLI store its MCP config?
Store it in ~/.codex/config.toml. Keep your adom_ API key in an env var and never commit it to Git.
How much does it cost to claim domains from OpenAI Codex CLI?
Start with a 30-day free trial for 10 names with no card. Pro costs $10/yr or $1/mo for up to 100 names.
Related MCP Clients
Claude Code MCP Setup
Connect Claude Code via Streamable HTTP or stdio. Claim hostnames, write DNS records, and wire HTTPS proxies from your terminal.
Open-Source Terminal AgentOpenCode MCP Setup
Connect OpenCode to AgentDomains using opencode.json remote Streamable HTTP or local stdio configuration with env interpolation.
Open-Source CLI & Desktop AgentGoose (Block) MCP Setup
Add AgentDomains as a Goose extension with streamable_http or stdio to automate hostnames and DNS.
Aider MCP Setup
Pair Aider with the AgentDomains Go CLI via /run or an MCP wrapper to claim and proxy hostnames.
Claim your agent domain now
Start with 10 free HTTPS domains under agentdomains.co or makes.fyi for 30 days. Upgrade to Pro for $10/year to keep up to 100 names with visitor stats.