codex-mcp-server
Verified Safeby tuannvm
Overview
Serves as a Model Context Protocol (MCP) bridge to integrate OpenAI's Codex CLI for AI-powered code analysis, generation, and review within various editors like Claude Code, VS Code, and Cursor.
Installation
npx -y codex-mcp-serverEnvironment Variables
- CODEX_DEFAULT_MODEL
- CODEX_MCP_CALLBACK_URI
Security Notes
The server uses `child_process.spawn` to execute the `codex` CLI. While user-provided prompts and working directories are passed to the CLI, the server takes precautions: the executable `codex` is fixed, and arguments are constructed and escaped (`escapeArgForWindows`) to mitigate direct shell injection. Session IDs are validated with a regex. No hardcoded secrets were found; API keys are expected to be managed by the underlying Codex CLI's login mechanism. The main security surface area relies on the robustness of the `codex` CLI itself in processing arbitrary user input, which is an external dependency.
Similar Servers
claude-code-mcp
Acts as an MCP server to enable LLMs to run Claude Code CLI in one-shot mode, bypassing permissions for complex coding, file system, Git, and terminal operations.
claude-codex-settings
A comprehensive toolkit and configuration for developing Claude Code plugins, integrating various external services and APIs, and enhancing AI-assisted coding workflows.
consult-llm-mcp
An MCP server that allows AI agents like Claude Code to consult stronger, more capable AI models (e.g., GPT-5.2, Gemini 3.0 Pro) for complex code analysis, debugging, and architectural advice.
codex-mcp-go
Wraps the OpenAI Codex CLI as an MCP tool, enabling AI clients like KiloCode, Roo Code, and Claude Code to utilize Codex for high-precision coding tasks, debugging, and code reviews within an agentic workflow.