Back to search
codex-mcp-server
SkillWorks with CodexGitHub
MCP server wrapper for OpenAI Codex CLI that enables Claude Code to leverage Codex's AI capabilities directly.
Safety scan
A static text scan, not a guarantee. Select the badge to see what was scanned and every finding.
Checked today
Badge for your README
Markdown
[](/listings/tuannvm--codex-mcp-server)HTML
<a href="/listings/tuannvm--codex-mcp-server"><img src="/api/listings/tuannvm--codex-mcp-server/badge.svg" alt="findsafeskills safety rating" /></a>Install
i
Install instructions from the README
As written by the repo's author. findsafeskills has not verified these steps.
1. Install Codex CLI
npm i -g @openai/codex codex login --api-key "your-openai-api-key"
2. Add to Claude Code
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
What was scanned
The files the safety scan read, as written by the repository's author and shown as plain text. Lines with a finding are marked.
README.md · README · 130 lines
View this file on GitHub (read at the repository's current version: the scan did not record which commit it read)
- # Codex MCP Server
- [](https://www.npmjs.com/package/codex-mcp-server)
- [](https://www.npmjs.com/package/codex-mcp-server)
- [](https://www.npmjs.com/package/codex-mcp-server)
- Bridge between Claude and OpenAI's Codex CLI — get AI-powered code analysis, generation, and review right in your editor.
- ```mermaid
- graph LR
- A[Claude Code] --> B[Codex MCP Server]
- B --> C[Codex CLI]
- C --> D[OpenAI API]
- style A fill:#FF6B35
- style B fill:#4A90E2
- style C fill:#00D4AA
- style D fill:#FFA500
- ```
- ## 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
- [](https://vscode.dev/redirect/mcp/install?name=codex-cli&config=%7B%22type%22%3A%22stdio%22%2C%22command%22%3A%22npx%22%2C%22args%22%3A%5B%22-y%22%2C%22codex-mcp-server%22%5D%7D)
- [](https://insiders.vscode.dev/redirect/mcp/install?name=codex-cli&config=%7B%22type%22%3A%22stdio%22%2C%22command%22%3A%22npx%22%2C%22args%22%3A%5B%22-y%22%2C%22codex-mcp-server%22%5D%7D)
- [](https://cursor.com/en/install-mcp?name=codex&config=eyJ0eXBlIjoic3RkaW8iLCJjb21tYW5kIjoibnB4IC15IGNvZGV4LW1jcC1zZXJ2ZXIiLCJlbnYiOnt9fQ%3D%3D)
- ## Tools
- | Tool | Description |
- |------|-------------|
- | `codex` | AI coding assistant with session support, model selection, and structured output metadata |
- | `review` | AI-powered code review for uncommitted changes, branches, or commits |
- | `websearch` | Web search using Codex CLI with customizable result count and search depth |
- | `listSessions` | View active conversation sessions |
- | `ping` | Test server connection |
- | `help` | Get 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
- - **[API Reference](docs/api-reference.md)** — Full tool parameters and response formats
- - **[Session Management](docs/session-management.md)** — How conversations work
- - **[Codex CLI Integration](docs/codex-cli-integration.md)** — Version compatibility and CLI details
- ## 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](https://github.com/tuannvm/gemini-mcp-server)** — MCP server for Gemini CLI with 1M+ token context, web search, and media analysis
- - **[Clotch](https://github.com/tuannvm/clotch)** — Dynamic Island for Claude Code on macOS — monitor sessions across multiple machines and providers in real time
- ## License
- ISC
Ratings and comments
Sign in to rate this skill.
Sign inFree to use. If it’s helped, pass it on.