opencode-codex-mcp
Click on "Install Server".
Wait a few minutes for the server to deploy. Once ready, it will show a "Started" state.
In the chat, type
@followed by the MCP server name and your instructions, e.g., "@opencode-codex-mcpUse Codex to review my latest changes and fix any bugs."
That's it! The server will respond to your query, and you can continue using it as needed.
Here is a step-by-step guide with screenshots.
OpenCode Codex MCP
Portable MCP bridge that lets an MCP-compatible host such as OpenCode drive the
Codex CLI through codex app-server.
Requirements
Python 3.10 or newer
A supported Codex CLI installed on the same host, or a command that can launch it
Codex authenticated before using
codex_run
The bridge uses MCP stdio and does not open a network port. It is therefore portable across Linux, macOS, Windows, WSL, containers, and remote shells as long as the configured Codex command is reachable from the bridge process.
Related MCP server: gemini-cli-bridge
Configuration
By default the bridge runs codex app-server --listen stdio:// and resolves
codex through PATH. Override it with either variable:
CODEX_BIN=/absolute/path/to/codex
CODEX_COMMAND=/path/to/wsl.exe -d Ubuntu -- codexCODEX_COMMAND is shell-split and should be used when the executable requires
arguments. It also accepts a JSON string array when exact argument boundaries
matter. CODEX_BIN is preferred for a single executable path.
If Codex runs in another OS and sees a different path namespace, configure an optional working-directory mapping:
CODEX_CWD_PREFIX=/home/user/project
CODEX_CWD_REPLACE=//wsl.localhost/Ubuntu/home/user/projectOpenCode configuration
Add the server to opencode.json or opencode.jsonc:
{
"mcp": {
"codex": {
"type": "local",
"command": ["/usr/bin/python3", "-m", "codex_mcp"],
"cwd": "/absolute/path/to/opencode-codex-mcp",
"environment": {
"CODEX_BIN": "codex"
},
"enabled": true,
"timeout": 10000
}
}
}When using the checked-in launcher, the command can instead be (the launcher
sets PYTHONPATH so it works regardless of the OpenCode project directory):
"command": ["/absolute/path/to/scripts/codex-mcp"]The bridge requests workspace-write with the requested cwd as its writable
root and approvalPolicy: "never". This is intentionally automated and has
the same security implications as allowing Codex to execute commands and edit
files in that workspace without interactive approval.
Tools
codex_run: run a prompt, optionally continuingthread_idcodex_status: inspect Codex availability and versioncodex_thread_list: list saved Codex threadscodex_interrupt: interrupt a running turn
Development
python3 -m unittest discover -s tests -v
python3 -m codex_mcpThe schemas/ directory contains protocol schemas generated from the Codex
version used during development. The bridge intentionally does not require
those generated artifacts at runtime.
This server cannot be installed
Maintenance
Resources
Unclaimed servers have limited discoverability.
Looking for Admin?
If you are the server author, to access and configure the admin panel.
Related MCP Servers
- AlicenseNot gradedqualityDmaintenanceEnables MCP clients to spawn and control Codex CLI and Claude Code sessions on the host machine, with session management and filesystem access.4MIT
- AlicenseNot gradedqualityDmaintenanceExposes the local Gemini CLI as an MCP stdio server, providing tools for prompting, web search, file operations, and MCP management, enabling AI clients like Codex CLI and Claude Code to interact with Gemini.7MIT
- AlicenseAqualityBmaintenanceBridges OpenAI Codex CLI to any MCP client, allowing headless Codex sessions via tools like codex and codex-reply.229MIT
- AlicenseAqualityAmaintenanceMCP server that wraps Codex CLI as a subprocess, exposing code execution, web search, and structured output as Model Context Protocol tools.8813MIT
Related MCP Connectors
A paid remote MCP for OpenAI Codex agent coordination MCP, built to return verdicts, receipts, usage
A comprehensive Model Context Protocol (MCP) server that enables AI assistants to interact with yo…
MCP server for Clipkit — gives AI agents a video toolbox via the Clipkit schema.
Latest Blog Posts
- Who's Calling? MCP Hosts Are an Identity Blind Spot (And the Spec Knows It)By Om-Shree-0709 on .mcpAgent IdentityOAuth 2.1
- Your AI Chatbot Just Exposed Your CEO's Salary to an InternBy Om-Shree-0709 on .Agent IdentityMCP SecurityOAuth Delegation
- Why MCP Servers Need Execution Sandboxing (And Why Your Current Stack Isn't Enough)By Om-Shree-0709 on .Agentic AiPrompt InjectionWebAssembly
MCP directory API
We provide all the information about MCP servers via our MCP API.
curl -X GET 'https://glama.ai/api/mcp/v1/servers/TAO-MINGYU/opencode-codex-mcp'
If you have feedback or need assistance with the MCP directory API, please join our Discord server