Loading repository data…
Loading repository data…
missdeer / repository
codex-mcp-rs is a Rust-based MCP (Model Context Protocol) server that serves as a bridge for Codex CLI, enabling various AI coding assistants (such as Claude Code, Roo Code, KiloCode, etc.) to seamlessly collaborate with Codex.
A high-performance Rust implementation of MCP (Model Context Protocol) server that wraps the Codex CLI for AI-assisted coding tasks.
force_stdin override| Platform | Architecture | Binary |
|---|---|---|
| Linux | x86_64 | codex-mcp-rs_Linux_x86_64.tar.gz |
| Linux | arm64 | codex-mcp-rs_Linux_arm64.tar.gz |
| macOS | Universal (x64 + arm64) | codex-mcp-rs_Darwin_universal.tar.gz |
| Windows | x86_64 | codex-mcp-rs_Windows_x86_64.zip |
| Windows | arm64 | codex-mcp-rs_Windows_arm64.zip |
# Debug build
cargo build
# Release build
cargo build --release
The server communicates via stdio transport:
cargo run
Or after building:
./target/release/codex-mcp-rs
The fastest way to get started is using npx:
npx @missdeer/codex-mcp-rs
This command automatically installs the correct pre-built binary for your platform (Windows/macOS/Linux, x64/arm64) and launches the MCP server. No manual installation required.
To add it to Claude Code:
claude mcp add codex-rs -s user --transport stdio -- npx @missdeer/codex-mcp-rs
Using npx is the simplest approach - it handles binary installation automatically:
npx @missdeer/codex-mcp-rs
What happens:
@codex-mcp-rs/darwin-universal, @codex-mcp-rs/linux-x64, etc.)Add to Claude Code MCP configuration:
claude mcp add codex-rs -s user --transport stdio -- npx @missdeer/codex-mcp-rs
Or install globally for faster startup:
npm install -g @missdeer/codex-mcp-rs
claude mcp add codex-rs -s user --transport stdio -- codex-mcp-rs
Global installation caches the binary locally for instant startup.
Automatically download and install the latest release binary to /opt/codex-mcp-rs/:
curl -sSL https://raw.githubusercontent.com/missdeer/codex-mcp-rs/master/scripts/install.sh | bash
This script will:
/opt/codex-mcp-rs/codex-mcp-rsDownload the appropriate binary for your platform from the releases page, extract it, and add to your MCP configuration:
claude mcp add codex-rs -s user --transport stdio -- /path/to/codex-mcp-rs
git clone https://github.com/missdeer/codex-mcp-rs.git
cd codex-mcp-rs
cargo build --release
claude mcp add codex-rs -s user --transport stdio -- $(pwd)/target/release/codex-mcp-rs
The server provides a single codex tool with the following parameters:
PROMPT (string): Task instruction for Codexcd (string): Working directory pathsandbox (string): Sandbox policy - "read-only" (default), "workspace-write", or "danger-full-access"SESSION_ID (string): Resume a previous session for multi-turn conversationsskip_git_repo_check (bool): Allow running outside git repositories (default: false)return_all_messages (bool): Return full reasoning trace (default: false)image (array): Paths to image files to attachmodel (string): Override the Codex modelyolo (bool): Disable all prompts and sandboxingprofile (string): Load config profile from ~/.codex/config.tomltimeout_secs (number): Timeout in seconds for codex execution (default: 600, max: 3600)force_stdin (bool): Force passing prompt via stdin instead of CLI argument (default: false). When enabled, the prompt is always piped through stdin regardless of content. This is also triggered automatically when the prompt exceeds 800 characters or contains shell-special characters.The project has comprehensive test coverage:
# Run all tests
cargo test
# Run with coverage
cargo tarpaulin --out Html
# See detailed testing guide
cat TESTING.md
Test categories:
Total: 25 tests passing ✅
Current test coverage: See Codecov
See CLAUDE.md for detailed architecture documentation.
| Feature | codex-mcp-rs (Rust) | codexmcp (Python) | codex-mcp-go |
|---|---|---|---|
| Language | Rust | Python | Go |
| Performance | ⭐⭐⭐⭐⭐ | ⭐⭐⭐ | ⭐⭐⭐⭐ |
| Memory Usage | ⭐⭐⭐⭐⭐ | ⭐⭐⭐ | ⭐⭐⭐⭐ |
| Binary Size | Medium | N/A | Small |
| Startup Time | ⭐⭐⭐⭐⭐ | ⭐⭐⭐ | ⭐⭐⭐⭐⭐ |
| Session Management | ✓ | ✓ | ✓ |
| Image Support | ✓ | ✓ | ✓ |
| Sandbox Policies | ✓ | ✓ | ✓ |
Contributions are welcome! See CONTRIBUTING.md for guidelines.
This project is dual-licensed:
Free for personal projects, educational purposes, open source projects, and non-commercial use. See LICENSE for the full GPLv3 license text.
If you use codex-mcp-rs in a commercial environment, workplace, or for any commercial purpose, you must obtain a commercial license.
This includes but is not limited to:
Contact: missdeer@gmail.com for commercial licensing inquiries.
See LICENSE-COMMERCIAL for more details.