codex-mcp-bridge
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-bridgeAsk Codex: why does my app return 404?"
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 Persistent Bridge
Local Codex App Server + persistent bridge experiment.
Purpose
This project explores a local integration path:
AI client / MCP client
│ MCP stdio
▼
core/codex_mcp_bridge.py
│ WebSocket
▼
Codex App Server
│
▼
Local project workspaceThe MCP bridge exposes ask_codex(prompt: str). It forwards requests to a local Codex App Server and returns the final text response.
The project also contains a long-running persistent service:
tests/persistent_test.py
│ TCP JSON Lines :4600
▼
core/persistent_bridge.py
│ WebSocket :4500
▼
Codex App ServerThe persistent service keeps one CodexSession alive between requests. The first request creates a thread; later requests reuse the WebSocket connection and thread_id.
Related MCP server: pokeclaw
Repository layout
codex-mcp-persistent-bridge/
├── core/
│ ├── codex_mcp_bridge.py
│ └── persistent_bridge.py
├── tests/
│ └── persistent_test.py
├── docs/
│ └── Codex_MCP_Bridge_Development_Log.md
├── README.md
├── requirements.txt
├── start_persistent_bridge.ps1
└── .gitignoreRuntime logs are written under logs/ when the startup script uses redirected output. The directory and log files are excluded from Git.
Installation
Open a terminal at the project root and create an environment if needed:
python -m venv .venv
.\.venv\Scripts\Activate.ps1
python -m pip install -r requirements.txtThe startup script currently uses the Python interpreter from the verified local setup. When moving the project to another machine, review that interpreter setting before starting the service.
Startup
From the project root:
.\start_persistent_bridge.ps1The script:
Starts
codex app-server --listen ws://127.0.0.1:4500when the App Server is not already listening.Waits for TCP port
4500.Starts
core/persistent_bridge.py.Waits for TCP port
4600.Prints the process IDs and keeps both child processes alive.
Press Ctrl+C in the startup window to stop the child processes started by the script.
Persistent session test
With the service running, open another terminal at the project root:
python .\tests\persistent_test.pyThe test sends three requests over one TCP connection. Expected diagnostic behavior is:
CALL 0
current thread_id = None
created new thread_id = <id>
CALL 1
current thread_id = <id>
CALL 2
current thread_id = <id>The exact ID is generated by Codex. The important result is that the ID remains the same for all three calls.
MCP stdio entry point
core/codex_mcp_bridge.py remains the standard MCP entry point and exposes ask_codex(prompt: str). A compatible MCP host should launch it with its configured Python interpreter and a project-root-relative configuration, for example:
{
"mcpServers": {
"codex-mcp-bridge": {
"command": "<python-interpreter>",
"args": ["<project-root>/core/codex_mcp_bridge.py"],
"env": {
"CODEX_APP_SERVER_URL": "ws://127.0.0.1:4500",
"CODEX_MCP_WORKDIR": "<project-root>"
}
}
}
}The stdio entry point and the long-running TCP service are separate launch modes. The persistent service exists to keep the Session alive after a short-lived client exits; it does not change the MCP tool interface or the WebSocket protocol.
Known limitations
The project is a local Codex App Server and MCP bridge experiment, not a hosted service.
ChatGPT Desktop has not been verified to provide a direct local MCP connection for this project.
ChatGPT Web cannot automatically access a local process just because the process listens on
127.0.0.1.The persistent service currently uses a local TCP JSON Lines interface; it is not itself a replacement for the standard MCP stdio entry point.
The current setup assumes the local Codex CLI, Python dependencies, permissions and App Server are available in the host environment.
The bridge uses local execution settings that should be reviewed before any broader or write-enabled deployment.
Development record
The engineering history, failed attempts and debugging conclusions are recorded in docs/Codex_MCP_Bridge_Development_Log.md.
Tool Schema Changelog
Recent tool additions, removals, and schema changes observed during successful MCP inspections. Dates show when Glama detected each change.
No tool schema history has been recorded yet.
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 Connectors
A paid remote MCP for OpenAI Codex agent coordination MCP, built to return verdicts, receipts, usage
Use AI models for chat, image, and video generation from Claude Code and other MCP hosts.
A paid remote MCP for OpenAI Codex context compressor, built to return verdicts, receipts, usage log
- mcpOAuthco.aistoryhub
Remote MCP server for AIStoryHub: stories, chapters, story bible, Voiceprints, AI generation.
Related MCP Servers
- AlicenseAqualityBmaintenanceA stateless MCP server that wraps the headless Gemini CLI, providing tools to send prompts to Google's Gemini models and receive text responses. It supports both simple prompts and prompts with contextual information.2MIT
- 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
- AlicenseAqualityBmaintenanceBridges OpenAI Codex CLI to any MCP client, allowing headless Codex sessions via tools like codex and codex-reply.2261MIT
- FlicenseNot gradedqualityAmaintenanceMCP server for programmatic lifecycle management of Claude Code sessions, supporting list, create, read, send, fork, wait, and interrupt operations.31-
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/happydayily/codex-mcp-persistent-bridge'
If you have feedback or need assistance with the MCP directory API, please join our Discord server