MCP Integration
MCP (Model Context Protocol) is the standard for connecting Codex to external systems. In-repo file work uses built-in tools; issue trackers, design tools, internal docs, and browsers usually come through MCP.
Architecture roles
An MCP server may expose:
- Tools — callable actions
- Resources — readable data
- Prompts — reusable prompt templates
Configuration
User-level: ~/.codex/config.toml
Project-level: .codex/config.toml (loads after trusting the project)
Typical stdio server
HTTP / Streamable HTTP
Field names vary by transport—see Configuration Reference.
Security: allowlist
Enterprise setups can restrict MCP to an allowlist:
Servers not allowlisted or failing identity checks are disabled.
Working with Skills
Anti-pattern: long “how to call GitHub API” prose in AGENTS.md
Better: Skill defines the workflow + MCP exposes create_issue, list_prs, etc.
Declare MCP dependencies in agents/openai.yaml for one-click install in the App.
Common scenarios
Migrating from Claude Code
Claude Code uses JSON (e.g. mcp-servers.json); Codex uses TOML. Same logic, different keys and structure. See Migrate to Codex.
Debugging tips
- Start the MCP server alone in a terminal; verify token and port
- Test in Codex with a read-only task:
List my open assigned issues - On failure, check
enabledandrequiredflags inconfig.toml
Next steps
- Subagents: dedicated agents with focused MCP sets
- Agent Skills: reference MCP tool names in Skills