Codex MCP Tool
๐ โ๏ธ - MCP server that connects your IDE or AI assistant to Codex CLI for code analysis and editing with support for multiple models (gpt-5-codex, o3, codex-1)
What is Codex MCP Tool?
Codex MCP Tool is a Model Context Protocol (MCP) server that allows AI assistants like Claude, Cursor, and VS Code to ๐ โ๏ธ - mcp server that connects your ide or ai assistant to codex cli for code analysis and editing with support for multiple models (gpt-5-codex, o3, codex-1)
๐ โ๏ธ - MCP server that connects your IDE or AI assistant to Codex CLI for code analysis and editing with support for multiple models (gpt-5-codex, o3, codex-1)
This server falls under the Developer Tools category on MCPgee, the world's largest MCP server directory with 33,000+ servers.
Features
- ๐ โ๏ธ - MCP server that connects your IDE or AI assistant to
Use Cases
Maintainer
Works with
Installation
NPM
npx -y @trishchuk/codex-mcp-toolManual Installation
npx -y @trishchuk/codex-mcp-toolConfiguration
Configuration Details
claude_desktop_config.json
Performance
Response Metrics
Resource Usage
How to Set Up and Use Codex MCP Tool
Codex MCP Tool is a TypeScript MCP server that connects Claude Desktop, Cursor, and other MCP-compatible clients to OpenAI's Codex CLI, enabling AI-assisted code analysis, multi-turn conversations with session continuity, sandboxed code execution, and web search directly from your AI assistant. It supports multiple OpenAI models (gpt-5.5, gpt-5.4, gpt-5.4-mini, gpt-5.3-codex), local OSS models via Ollama or LM Studio, and exposes structured tools for file analysis using @ references, brainstorming with design frameworks, and session management.
Prerequisites
- Node.js 18 or higher installed
- OpenAI Codex CLI installed and authenticated (run codex login)
- An OpenAI API key configured in Codex CLI (~/.codex/config.toml)
- An MCP-compatible client such as Claude Desktop or Cursor
- Optional: Ollama running locally if you want to use local OSS models
Install and authenticate Codex CLI
Codex MCP Tool wraps the Codex CLI, so you must install it and authenticate with your OpenAI account before the MCP server can work.
npm install -g @openai/codex
codex loginVerify Codex CLI works
Run codex --version to confirm the CLI is installed correctly. The MCP tool requires version 0.36.0+ for session resumption and 0.52.0+ for web search.
codex --versionAdd the MCP server to Claude Code
Register the Codex MCP Tool with Claude Code in a single command. It will be installed via npx on first use.
claude mcp add codex-cli -- npx -y @trishchuk/codex-mcp-toolConfigure Claude Desktop manually
If you use Claude Desktop instead, add the server to your config file at ~/Library/Application Support/Claude/claude_desktop_config.json.
Test the connection with the health tool
Ask Claude to run a health check to verify the Codex CLI is reachable and the MCP server is working correctly.
Codex MCP Tool Examples
Client configuration
Add this block to claude_desktop_config.json to register Codex MCP Tool with Claude Desktop.
{
"mcpServers": {
"codex-cli": {
"command": "npx",
"args": ["-y", "@trishchuk/codex-mcp-tool"]
}
}
}Prompts to try
Use Codex CLI capabilities through natural language prompts in your MCP client.
- "Use codex to explain the architecture of @src/ in this project."
- "Ask codex with sessionId 'my-app' to analyze @package.json and list all dependencies."
- "Continue our conversation: sessionId 'my-app' โ now add error handling to the function we discussed."
- "Brainstorm ways to optimize our CI/CD pipeline using the SCAMPER method."
- "Use codex with sandbox:true to write and run a Python script that sorts a list."Troubleshooting Codex MCP Tool
ask-codex returns 'codex: command not found'
Install the Codex CLI with npm install -g @openai/codex and authenticate with codex login. The MCP server shells out to the codex binary, which must be in your PATH.
Session continuity not working between turns
Session resumption requires Codex CLI version 0.36.0 or higher. Run codex --version to check. Upgrade with npm install -g @openai/codex@latest. Pass the same sessionId string in consecutive prompts.
Local OSS model (Ollama) fails to connect
Ensure Ollama is running locally with ollama serve and that you have pulled a tool-calling capable model such as qwen3:8b with ollama pull qwen3:8b. Then pass localProvider: 'ollama' and model: 'qwen3:8b' in your prompt.
Frequently Asked Questions about Codex MCP Tool
What is Codex MCP Tool?
Codex MCP Tool is a Model Context Protocol (MCP) server that ๐ โ๏ธ - mcp server that connects your ide or ai assistant to codex cli for code analysis and editing with support for multiple models (gpt-5-codex, o3, codex-1) It connects AI assistants to external tools and data sources through a standardized interface.
How do I install Codex MCP Tool?
Install via npm with the command: npx -y @trishchuk/codex-mcp-tool. Then add the server configuration to your AI client's JSON config file (e.g., claude_desktop_config.json or .cursor/mcp.json).
Which AI clients work with Codex MCP Tool?
Codex MCP Tool works with all major MCP-compatible AI clients including Claude Desktop, Claude Code, Cursor, VS Code (GitHub Copilot), Windsurf, and Cline.
Is Codex MCP Tool free to use?
Yes, Codex MCP Tool is open source and available under the MIT license. You can use it freely in both personal and commercial projects.
Codex MCP Tool Alternatives โ Similar Developer Tools Servers
Looking for alternatives to Codex MCP Tool? Here are other popular developer tools servers you can use with Claude, Cursor, and VS Code.
Ecc
โ 188.2kThe agent harness performance optimization system. Skills, instincts, memory, security, and research-first development for Claude Code, Codex, Opencode, Cursor and beyond.
Javaguide
โ 155.8kJava ้ข่ฏ & ๅ็ซฏ้็จ้ข่ฏๆๅ๏ผ่ฆ็่ฎก็ฎๆบๅบ็กใๆฐๆฎๅบใๅๅธๅผใ้ซๅนถๅใ็ณป็ป่ฎพ่ฎกไธ AI ๅบ็จๅผๅ
Gemini CLI
โ 104.5kA secure MCP server that wraps the Google Gemini CLI, allowing clients to query Gemini models using local OAuth sessions without requiring an API key. It provides tools for model interaction and diagnostics with built-in protection against command in
Awesome MCP Servers
โ 87.3kโญ Curated list of Model Context Protocol (MCP) servers - tools that extend Claude Desktop, Cursor, Windsurf, and other MCP clients with custom capabilities.
MCP Servers
โ 86.0kModel Context Protocol Servers
CC Switch
โ 77.5kA cross-platform desktop All-in-One assistant for Claude Code, Codex, OpenCode, OpenClaw, Gemini CLI & Hermes Agent. Only official website: ccswitch.io
Browse More Developer Tools MCP Servers
Explore all developer tools servers available in the MCPgee directory. Each server includes setup guides for Claude, Cursor, and VS Code.
Set Up Codex MCP Tool in Your Editor
Choose your AI client for step-by-step setup instructions.
Quick Config Preview
Add this to your claude_desktop_config.json or .cursor/mcp.json
Ready to use Codex MCP Tool?
Browse our complete directory of 33,000+ MCP servers, read setup guides for your editor, and start building with the Model Context Protocol.