Codex MCP: Connect Tools and Verify the Setup
MCP connects Codex to an external server’s tools. A skill describes a workflow; AGENTS.md holds project rules. Neither installs a server or grants account access. OSS Agent Playbook shows how to organize project instructions.
Connect a documentation server
OpenAI’s public server lets you test MCP without work data:
codex mcp add openaiDeveloperDocs --url https://developers.openai.com/mcp
codex mcp list
Alternatively, add this to ~/.codex/config.toml:
[mcp_servers.openaiDeveloperDocs]
url = "https://developers.openai.com/mcp"
Use one method. Check the saved entry with codex mcp get openaiDeveloperDocs; do not publish output containing authentication details.
After changing MCP configuration, start a new CLI session and open /mcp. Ask the agent to find and read the official MCP documentation. Verify an actual tool call and a link to the source: a server list entry alone does not establish a working connection.
Choose transport and access
- STDIO: Codex starts a local process. Check its executable, arguments, working directory, environment, and diagnostic logs.
- Streamable HTTP: check the URL, TLS, authentication, and permissions. For a server supporting OAuth, use
codex mcp login <server-name>; bearer tokens can come from environment variables.
Start with a read operation and minimal permissions. Keep secrets out of examples and Git. Establish which machine owns a file tool and which profile a browser tool uses: matching paths or names do not guarantee the correct environment.
To test writing, create a small test object and read it back. For publishing, open the final URL and check its content. Queue acceptance does not confirm completion.
Diagnose failures
- Process does not start: check the command, dependencies, directory, and environment variables.
- 401/403: check the account, token expiry, and permissions. Restarting does not expand access.
- Timeout: check the server and its dependencies; increase the wait only for a known reason.
- Response without a visible result: reread the object and check the environment and processing queue.
An error report needs the operation, expected and actual result, and reproduction steps—not tokens or private responses.
Syntax checked on November 2, 2026: OpenAI documentation server, Codex CLI MCP, skills. Check codex mcp --help for your installed version.