Codex

MCP: connect external tools

MCP concepts, configuration, commands and diagnostics for external tools and data.

MCP, the Model Context Protocol, lets Codex use external tools and data beyond reading and editing code. Configuration lives in ~/.codex/config.toml alongside the Passion8 provider settings.

Ordinary coding does not require MCP. Add it when a task needs external documentation, databases, design files or another tool.

#What MCP means

ConceptMeaning
MCPStandard interface for external tools
MCP serverService exposing capabilities
ToolOne callable operation
STDIO serverService started by a local command
HTTP serverRemote service reached by URL

Codex is the worker, MCP the connection, a server the toolbox and a tool one operation in it.

#Common uses

TaskExample
API documentationContext7 or official documentation MCP
Database schemaDatabase MCP
Issues and PRsGitHub MCP
Design filesFigma MCP
Knowledge baseNotion MCP
Web interactionBrowser MCP

#Add an MCP server

Open Settings → MCP servers and select a recommended server or add a custom server:

FieldPurpose
NameYour label for the service
Command / URLLocal startup command or remote address
Typestdio or HTTP
EnvironmentRequired variables such as credentials
Enabled toolsOperations exposed to the agent

Then describe the task naturally, or explicitly ask it to use the selected tool, such as Context7 for current Next.js documentation.

MCP server settings

#Command reference

CommandPurpose
codex mcp listList configured servers
codex mcp add NAME -- COMMANDAdd a STDIO server
codex mcp remove NAMERemove a server
codex mcp get NAMEInspect server details
codex mcp login NAMEAuthorize a remote server that requires OAuth
codex mcp logout NAMEClear that remote authorization

MCP server authorization is separate from Passion8 model authentication.

#config.toml example

Add this alongside the provider configuration:

~/.codex/config.toml
# Other model and provider settings remain above/beside this table.
[mcp_servers.context7]
command = "npx"
args = ["-y", "@upstash/context7-mcp"]

If unfamiliar with TOML, use the add/list/remove commands to avoid syntax mistakes.

#Missing tools: diagnostic order

  1. Use codex mcp list to confirm the server exists.
  2. Check command dependencies such as Node.js and npx.
  3. Authorize remote servers with codex mcp login only when they require that authentication method.
  4. Restart the CLI and inspect /mcp again.

Start with a documentation service before adding remote tools with broader account access.

#Continue reading

Support

Need help?

For setup, billing, or model issues, email us. Check the status page for uptime.

WeChat / QQ support is available at the bottom right.