---
title: "Codex MCP servers: config.toml and team setup | Bombos"
description: "Codex reads MCP servers from config.toml, shared by the CLI, IDE extension and desktop app. The old codex mcp-server command has been removed."
image: "https://bombos.ai/assets/og-en-v2.png"
---

# How do you add MCP servers to Codex, and can Codex still run as an MCP server?

Short answer

Codex reads MCP servers from config.toml: ~/.codex/config.toml for you, or .codex/config.toml in a trusted project for the team. You add one with codex mcp add or a \[mcp\_servers.<name>\] table, and sign in with codex mcp login. The ChatGPT desktop app, Codex CLI and IDE extension share this configuration. Running Codex itself as an MCP server is no longer possible: OpenAI removed the codex mcp-server command.

*Piet Baudoin · published November 17, 2026 · November 17, 2026*

## Adding MCP servers to Codex

Codex keeps its MCP servers in `config.toml`. One file serves the Codex CLI, the IDE extension and the ChatGPT desktop app, so you set a server up once.

| File | Applies to | Note |
| --- | --- | --- |
| `~/.codex/config.toml` | You, in every project | The default |
| `.codex/config.toml` in the repo | Everyone working in that project | Only read in trusted projects |

From the command line:

```
codex mcp add mytool --env API_KEY=... -- npx -y some-mcp-server
codex mcp list
codex mcp login notion
```

`codex mcp login` handles OAuth for remote servers; add `--no-browser` on a machine without a browser.

Or write the table yourself. A remote server looks like this:

```
[mcp_servers.github]
url = "https://api.githubcopilot.com/mcp/"
bearer_token_env_var = "GITHUB_TOKEN"
```

The keys worth knowing, as of November 2026:

| Key | For | What it does |
| --- | --- | --- |
| `command`, `args`, `env`, `cwd` | Local (stdio) servers | Starts the server as a process |
| `url`, `bearer_token_env_var`, `http_headers`, `env_http_headers` | Remote (Streamable HTTP) servers | Where to connect and how to authenticate, with the token read from an environment variable |
| `enabled_tools`, `disabled_tools` | Both | Limit which tools the model sees |
| `default_tools_approval_mode`, `tools.<tool>.approval_mode` | Both | Whether calls need approval |
| `startup_timeout_sec`, `tool_timeout_sec` | Both | Defaults 10 and 60 seconds |
| `required` | Both | Treat the server as required |

## Setting it up for a team

1.  **Put shared servers in `.codex/config.toml`** in the repository and commit it. Each developer marks the project as trusted; untrusted projects ignore the file.
2.  **Keep tokens in environment variables** with `bearer_token_env_var` or `env_http_headers`, never as literal values in the file.
3.  **Prefer remote servers with OAuth**, so each person signs in with `codex mcp login` as themselves.
4.  **Trim the tools.** `enabled_tools` keeps the model’s tool list short and stops write tools you did not intend.
5.  **Enterprise admins** can enforce MCP requirements for local executors through managed configuration; OpenAI’s MCP page refers to this but does not detail it.

## The common misunderstanding: Codex as an MCP server

Many guides from 2025 and early 2026 show `codex mcp-server`, which turned Codex itself into an MCP server with tools such as `codex` and `codex-reply`, so another agent could hand it coding tasks. That command is gone. OpenAI’s documentation now states that `codex mcp-server` and the standalone `codex-mcp-server` binary have been removed, and that the old tool reference and Agents SDK examples are no longer supported.

The suggested replacement is the Codex app server, for integrations that need authentication, conversation history, approvals and streamed agent events. OpenAI is explicit that it is not an MCP server and not a drop-in replacement, and that it is experimental and not supported for production workloads. If you built a multi-agent setup around `codex mcp-server`, plan for a rewrite rather than a config change.

The app server does give an integration its own MCP handling: `mcpServerStatus/list` lists MCP servers, tools, resources and auth status, `mcpServer/tool/call` calls a tool on a thread’s configured MCP server, and `mcpServer/oauth/login` starts an OAuth login and returns an authorization URL. The docs also warn that the WebSocket transport is experimental and that non-loopback WebSocket listeners currently allow unauthenticated connections by default during rollout, so configure WebSocket authentication before exposing one remotely.

## What this means for a team

A team where some people use Codex and others use Claude Code or Cursor needs the same servers in three formats: `config.toml`, `.mcp.json` and `.cursor/mcp.json`. The servers are shared; the files and the setup are not. See [MCP servers in Claude Code for a team](https://bombos.ai/en/questions/mcp/claude-code-mcp-servers-for-a-team/) and [Cursor MCP servers](https://bombos.ai/en/questions/mcp/cursor-mcp-server/).

What MCP does not give Codex is memory of earlier work. Instructions live in AGENTS.md; what one developer’s Codex session learned does not reach a colleague’s. Read [what AGENTS.md is and how Codex reads it](https://bombos.ai/en/questions/codex/what-is-agents-md-and-how-does-codex-read-it/) and [does Codex remember previous work](https://bombos.ai/en/questions/codex/does-codex-remember-previous-work-and-can-a-team-share-it/).

## Where Bombos fits

Bombos is one MCP server you add to Codex, and to Claude Code, Cursor, Copilot and your other AI tools in the same way, so they share one memory: team knowledge, rules the AI learned from corrections, and what already sits in repos, documents and mail, with a trail of what each answer rests on. It runs in our cloud or on your own server, and one developer can try it first with their own agents.

## Related questions

Where is the Codex MCP configuration?

In config.toml. The default is ~/.codex/config.toml; a project can have its own .codex/config.toml, which Codex only reads in trusted projects.

Can I still run codex mcp-server?

No. OpenAI's documentation says the codex mcp-server command and the standalone codex-mcp-server binary have been removed, along with the old Agents SDK examples.

What replaces Codex as an MCP server?

OpenAI points to the Codex app server for integrations that need authentication, conversation history, approvals and streamed events. It uses a different protocol, is not an MCP server, and is marked experimental.

How do I limit which tools of an MCP server Codex can use?

Use enabled\_tools and disabled\_tools in the server's table; disabled\_tools is applied after enabled\_tools. You can also set an approval mode per tool.

Do I need to configure MCP separately for the Codex CLI and the IDE extension?

No. According to OpenAI, the ChatGPT desktop app, Codex CLI and IDE extension share the same MCP configuration.

## Sources

1.  [MCP in Codex (OpenAI docs)](https://learn.chatgpt.com/docs/extend/mcp?surface=cli)
2.  [Codex MCP server, removal notice (OpenAI docs)](https://learn.chatgpt.com/docs/mcp-server)
3.  [Codex App Server (OpenAI docs)](https://learn.chatgpt.com/docs/app-server)

## What does your AI forget?

1.  01You tell us which AI you use and where it keeps starting over.
2.  02We show what a shared memory changes there, on your own examples.
3.  03You keep the plan, with or without Bombos.

![Piet Baudoin](https://bombos.ai/assets/team/piet-klein.jpg)

**Piet Baudoin**You talk to Piet, from the Bombos teamDutch team from Utrecht and Nijmegen · data in Europe

## More questions about MCP

-   [How do you add MCP servers to Claude Code and share them with your team?](https://bombos.ai/en/questions/mcp/claude-code-mcp-servers-for-a-team/)
-   [What is an MCP server?](https://bombos.ai/en/questions/mcp/what-is-an-mcp-server/)
-   [How do you set up MCP servers in Cursor for a whole team?](https://bombos.ai/en/questions/mcp/cursor-mcp-server/)
-   [Where do you find MCP servers, and which can you trust?](https://bombos.ai/en/questions/mcp/where-to-find-trustworthy-mcp-servers/)
-   [What is an MCP memory server and how does it work?](https://bombos.ai/en/questions/mcp/what-is-an-mcp-memory-server/)
-   [What is the Context7 MCP server, and what does it not do for a team?](https://bombos.ai/en/questions/mcp/context7-mcp-server/)
-   [What is the Datadog MCP server and how do you set it up for a team?](https://bombos.ai/en/questions/mcp/datadog-mcp-server/)
-   [What does the Figma MCP server give a coding agent, and which seat do you need?](https://bombos.ai/en/questions/mcp/figma-mcp-server/)

[All questions about MCP →](https://bombos.ai/en/questions/mcp/)


---

```json
{"@context":"https://schema.org","@graph":[{"@type":"Organization","@id":"https://bombos.ai/#organization","name":"Bombos","url":"https://bombos.ai/","logo":"https://bombos.ai/assets/bombos-bee.png","description":"Bombos is the memory layer under every AI your team uses. One shared memory for Claude, ChatGPT, Copilot, Cursor and your own agents, that learns how you work.","sameAs":["https://www.linkedin.com/company/bombos-ai","https://www.youtube.com/@truebombos","https://www.instagram.com/truebombos/","https://bsky.app/profile/bombostrue.bsky.social","https://www.threads.com/@truebombos","https://mastodon.social/@Bombos","https://www.tiktok.com/@truebombos","https://t.me/truebombos","https://www.pinterest.com/truebombos/","https://github.com/bombos-ai","https://linktr.ee/bombos.ai","https://bombosai.substack.com","https://hashnode.com/@bombosai","https://hackernoon.com/u/bombos","https://dev.to/bombos"],"email":"info@bombos.ai","areaServed":["NL","Europe"],"knowsLanguage":["nl","en"],"contactPoint":{"@type":"ContactPoint","email":"info@bombos.ai","contactType":"sales","url":"https://bombos.ai/en/contact/","availableLanguage":["nl","en"]}},{"@type":"WebSite","@id":"https://bombos.ai/#website","name":"Bombos","url":"https://bombos.ai/","inLanguage":["nl-NL","en"],"publisher":{"@id":"https://bombos.ai/#organization"}}]}

{"@context":"https://schema.org","@type":"Article","headline":"How do you add MCP servers to Codex, and can Codex still run as an MCP server?","description":"Codex reads MCP servers from config.toml, shared by the CLI, IDE extension and desktop app. The old codex mcp-server command has been removed.","abstract":"Codex reads MCP servers from config.toml: ~/.codex/config.toml for you, or .codex/config.toml in a trusted project for the team. You add one with codex mcp add or a [mcp_servers.<name>] table, and sign in with codex mcp login. The ChatGPT desktop app, Codex CLI and IDE extension share this configuration. Running Codex itself as an MCP server is no longer possible: OpenAI removed the codex mcp-server command.","datePublished":"2026-11-17T00:00:00.000Z","dateModified":"2026-11-17T00:00:00.000Z","author":{"@type":"Person","name":"Piet Baudoin"},"publisher":{"@type":"Organization","@id":"https://bombos.ai/#organization","name":"Bombos","logo":{"@type":"ImageObject","url":"https://bombos.ai/assets/bombos-bee.png"}},"image":"https://bombos.ai/assets/og-en-v2.png","mainEntityOfPage":"https://bombos.ai/en/questions/mcp/codex-mcp-server/","inLanguage":"en-US","isPartOf":{"@type":"CollectionPage","name":"MCP","url":"https://bombos.ai/en/questions/mcp/"},"citation":[{"@type":"CreativeWork","name":"MCP in Codex (OpenAI docs)","url":"https://learn.chatgpt.com/docs/extend/mcp?surface=cli"},{"@type":"CreativeWork","name":"Codex MCP server, removal notice (OpenAI docs)","url":"https://learn.chatgpt.com/docs/mcp-server"},{"@type":"CreativeWork","name":"Codex App Server (OpenAI docs)","url":"https://learn.chatgpt.com/docs/app-server"}]}

{"@context":"https://schema.org","@type":"BreadcrumbList","itemListElement":[{"@type":"ListItem","position":1,"name":"Bombos","item":"https://bombos.ai/en/"},{"@type":"ListItem","position":2,"name":"Questions","item":"https://bombos.ai/en/questions/"},{"@type":"ListItem","position":3,"name":"MCP","item":"https://bombos.ai/en/questions/mcp/"},{"@type":"ListItem","position":4,"name":"How do you add MCP servers to Codex, and can Codex still run as an MCP server?","item":"https://bombos.ai/en/questions/mcp/codex-mcp-server/"}]}

{"@context":"https://schema.org","@type":"FAQPage","mainEntity":[{"@type":"Question","name":"Where is the Codex MCP configuration?","acceptedAnswer":{"@type":"Answer","text":"In config.toml. The default is ~/.codex/config.toml; a project can have its own .codex/config.toml, which Codex only reads in trusted projects."}},{"@type":"Question","name":"Can I still run codex mcp-server?","acceptedAnswer":{"@type":"Answer","text":"No. OpenAI's documentation says the codex mcp-server command and the standalone codex-mcp-server binary have been removed, along with the old Agents SDK examples."}},{"@type":"Question","name":"What replaces Codex as an MCP server?","acceptedAnswer":{"@type":"Answer","text":"OpenAI points to the Codex app server for integrations that need authentication, conversation history, approvals and streamed events. It uses a different protocol, is not an MCP server, and is marked experimental."}},{"@type":"Question","name":"How do I limit which tools of an MCP server Codex can use?","acceptedAnswer":{"@type":"Answer","text":"Use enabled_tools and disabled_tools in the server's table; disabled_tools is applied after enabled_tools. You can also set an approval mode per tool."}},{"@type":"Question","name":"Do I need to configure MCP separately for the Codex CLI and the IDE extension?","acceptedAnswer":{"@type":"Answer","text":"No. According to OpenAI, the ChatGPT desktop app, Codex CLI and IDE extension share the same MCP configuration."}}]}
```
