mcp.md +14 −4
1# Model Context Protocol1# Model Context Protocol
2 2
3Give Codex access to third-party tools and context
4
5Model Context Protocol (MCP) connects models to tools and context. Use it to give Codex access to third-party documentation, or to let it interact with developer tools like your browser or Figma.3Model Context Protocol (MCP) connects models to tools and context. Use it to give Codex access to third-party documentation, or to let it interact with developer tools like your browser or Figma.
6 4
7Codex supports MCP servers in both the CLI and the IDE extension.5Codex supports MCP servers in both the CLI and the IDE extension.
77- `enabled_tools` (optional): Tool allow list.75- `enabled_tools` (optional): Tool allow list.
78- `disabled_tools` (optional): Tool deny list (applied after `enabled_tools`).76- `disabled_tools` (optional): Tool deny list (applied after `enabled_tools`).
79 77
8078If your OAuth provider requires a static callback URI, set the top-level `mcp_oauth_callback_port` in `config.toml`. If unset, Codex binds to an ephemeral port.If your OAuth provider requires a fixed callback port, set the top-level `mcp_oauth_callback_port` in `config.toml`. If unset, Codex binds to an ephemeral port.
79
80If your MCP OAuth flow must use a specific callback URL (for example, a remote devbox ingress URL or a custom callback path), set `mcp_oauth_callback_url`. Codex uses this value as the OAuth `redirect_uri` while still using `mcp_oauth_callback_port` for the callback listener port. Local callback URLs (for example `localhost`) bind on loopback; non-local callback URLs bind on `0.0.0.0` so the callback can reach the host.
81
82If the MCP server advertises `scopes_supported`, Codex prefers those
83server-advertised scopes during OAuth login. Otherwise, Codex falls back to the
84scopes configured in `config.toml`.
81 85
82#### config.toml examples86#### config.toml examples
83 87
90MY_ENV_VAR = "MY_ENV_VALUE"94MY_ENV_VAR = "MY_ENV_VALUE"
91```95```
92 96
97```toml
98# Optional MCP OAuth callback overrides (used by `codex mcp login`)
99mcp_oauth_callback_port = 5555
100mcp_oauth_callback_url = "https://devbox.example.internal/callback"
101```
102
93```toml103```toml
94[mcp_servers.figma]104[mcp_servers.figma]
95url = "https://mcp.figma.com/mcp"105url = "https://mcp.figma.com/mcp"
111 121
112The list of MCP servers keeps growing. Here are a few common ones:122The list of MCP servers keeps growing. Here are a few common ones:
113 123
114124- [OpenAI Docs MCP](/resources/docs-mcp): Search and read OpenAI developer docs.- [OpenAI Docs MCP](/learn/docs-mcp): Search and read OpenAI developer docs.
115- [Context7](https://github.com/upstash/context7): Connect to up-to-date developer documentation.125- [Context7](https://github.com/upstash/context7): Connect to up-to-date developer documentation.
116- Figma [Local](https://developers.figma.com/docs/figma-mcp-server/local-server-installation/) and [Remote](https://developers.figma.com/docs/figma-mcp-server/remote-server-installation/): Access your Figma designs.126- Figma [Local](https://developers.figma.com/docs/figma-mcp-server/local-server-installation/) and [Remote](https://developers.figma.com/docs/figma-mcp-server/remote-server-installation/): Access your Figma designs.
117- [Playwright](https://www.npmjs.com/package/@playwright/mcp): Control and inspect a browser using Playwright.127- [Playwright](https://www.npmjs.com/package/@playwright/mcp): Control and inspect a browser using Playwright.