Connect Codex to OpenAI Developer Docs via MCP

You can now easily integrate Codex with OpenAI’s developer documentation through OpenAI’s official MCP server, directly from your CLI or IDE extension. Setup is shared, so you only need to do it once.

Below are the commands for adding the Docs MCP server to Codex. For instructions how to add it to VS Code or Cursor follow the quick guide in the official announcement.

Add the server using the Codex CLI:

codex mcp add openaiDeveloperDocs --url https://developers.openai.com/mcp

Confirm your configuration:

codex mcp list

Or manually configure it by editing your ~/.codex/config.toml:

[mcp_servers.openaiDeveloperDocs]
url = “https://developers.openai.com/mcp”

To have Codex reliably use the MCP server, add this snippet to your AGENTS.md:

Always use the OpenAI developer documentation MCP server if you need to work with the OpenAI API, ChatGPT Apps SDK, Codex,… without me having to explicitly ask.

Happy coding and why not try one-shotting an app tonight?

7 Likes