codex-appserver-mcp
Allows MCP clients to hand tasks to OpenAI Codex through codex app-server, including starting or resuming threads, passing cwd/model/effort/sandbox, collecting agent messages, commands run and changed files, and handling approval requests.
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.
codex-appserver-mcp
A small MCP stdio server that lets an MCP client (for example the Antigravity app) hand tasks to Codex through codex app-server. Zero dependencies, Node 20+.
Status: prototype. Tested only against a mock app-server written from the public docs, not against a real codex CLI or a real Antigravity. The mock mirrors https://learn.chatgpt.com/docs/app-server; field names for approval replies ({decision}) and thread/start options are from that doc and unverified against a real binary.
codex mcp-server was removed in Codex (deprecated 2026-08-24, removed 2026-09-05), so this talks to codex app-server instead (JSON-RPC 2.0, one JSON message per line).
What it does
One MCP tool, codex_run:
arg | meaning |
| task for Codex (required) |
| continue an earlier thread (returned in each result) |
| passed through |
| new threads only: |
Flow: initialize (experimental API on) then thread/start or thread/resume, turn/start, then it collects item/agentMessage/delta, item/completed and turn/completed, and returns the final answer, thread id, commands run, changed files. MCP progress notifications are sent if the client supplies a progress token. A turn that gets no result in 10 minutes is interrupted.
Related MCP server: codex-app-mcp
Safety defaults
Sandbox
read-only, approval policyon-request.Command and file-change approval requests from Codex are declined, and the result says how many. Set
CODEX_MCP_AUTO_APPROVE=1to accept them (only with a sandbox you trust).Codex uses its own login (
codex login) or API key. This server never reads or stores credentials. Using a ChatGPT subscription login this way is the same as using the CLI yourself; check OpenAI's current terms if you share it.
Dynamic tools (Codex calls back into your machine)
Set CODEX_MCP_DYNAMIC_TOOLS to a JSON array. Each entry is registered on new threads as a Codex dynamic tool; when Codex calls it, this server runs command with the JSON arguments on stdin and returns stdout.
[{"name":"lookup_ticket","description":"Fetch a ticket","inputSchema":{"type":"object","properties":{"id":{"type":"string"}},"required":["id"]},"command":["python3","/path/lookup.py"]}]This is command-backed only. It does not forward calls to the MCP client's own tools (MCP has no way for a server to call a client's tools).
Install and use
git clone https://github.com/azjhf-dev/codex-appserver-mcp && cd codex-appserver-mcp
npm testMCP config (Antigravity: Customizations > MCP Servers; or any MCP client):
{ "mcpServers": { "codex": { "command": "node", "args": ["/abs/path/codex-appserver-mcp/src/server.mjs"] } } }Env: CODEX_BIN (default codex), CODEX_MCP_COMMAND (full argv, default codex app-server), CODEX_MCP_MODEL, CODEX_MCP_SANDBOX, CODEX_MCP_APPROVAL, CODEX_MCP_CWD, CODEX_MCP_AUTO_APPROVE, CODEX_MCP_DYNAMIC_TOOLS.
Known gaps
Not run against real Codex. First thing to do: run it against
codex app-serverand checkthread/startaccepts the params.One tool, no thread listing or interrupt tool yet (the bridge has
interrupt).Stdio only, no remote or WebSocket app-server.
Notifications are matched by
threadId; if the real server omits it on some events they are dropped unless only one run is active.
MIT.
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
MCP server for your apps' tools and custom tools, plus hosted AI agents and approval-gated workflows
A paid remote MCP for OpenAI Codex agent coordination MCP, built to return verdicts, receipts, usage
Shared memory MCP server for Claude Code, Codex, Gemini CLI and Cursor. Cited, editable.
Nifty's MCP server — exposes tasks, projects, messages, and files as tools for AI agents.
Related MCP Servers
- 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
- AlicenseAqualityCmaintenanceBridges MCP clients such as Claude Code and Cursor to independent Codex app-server sessions, letting them start, poll, steer, review, compact, cancel, and answer prompts for asynchronous Codex tasks over local stdio or a remote authenticated WebSocket. Runs read-only by default, with workspace-write sandboxing only when a user explicitly enables it, and reports job status, model listing, and progress back to the client.101MIT
- AlicenseAqualityBmaintenanceEnables Claude Code or any MCP client to delegate hands-on coding work to OpenAI Codex over a persistent app-server process, keeping long-lived threads with follow-ups, async polling, approvals, steering, and interrupts. Supports native code review, resuming existing sessions, structured output, and parallel worktree-isolated tasks.1024 npm1MIT