codex-cli-mcp
v1.0.1
Published
MCP server wrapping the OpenAI Codex CLI — exposes ping, ask-codex, search-web, and write-file tools to any MCP client
Maintainers
Readme
codex-cli-mcp
MCP server wrapping the codex (OpenAI Codex CLI) CLI. Exposes ping, ask-codex, search-web, and write-file to any MCP client (Claude Code, Kilo, OpenCode, Codex, Cline, etc.).
Prerequisites
- Bun v1.0+
codexinstalled and on PATH (or setCODEX_PATHenv var)
Installation
npm install -g codex-cli-mcp
# or
bunx codex-cli-mcpRegister with Claude Code
claude mcp add codex-mcp -- npx codex-cli-mcpEnvironment Variables
| Variable | Default | Description |
|----------|---------|-------------|
| CODEX_PATH | codex | Path to the codex binary |
| CODEX_TIMEOUT_MS | 300000 | Request timeout in ms |
| CODEX_WORKSPACE_ROOT | process.cwd() | Workspace root for file operations |
Tools
| Tool | Description |
|------|-------------|
| ping | Health check — shows version and binary path |
| ask-codex | Run a prompt non-interactively |
| search-web | Web search via codex |
| write-file | Write files within workspace |
License
MIT
