Codex MCP Server: Codex inside Claude Code

Codex MCP Server

An MCP server that hands tasks to the Codex CLI from inside Claude Code: code questions, change review, web search and resumable sessions

  • 647 ★ on the repository
  • Last commit
MCP server

Broad access

Why this level

  • The codex tool runs the Codex CLI, and the fullAuto and workspace-write sandbox options let it edit project files
  • Code and questions go to the OpenAI API under your key, and the costs are billed to it
All reasons and checks
Needs a VPN

tuannvm/codex-mcp-server

Install

In your terminal, with SkillFoxx CLI

npx skillfoxx add mcp/codex-mcp-server

Detects the agents on your machine, shows the access level and pins the version.

Other ways to install

Access and checks

How we review

Broad accessThe tool can change data, run commands or handle secrets.

  • The codex tool runs the Codex CLI, and the fullAuto and workspace-write sandbox options let it edit project files
  • Code and questions go to the OpenAI API under your key, and the costs are billed to it

This is third-party code. Review the repository files before installing.

What it does

Codex MCP Server connects Claude Code to the OpenAI Codex command line. The agent calls the server's tools, and the server runs the Codex CLI and returns its answer. The chain is Claude Code, the server, the Codex CLI, the OpenAI API. The codex tool takes a question or a coding task. Pass a sessionId and later calls continue the same conversation, while listSessions shows the active ones. You can also set the model (for example o3), reasoningEffort, fullAuto mode and the workspace-write sandbox. The review tool checks uncommitted changes, a branch against base, or a single commit. websearch searches the web through the Codex CLI, with numResults for the result count and searchDepth for depth. ping and help check the connection and print Codex CLI help. When the Codex CLI returns a threadId, the server puts it in the response metadata and in structuredContent.

Who it is for. For people working in Claude Code who want Codex's second opinion on code or a review without switching between two terminals.

Good fit when

  • You want Codex's second opinion on the same code fragment Claude Code just worked on
  • Before a commit you want uncommitted changes reviewed by Codex (the review tool with uncommitted true)
  • A pull request sits on a branch and the review must run against main (the base parameter)
  • A large refactor runs in several steps and the context must survive between calls through a shared sessionId
  • Hard analysis calls for the o3 model with high reasoningEffort instead of the default

Not a fit when

  • You have no OpenAI key or cannot sign in to the Codex CLI: the server needs it
  • You want Codex as a client that hosts other MCP servers. This works the other way round: Codex becomes a tool for Claude Code
  • Your Codex CLI is older than v0.75.0, which is the stated minimum
  • Company policy forbids sending code to the OpenAI API
  • You want a plugin with commands inside Claude Code; OpenAI ships an official plugin for that

Example request

Ask Codex to review my uncommitted changes and tell me what it found in the auth module

MCP

Transport
stdio
Authentication
API key

Environment variables

CODEX_MCP_CALLBACK_URI
Static MCP callback URI passed to Codex. The callbackUri tool argument overrides it.

Limitations

Requires Codex CLI 0.75.0 or newer and an OpenAI API key, signed in with codex login --api-key. Requests go to the OpenAI API and are billed there. The OpenAI API is not reachable from Russia without a VPN. GitHub shows no licence for the repository, while the README states ISC. The last commit is from May 25, 2026. The listSessions tool shows sessions of the current server instance only. Web search and review are performed by the Codex CLI itself, so their quality and token use depend on the chosen model. Detailed tool parameters are in docs/api-reference.md in the repository.

How to disable. Run claude mcp remove codex-cli. The Codex CLI itself is removed separately, for example with npm uninstall -g @openai/codex.

FAQ

How do I connect Codex to Claude Code over MCP?

Install the Codex CLI (npm i -g @openai/codex), sign in with codex login --api-key and run claude mcp add codex-cli -- npx -y codex-mcp-server. After that you can tell the agent to ask Codex or to run a review.

How do I add an MCP server to Codex itself?

This project solves the reverse task: Claude Code gets access to Codex. The repository has no steps for adding MCP servers to Codex. For Cursor and VS Code the README offers one-click install links.

Which tools does the server provide?

Six: codex for coding tasks, review for code review, websearch for web search, listSessions for the session list, ping for a connection check and help for Codex CLI help.

How do I continue a Codex conversation across calls?

Pass the same sessionId to the codex tool. The session is created on first use, listSessions will show it, and later calls resume the context.

What versions and requirements apply?

You need Codex CLI 0.75.0 or newer, installed with npm i -g @openai/codex or brew install codex, and an OpenAI API key to sign in. Starting with Codex 0.87 the server returns threadId in response metadata and in structuredContent.

Discussion

No questions or reviews yet.

A CLI that turns any MCP server, OpenAPI spec or GraphQL endpoint into commands at runtime, with no codegen

CLIBroad access2.4KRepository stars

A read-only MCP server for the HeyClaude registry: an agent finds skills, MCP servers and hooks and gets ready install commands

MCP serverExtended access304Repository stars

An MCP bridge: a single run_python tool runs code in a container and calls your MCP servers

MCP serverBroad access340Repository stars
Editors’ pick

OpenAI's coding agent that runs locally in your terminal, with IDE and desktop versions

CLIBroad access131.6KRepository stars
Needs a VPN

The /codex-workflows skill: Claude Code writes a script, dozens of Codex agents run it, and the run shows on a map

SkillBroad access327Repository stars

oh-my-codex

oh-my-codex (OMX)

Needs a VPN

A layer on top of Codex CLI: one flow from clarifying a task to verification, agent teams, hooks, a HUD and state in .omx/

CLIBroad access33.7KRepository stars

Comparison with similar tools

Entries that share the main search query, and how they differ.

EntryOfficialAuthenticationRepository starsMain difference
Codex MCP Server: Codex inside Claude Code (this entry)noAPI key647
Codex plugin for Claude Codeno34,699OpenAI's official plugin with commands inside Claude Code rather than an MCP server
skill-codexno1,468a skill that calls Codex from Claude Code without a separate server

README in short

The quick start has three steps: install the Codex CLI and sign in with a key, add the server to Claude Code, then write requests such as asking Codex to explain a function. The rest of the README covers the tool table, request examples, requirements and Codex 0.87 compatibility. Details sit in three files under docs: the API reference, session management and Codex CLI integration.

README badge

Report a problem

Foxx AICodex MCP Server: Codex inside Claude Code
Foxx AI

I am Foxx AI and I have already vetted this tool. Ask about install, setup or anything else, and I will keep it simple.