High-performance code intelligence MCP server. Indexes codebases into a persistent knowledge graph — average repo in milliseconds. 158 languages, sub-ms queries, 99% fewer tokens. Single static binary, zero dependencies.
MCP server for Codex CLI workflows
This repo wraps OpenAI’s Codex CLI behind an MCP server so other tools can call it like a normal MCP service. It uses a Python MCP server plus Docker and helper scripts to run repo-focused prompts and recursive development flows.
Builders who want to plug Codex CLI into an MCP-based workflow and run it against repositories.
You can send Codex requests through MCP instead of managing the CLI by hand.
What it does
Codex CLI MCP wrapper
Exposes Codex CLI as MCP tools through the server implementation in `src/mcp_server`.
Repository-scoped prompts
Lets you point the tool at a Git repository, optional branch, and optional folder before running a request.
Agent config loading
Uses `.agent/mcps.json` and related agent files so the server can register MCP tools in a project.
Docker and script launchers
Provides `start.sh`, multiple `start-*.sh` scripts, and Docker files for running the stack in different modes.
SSE and stdio transport
Supports running the MCP server with stdio or SSE transport from `python -m mcp_server`.
How to get it
- 1Run
# Clone this repository git clone https://github.com/yourusername/codex-mcp-wrapper.git cd codex-mcp-wrapper # Start the services ./start.sh
- 2You can run the MCP server using either stdio or SSE transport
# Using stdio (default) python -m mcp_server # Using SSE on a specific port python -m mcp_server --transport sse --port 8000
README
Agentic Developer MCP
This project wraps OpenAI's Codex CLI as an MCP (Model Context Protocol) server, making it accessible through the TeaBranch/open-responses-server middleware.
This engine may be replaced with OpenCode or Amazon Strands
Requirements
- Node 22 (
nvm install 22.15.1 | nvm use 22.15.1) required for Codex
Overview
The setup consists of three main components:
- Codex CLI: OpenAI's command-line interface for interacting with Codex.
- MCP Wrapper Server: A Node.js Express server that forwards MCP requests to Codex CLI and formats responses as MCP.
- open-responses-server: A middleware service that provides Responses API compatibility and MCP support.
Installation
Using Docker (Recommended)
# Clone this repository
git clone https://github.com/yourusername/codex-mcp-wrapper.git
cd codex-mcp-wrapper
# Start the services
./start.sh
This will start:
- Codex MCP wrapper on port 8080
- open-responses-server on port 3000
Manual Installation
# Install dependencies
npm install
# Install Codex CLI globally
npm install -g @openai/codex
# Start the MCP server
node mcp-server.js
# Install the package in development mode
pip install -e .
Usage
You can run the MCP server using either stdio or SSE transport:
# Using stdio (default)
python -m mcp_server
# Using SSE on a specific port
python -m mcp_server --transport sse --port 8000
Tool Documentation
run_codex
Clones a repository, checks out a specific branch (optional), navigates to a specific folder (optional), and runs Codex with the given request.
Parameters
repository(required): Git repository URLbranch(optional): Git branch to checkoutfolder(optional): Folder within the repository to focus onrequest(required): Codex request/prompt to run
Example
{
"repository": "https://github.com/username/repo.git",
"branch": "main",
"folder": "src",
"request": "Analyze this code and suggest improvements"
}
clone_and_write_prompt
Clones a repository, reads the system prompt from .agent/system.md, parses modelId from .agent/agent.json, writes the request to a .prompt file, and invokes the Codex CLI with the extracted model.
Parameters
repository(required): Git repository URLrequest(required): Prompt text to run through Codexfolder(optional, default/): Subfolder within the repository to operate in
Example
{
"repository": "https://github.com/username/repo.git",
"folder": "src",
"request": "Analyze this code and suggest improvements"
}
MCPS Configuration
Place a mcps.json file under the .agent/ directory to register available MCP tools. Codex will load this configuration automatically.
Example .agent/mcps.json:
{
"mcpServers": {
"agentic-developer-mcp": {
"url": "..."
}
}
}
Development
This project uses the MCP Python SDK to implement an MCP server. The primary implementation is in mcp_server/server.py.
License
MIT
Files in the repo
- .agent
- docs
- src
- _config.yml
- .gitignore
- .sample.env
- claude-desktop-config.json
- docker-compose.1.yml
- docker-compose.cli.yml
- docker-compose.yml
- Docker.codex
- Dockerfile
- Dockerfile.cli
- Dockerfile.codex
- find_free_port.py
- LICENSE
- package-lock.json
- package.json
- README.md
- run_codex.sh
- run_ors.sh
- servers_config.http.json
- servers_config.json
- servers_config.stdio.json
- start-cli.sh
- start-easy.sh
- start-instances.sh
- start-multiple-instances.sh
- start-parallel.sh
- start-single.sh
- start.sh
- test.html
Discussion (0)
Ask about usage, or say what you built with itSign in to join the discussion.
No comments yet. Be the first to say what this is good for.
More connectors

Universal provider proxy for OpenAI Codex & Claude Code — use any LLM (Claude, Gemini, Grok, DeepSeek, Ollama…) with Codex CLI, App, SDK, and Claude Code
Git-native persistent memory for AI coding agents. Implements Google OKF v0.2 with sub-300µs in-memory BM25 search, embedded MCP server, and progressive disclosure. Slashes token bloat by 80% with zero external databases or dependencies. Built in pure Go.
Local-first code intelligence graph for MCP and CLI. Builds a persistent map of your codebase so AI coding tools read only what matters, with benchmarked context reductions on reviews and large-repo workflows.
Stop your AI from making things up — it proposes, deterministic tools decide, every claim checked against ground truth with evidence. Grounded facts and context survive resets. Reverse engineering is the proving ground. MCP server + CLI.
20 MB lightweight cross-platform database client for 90+ databases, including MySQL, PostgreSQL, SQLite, Redis, MongoDB, DuckDB, SQL Server, and Dameng. Built-in AI, MCP Server, CLI, desktop and Docker. | 轻量级跨平台数据库管理工具,支持 MySQL、PostgreSQL、SQLite、Redis、MongoDB、达梦等 90+ 数据库,提供桌面端、Docker、CLI、内置 AI 助手和 MCP Server。