Set up MCP servers in Codex CLI
Which configuration file format Codex CLI reads, what it is called and where it belongs – from the vendor’s own documentation, with source and collection date.
| File format | TOML with the table [mcp_servers.<name>]. |
|---|---|
| File name | config.toml |
Location
| all systems | ~/.codex/config.toml · .codex/config.toml |
|---|
Source: learn.chatgpt.com/docs/extend/mcp?surface=cli, retrieved on 2026-08-27
The root key
A file with the wrong root key is read and does nothing – without an error message. That is why the format is stated here next to the location.
Other clients read a different format: Claude Desktop, Claude Code, Cursor, Visual Studio Code, Windsurf. All clients side by side
Build a configuration for Codex CLI
The builder forms the block from the registry data of a chosen server and prints it in exactly the format Codex CLI reads.
Build a configuration for Codex CLI
What the builder can produce a file for
12,154 of the 26,983 published entries carry a package coordinate from which a published start template forms a block. The remaining 14,829 name no package or a source without a published template; for those the builder produces nothing and says why.
What is NOT stated here
This registry holds no statement about which server works with which client. No manifest declares a client list, and the registry invents none. What is stated here is the file format and its location according to the client’s own documentation – not a claim about a server.
Client knowledge version: 1
tracevero · https://tracevero.com/klient/codex