Codex MCP Server logo

Codex MCP Server

Community
tuannvm

MCP server wrapper for OpenAI Codex CLI that enables Claude Code to leverage Codex's AI capabilities directly.

Publishertuannvm
Repositorycodex-mcp-server
LanguageTypeScript
Forks
80
Stars
641
Available tools
4
Transport typestdio
Categories
Links
  • Connect tools to AI workflows

    Codex MCP Server exposes MCP capabilities that can be used by compatible AI clients and agents.

  • 4 available tools

    Browse the callable actions below, including names and descriptions when provided by the server.

  • Ready-to-copy setup

    Use the installation snippets to configure this server in your preferred MCP client.

  • Open source signals

    641 stars and 80 forks from the linked repository.

Codex MCP Server

npm version npm downloads license

Bridge between Claude and OpenAI's Codex CLI — get AI-powered code analysis, generation, and review right in your editor.

Quick Start

1. Install Codex CLI

bash
npm i -g @openai/codex
codex login --api-key "your-openai-api-key"

2. Add to Claude Code

bash
claude mcp add codex-cli -- npx -y codex-mcp-server

3. Start Using

Ask codex to explain this function
Use codex to refactor this code for better performance
Use review to check my uncommitted changes

One-Click Install

VS Code VS Code Insiders Cursor

Tools

ToolDescription
codexAI coding assistant with session support, model selection, and structured output metadata
reviewAI-powered code review for uncommitted changes, branches, or commits
websearchWeb search using Codex CLI with customizable result count and search depth
listSessionsView active conversation sessions
pingTest server connection
helpGet Codex CLI help

Examples

Code analysis:

Use codex to analyze this authentication logic for security issues

Multi-turn conversations:

Use codex with sessionId "refactor" to analyze this module
Use codex with sessionId "refactor" to implement your suggestions

Passing a sessionId creates the session on first use, so listSessions will show it (for this server instance) and subsequent calls can resume context.

Code review:

Use review with base "main" to check my PR changes
Use review with uncommitted true to review my local changes

Advanced options:

Use codex with model "o3" and reasoningEffort "high" for complex analysis
Use codex with fullAuto true and sandbox "workspace-write" for automated tasks
Use codex with callbackUri "http://localhost:1234/callback" for static callbacks
Use codex to return structuredContent with threadId metadata when available

Web search:

Use websearch with query "TypeScript 5.8 new features"
Use websearch with query "Rust vs Go performance 2025" and numResults 15
Use websearch with query "React Server Components" and searchDepth "full"

Requirements

  • Codex CLI v0.75.0+ — Install with npm i -g @openai/codex or brew install codex
  • OpenAI API key — Run codex login --api-key "your-key" to authenticate

Codex 0.87 Compatibility

  • Thread ID + structured output: When Codex CLI emits threadId, this server returns it in content metadata and structuredContent, and advertises an outputSchema for structured responses.

Documentation

Environment Variables

  • CODEX_MCP_CALLBACK_URI: Static MCP callback URI passed to Codex when set (overridden by callbackUri tool arg)

Development

bash
npm install    # Install dependencies
npm run dev    # Development mode
npm run build  # Build for production
npm test       # Run tests

Related Projects

  • gemini-mcp-server — MCP server for Gemini CLI with 1M+ token context, web search, and media analysis
  • Clotch — Dynamic Island for Claude Code on macOS — monitor sessions across multiple machines and providers in real time

License

ISC

Installation

TypingMind
{
  "mcpServers": {
    "codex-mcp-server": {
      "command": "npx",
      "args": [
        "-y",
        "codex-mcp-server"
      ]
    }
  }
}

Available Tools

  • codex

    Execute Codex CLI in non-interactive mode for AI assistance

  • ping

    Test MCP server connection

  • help

    Get Codex CLI help information

  • listSessions

    List all active conversation sessions with metadata

Use Codex MCP Server MCP with multiple AI models

TypingMind connects MCP tools at the workspace level, so once Codex MCP Server is connected, you can use it with different AI models in TypingMind instead of setting it up separately for each model. This MCP runs locally through the TypingMind MCP connector on your device.

Setup guide to use the local connector

Use this when the MCP server needs access to local files, apps, or private resources on your computer.

1

Open the MCP settings

In TypingMind, go to Settings, Advanced Settings, then Model Context Protocol and choose Setup Connector.

  1. Open TypingMind in your browser.
  2. Click the Settings icon.
  3. Go to Advanced Settings.
  4. Open the Model Context Protocol section.
  5. Click Setup Connector and choose This Device.
TypingMind MCP connector setup screen with This Device selected
2

Run the connector command

Choose This Device, copy the command from TypingMind, and run it in Terminal. Keep the process running while you use MCP.

  1. Copy the setup command shown by TypingMind.
  2. Open Terminal on macOS or Windows Terminal on Windows.
  3. Paste and run the command.
  4. Approve the package install if Terminal asks you to proceed.
  5. Keep the Terminal window running while using MCP tools.
3

Add Codex MCP Server as a server

When the connector status is Ready, click Edit Servers and paste the MCP server configuration.

  1. Wait until the connector status shows Ready.
  2. Click Edit Servers.
  3. Paste the Codex MCP Server MCP server configuration.
  4. Save the server list.
  5. Refresh if you want to confirm the connector is still ready.
TypingMind MCP settings showing active server and Edit Servers button
{
  "mcpServers": {
    "codex-mcp-server": {
      "command": "npx",
      "args": [
        "-y",
        "codex-mcp-server"
      ]
    }
  }
}
4

Use it across models

Save the server list, open Plugins, enable the Codex MCP Server MCP tools, then select any supported AI model in TypingMind and use the tools in chat or assign them to an AI agent.

  1. Open the Plugins page in TypingMind.
  2. Enable the Codex MCP Server MCP tools.
  3. Start a chat and choose the AI model you want to use.
  4. Use the MCP tools in chat or assign them to an AI agent.
  5. Switch to another AI model whenever needed without reconnecting MCP.
TypingMind chat using enabled MCP tools with a selected AI model
Can you use Codex MCP Server to help me with this task?
Codex MCP Server
Sure. I read it.
Here is what I found using Codex MCP Server.

Frequently asked questions

What is the Codex MCP Server MCP server used for?

Codex MCP Server is an MCP server that lets compatible AI clients connect to external tools and context. In TypingMind, you can add this MCP server once and make its tools available in your AI workspace.

Can I use Codex MCP Server MCP with multiple AI models in TypingMind?

Yes. TypingMind connects MCP tools at the workspace level, so you can use Codex MCP Server with different AI models such as Claude, ChatGPT, Gemini, or other models you have configured in TypingMind without setting up the MCP server separately for each model.

Why use Codex MCP Server MCP with TypingMind?

TypingMind is one of the best frontends for LLM chat because it brings multiple AI models, prompts, plugins, AI agents, API keys, and MCP tools into one workspace. With Codex MCP Server connected, you can use its MCP tools across your preferred models while keeping your chat workflow organized in TypingMind.

How do I connect Codex MCP Server MCP to TypingMind?

Codex MCP Server runs through the TypingMind local MCP connector. This is best when the MCP server needs access to local files, desktop apps, command-line tools, or private resources on your computer.

What tools does Codex MCP Server MCP provide in TypingMind?

Codex MCP Server exposes 4 MCP tools that can be enabled from the TypingMind Plugins page and used in chat or assigned to AI agents.

Do I need to share my API keys with TypingMind to use Codex MCP Server MCP?

No. TypingMind is local-first and lets you keep your model providers, API keys, prompts, and MCP configuration under your control. If Codex MCP Server requires authentication, add the required headers, OAuth settings, or local configuration for that MCP server when you create the connection.

Related MCP Servers

View all

Set up your own AI workspace now

Get notified about new features and future giveaways by subscribing to our newsletter 👇