MCP Integration
Connect Codex to MCP servers with explicit tool, data, and trust boundaries.
Key takeaways
- MCP expands what Codex can see and do, which makes it valuable for enterprise workflows and risky when tool permissions are vague.
- Decide server scope, tool allowlist, data exposure, auth model, and audit trail before connecting a server.
- Prefer read-only resources first, gate write or side-effect tools behind approval, and mask secrets and customer data by default.
- Audit plugins and servers with
codex plugin list --json,--available --json, andcodex plugin marketplace list --json, and treat JSON Schema fixtures (with preservedoneOf/allOf) as part of the MCP contract. - Any tool that could change money, permissions, customer records, or production state needs human approval and audit evidence.
MCP expands what Codex can see and do. That makes it useful for enterprise workflows and risky when tool permissions are vague.
Integration Decisions
| Decision | Question |
|---|---|
| Server scope | Which workspace or team may use it? |
| Tool allowlist | Which tools are safe for Codex to call? |
| Data exposure | What sensitive data can be returned? |
| Auth model | User OAuth, service token, or scoped credential? |
| Audit trail | Where are tool calls recorded? |
Tool Policy
- Prefer read-only resources first.
- Gate write or side-effect tools with approval.
- Return structured data instead of broad text dumps.
- Mask secrets and customer data by default.
- Version tool schemas and document breaking changes.
Current Codex Notes
- Use
codex plugin list --json,codex plugin list --available --json, andcodex plugin marketplace list --jsonfor plugin/MCP inventory audits. - Tool and connector input schemas now preserve
oneOfandallOf, and large schemas keep more shallow structure when compacted. Treat JSON Schema fixtures as part of the MCP contract. - MCP startup warnings from subagents are scoped to the owning thread, so monitoring should record parent and child thread identifiers separately.
- Track
marketplaceSource, bundled hooks, remote MCP servers, install policy, and auth policy when approving plugins. - App and app-server surfaces can show richer MCP server state; do not collapse "missing", "disabled", "auth required", and "no tools" into the same operational error.
- Treat marketplace install/upgrade output as release evidence and preserve selected/upgraded/error fields in automation logs.
Review Checklist
If a tool could change money, permissions, customer records, or production state, it needs human approval and audit evidence.