Codex MCP Server
An open-source Model Context Protocol server that bridges MCP clients (Claude Desktop, Cursor, Poke, etc.) with the running on your machine.
Power your agent
Install from the publisher. Not a PlugMCP endpoint.
Host a copy with our keys and logs.
No packaged release in the registry yet. Follow the repository README.
Remote URL or a command on your machine? How the two installs differ
Run on PlugMCP
A new server you create. It is not this listing's official endpoint. Use the publisher install when you want their URL and their credentials.
LaunchFrom the publisher
An open-source Model Context Protocol server that bridges MCP clients (Claude Desktop, Cursor, Poke, etc.) with the running on your machine.
Model Context Protocol (MCP) server for programmatic integration with OpenAI Codex agent threads, tasks, and history.
Run coding tasks, manage conversation threads, fork sessions, and browse historical rolls — all through standard MCP tooling.
codex doctorgit clone https://github.com/4dhxm/codex-mcp-server.git
cd codex-mcp-server
npm install
npm run build
For MCP clients running on the same machine (like Claude Desktop or Cursor).
node dist/index.js
Add to your Claude Desktop config (~/Library/Application Support/Claude/claude_desktop_config.json):
{
"mcpServers": {
"codex": {
"command": "node",
"args": ["/absolute/path/to/codex-mcp-server/dist/index.js"]
}
}
}
For exposing your local Codex installation to remote MCP clients (like Poke or a remote device) without dealing with routers or ngrok warning pages.
Dependency: You must have cloudflared installed. On macOS:
brew install cloudflared
node dist/index.js --http --tunnel
This starts the server and automatically spawns a free, highly-stable Cloudflare Quick Tunnel.
You can also explicitly set your API key:
node dist/index.js --http --tunnel --api-key my-secret-token
You will see output like this:
==============================================
🌐 Cloudflare tunnel established successfully!
Public URL: https://some-random-words.trycloudflare.com
MCP URL: https://some-random-words.trycloudflare.com/mcp
==============================================
Connect from your remote MCP client:
URL: https://some-random-words.trycloudflare.com/mcp
Type: Streamable HTTP
Auth: Bearer <your-api-key>
To run over HTTP without a public tunnel (for your local network):
node dist/index.js --http --port 8080
API key auth is enabled by default for HTTP mode to protect your local machine from unauthorized remote access.
Provide a key via --api-key <key> flag or CODEX_MCP_API_KEY env var. If neither is set, a random secure key is generated and printed on startup.
How clients send the key — any of these work:
The server intentionally avoids returning WWW-Authenticate headers to prevent MCP clients from attempting OAuth flows, ensuring simple Bearer token auth works cleanly.
Model Context Protocol (MCP) server for programmatic integration with OpenAI Codex agent threads, tasks, and history.
Tools
No tool list yet. Remote servers get one after the first health check.
FAQ
Copy the stdio config for Cursor, Claude Desktop, Claude Code, or VS Code on this page. It uses the publisher's install, not a PlugMCP proxy.
No required environment variable is listed on this record.
Codex runs locally over stdio.
Last checked 2026-10-26. Model Context Protocol (MCP) server for programmatic integration with OpenAI Codex agent threads, tasks, and history.