Skip to content

Codex

Codex keeps MCP servers in a TOML config shared by the CLI and the IDE extension. Add servers with codex mcp add or edit the file directly.

Setup

  1. Run the command below, or add the TOML to ~/.codex/config.toml.
  2. Sign in with codex mcp login linear.
  3. Start codex and type /mcp to see the server's tools.
Terminal
codex mcp add linear --url https://mcp.linear.app/mcp
~/.codex/config.toml
[mcp_servers.linear]
url = "https://mcp.linear.app/mcp"

Prefer read-only? Use https://mcp.linear.app/mcp/readonly.

  1. Run the command below, or add the TOML to ~/.codex/config.toml.
  2. Start codex and type /mcp to see the server's tools.
Terminal
codex mcp add filesystem -- npx -y @modelcontextprotocol/server-filesystem /path/to/allowed/folder
~/.codex/config.toml
[mcp_servers.filesystem]command = "npx"args = ["-y", "@modelcontextprotocol/server-filesystem", "/path/to/allowed/folder"]

Replace the path. You can pass several folders, and the server can't access anything outside them.

Good to know

  • Run codex mcp list to see configured servers, and codex mcp login <name> to sign in to OAuth servers.
  • Use bearer_token_env_var to read a token from your environment instead of writing secrets into the config.
  • Tune startup_timeout_sec (default 10) and tool_timeout_sec (default 60) for slow servers.
  • Limit what a server exposes with enabled_tools or disabled_tools.
Config file:~/.codex/config.toml.codex/config.toml

Works with 76 servers

Other apps

Esc
↑↓ navigate↵ open