codex-mcp-server  by tuannvm

AI code assistance server bridging editors and Codex CLI

Created 6 months ago
304 stars

Top 88.2% on SourcePulse

GitHubView on GitHub
Project Summary

This project provides a bridge between Claude Code and OpenAI's Codex CLI, enabling developers to integrate advanced AI-powered code analysis, generation, and review directly into their editor workflow. It targets users of Claude Code seeking to leverage the capabilities of OpenAI's Codex without leaving their development environment, offering enhanced productivity through AI assistance.

How It Works

The project functions as an MCP (Meta-Command Protocol) server. It intercepts commands from Claude Code, translates them for the Codex CLI, and forwards them to the OpenAI API via the CLI. Responses are then processed and returned to Claude Code, facilitating a seamless interaction loop. This architecture allows for features like session management for multi-turn conversations and the retrieval of structured output metadata, enhancing the AI's utility for complex tasks.

Quick Start & Requirements

  1. Install Codex CLI: npm i -g @openai/codex or brew install codex.
  2. Authenticate Codex CLI: codex login --api-key "your-openai-api-key".
  3. Add to Claude Code: claude mcp add codex-cli -- npx -y codex-mcp-server.

Prerequisites:

  • Codex CLI v0.75.0+
  • OpenAI API key
  • Node.js/npm

Highlighted Details

  • AI coding assistant with session support, model selection (e.g., model "o3"), and structured output metadata.
  • AI-powered code review for uncommitted changes, branches, or commits using the review tool.
  • Supports multi-turn conversations via sessionId for maintaining context.
  • Advanced options include reasoningEffort, fullAuto, sandbox, and callbackUri for customized AI interactions.
  • Returns threadId and outputSchema when available from the Codex CLI, enabling more structured responses.

Maintenance & Community

No specific details on contributors, sponsorships, or community channels (like Discord/Slack) are provided in the README. A related project, gemini-mcp-server, is mentioned.

Licensing & Compatibility

The project is licensed under the ISC license, which is permissive and generally suitable for commercial use and integration into closed-source projects.

Limitations & Caveats

This wrapper's functionality is entirely dependent on the external Codex CLI and the availability and performance of the OpenAI API. It requires specific versions of the Codex CLI (v0.75.0+) and an active OpenAI API key to operate.

Health Check
Last Commit

1 day ago

Responsiveness

Inactive

Pull Requests (30d)
12
Issues (30d)
3
Star History
104 stars in the last 30 days

Explore Similar Projects

Feedback? Help us improve.