codex-mcp-bridge
Provides a policy-controlled interface for OpenAI's Codex MCP server, enabling secure read/write sessions from ChatGPT with configurable approval and sandbox restrictions.
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., "@codex-mcp-bridgeRun a read-only code review of the current repository"
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.
codex-mcp-bridge
A small policy layer between ChatGPT and the official local Codex MCP server.
ChatGPT
-> OpenAI Secure MCP Tunnel
-> codex-mcp-bridge (loopback HTTP)
-> codex mcp-server (stdio)
-> one explicitly allowed repositoryThe official Codex MCP server already provides codex and codex-reply. This bridge intentionally adds only the controls needed for safer daily use from ChatGPT:
bridge_status: inspect the active policy.codex_read: force a read-only Codex session.codex_run: start a policy-limited read or write session.codex_reply: continue only a thread created through this bridge.codex_job_status: retrieve a long-running result.
Security defaults
Binds to
127.0.0.1.Allows one current working directory unless roots are explicitly configured.
Uses the
read-onlyCodex sandbox.Uses the
on-requestapproval policy.Never exposes
danger-full-access.Blocks workspace writes unless the bridge owner starts a write profile.
Rejects paths outside the configured real-path roots.
Refuses repositories containing common secret-file names unless the owner explicitly disables the preflight.
Limits prompt size and concurrent Codex jobs.
Suppresses upstream Codex stderr unless local debug logging is enabled.
These controls are a policy layer, not OS-level isolation. Use a staging copy, container, VM, or separate OS user when hard isolation is required.
Related MCP server: mcp-governance-proxy
Requirements
Node.js 20 or later; Node.js 22 is recommended.
Codex CLI installed, authenticated, and providing
codex mcp-server.tunnel-clientand an OpenAI Secure MCP Tunnel for ChatGPT access.
Official references:
Install
npm ci
npm run checkLocal smoke test
Local mode never creates a public endpoint:
npm run bridge:local -- --root /absolute/path/to/repositoryThe MCP endpoint is http://127.0.0.1:8876/mcp and the health endpoint is http://127.0.0.1:8876/healthz.
Secure MCP Tunnel
Create a tunnel in OpenAI Platform, then provide its runtime credentials outside this repository:
export CONTROL_PLANE_API_KEY="<runtime-key>"
export CONTROL_PLANE_TUNNEL_ID="tunnel_..."
npm run bridge:secure -- --root /absolute/path/to/repositoryThe launcher builds the bridge, starts it on loopback, initializes the tunnel profile, runs tunnel-client doctor, and keeps the tunnel client running.
For a deliberate write session:
npm run bridge:secure -- --root /absolute/path/to/repository --writeDo not leave a write profile running when it is not needed.
macOS Keychain
security add-generic-password -a "$USER" -s "codex-mcp-bridge:control-plane-api-key" -w "<runtime-key>" -U
security add-generic-password -a "$USER" -s "codex-mcp-bridge:control-plane-tunnel-id" -w "tunnel_..." -U
CODEX_MCP_BRIDGE_ROOT=/absolute/path/to/repository npm run bridge:secure:keychainUse bridge:secure:write:keychain only for an intentional write session.
Configuration
Variable | Default | Purpose |
| current directory | Comma-separated absolute allowed roots |
|
|
|
| unset | Must be |
|
|
|
|
| Maximum active Codex calls |
|
| Maximum prompt length per tool call |
|
| Codex MCP call timeout |
|
| Delay before returning a job ID |
|
| Completed job retention |
| unset | Explicitly bypass filename preflight |
| unset | Emit local diagnostic errors and Codex stderr |
The old CODEX_GPT_BRIDGE_* variable prefix is accepted temporarily for upstream compatibility.
ChatGPT setup
Upstream
This repository is derived from DeepCogNeural/codex-gpt-bridge under the MIT License. See UPSTREAM.md for the scope of this fork.
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
- FlicenseAqualityCmaintenanceA secure MCP server that exposes local repository context to ChatGPT/Codex with read-only access, path validation, and no generic shell.17
- AlicenseNot gradedqualityCmaintenanceAn MCP server that acts as a governance proxy for AI agents, evaluating each tool call against policies before execution, enabling secure and controlled access to systems like Slack, GitHub, and AWS without exposing credentials to the agent.Apache 2.0
- FlicenseNot gradedqualityCmaintenanceA local MCP server that provides controlled repository access with policy-based file filtering, secret redaction, and audit logging for AI coding agents.
- AlicenseNot gradedqualityBmaintenanceA secure MCP server that connects ChatGPT/Codex to a local Obsidian Vault, enabling controlled knowledge retrieval, note maintenance, and daily ingest while enforcing path policies, concurrency checks, and audit.MIT
Related MCP Connectors
A paid remote MCP for OpenAI Codex agent coordination MCP, built to return verdicts, receipts, usage
A paid remote MCP for OpenAI Codex memory MCP, built to return verdicts, receipts, usage logs, and a
Remote MCP for Copilot CLI switch gate MCP, structured receipts, audit logs, and reviewer-ready evid
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/menaje/codex-mcp-bridge'
If you have feedback or need assistance with the MCP directory API, please join our Discord server