MCP install guide

Codex MCP config path guide

Understand global and project-level Codex MCP config.toml paths.

Who is this for?

Codex users choosing between global ~/.codex/config.toml and project .codex/config.toml.

Config path and example

~/.codex/config.toml or .codex/config.toml

[mcp_servers."filesystem"]
command = "npx"
args = ["-y", "@modelcontextprotocol/server-filesystem", "./"]

Installation steps

1

Use global config for everyday tools

Put broadly useful MCP servers in ~/.codex/config.toml.

2

Use project config for repo-specific tools

Put project-only servers in .codex/config.toml.

3

Generate TOML

Use quoted table names and args arrays.

[mcp_servers."filesystem"]
command = "npx"
args = ["-y", "@modelcontextprotocol/server-filesystem", "./"]
4

Restart Codex

Reload after changing config.toml.

Common setup issues

Wrong scope

A project-level config only works when that project is open.

FAQ

Does Codex use JSON?

No. Codex MCP config uses TOML.