opencode-codex-mcp
This server does not currently have a deployable release on Glama. Follow the repository's setup instructions to install and configure it for your MCP client, including any required credentials and local dependencies.
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: Lumen 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.
Tool Schema Changelog
Recent tool additions, removals, and schema changes observed during successful MCP inspections.
Loading tool schema changelog…
This server cannot be deployed
Maintenance
Related MCP Connectors
Shared memory MCP server for Claude Code, Codex, Gemini CLI and Cursor. Cited, editable.
Remote MCP server exposing your Node Command fleet (files, shell, processes, browser) to AI hosts.
Nifty's MCP server — exposes tasks, projects, messages, and files as tools for AI agents.
Enable secure connectivity between Sentry issues and debugging data, and LLM clients, using a Model Context Protocol (MCP) server.
Related MCP Servers
- AlicenseNot gradedqualityBmaintenanceA local STDIO MCP server that bridges MCP clients to the Codex CLI by sending instructions to a configured workspace, exposing task run, status, and result tools with a read-only sandbox and no remote transport.137MIT
- AlicenseNot gradedqualityCmaintenanceEnables MCP clients and external AI supervisors to oversee and steer native Codex sessions through a thin local stdio bridge. It exposes eleven codex_* supervisory tools for tasks such as listing threads, starting turns, observing progress, steering, responding to approvals, interrupting, checkpointing, and rolling over work.MIT
- AlicenseNot gradedqualityBmaintenanceA local stdio MCP server that lets any MCP client start a Codex thread and continue it by opaque thread ID through the codex and codex-reply tools, with fail-closed sandboxing and approval policies. It restores the removed Codex CLI MCP integration by bridging clients like OpenCode to the official Codex SDK.MIT
- AlicenseAqualityBmaintenanceEnables MCP clients to start new Codex conversations and continue existing threads, exposing codex and codex-reply tools over stdio via the Codex app-server protocol.2MIT