easy-codex-mcp
Provides read-only conversations with OpenAI Codex CLI for code analysis, review, and Q&A in a sandboxed environment.
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., "@easy-codex-mcpReview the code in src/app.js for potential 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.
easy-codex-mcp
An MCP server that lets any MCP-compatible AI assistant have read-only conversations with OpenAI Codex CLI.
No complex setup β just codex login and you're ready.
Why?
Sometimes your AI assistant needs a second opinion. easy-codex-mcp bridges the gap by letting Claude, Cursor, or any MCP client consult Codex for code analysis, review, and Q&A β all in a non-destructive, read-only sandbox.
π Read-only by design β Codex runs in sandbox mode. It reads your code but never modifies files or runs commands.
π¬ Conversational β Start a thread and continue it later with full context preserved.
π§ Zero config β No API keys to manage in your MCP config. Just log in to Codex CLI once.
Related MCP server: codex-cli-architect-mcp
Quick Start
1. Install Codex CLI
npm install -g @openai/codex
codex login2. Add to your MCP client
Claude Code (recommended):
claude mcp add easy-codex uvx -- --from git+https://github.com/dazebug/easy-codex-mcp easy-codexClaude Desktop β add to your claude_desktop_config.json:
{
"mcpServers": {
"easy-codex": {
"command": "uvx",
"args": ["--from", "git+https://github.com/dazebug/easy-codex-mcp", "easy-codex"]
}
}
}Other MCP clients β use the same config format with uvx as the command.
3. Use it
Your AI assistant now has two new tools:
Tool | Description |
| Start a fresh conversation with Codex |
| Resume a previous conversation using |
Example prompts to your AI assistant:
"Ask Codex to review this file for potential bugs"
"Get Codex's opinion on the architecture of this module"
"Have Codex explain how the authentication flow works"
Tools
start_new_conversation
Start a new read-only conversation with Codex.
Parameters:
prompt(required) β What to ask Codex.working_directory(optional) β Directory for Codex to work in.
Returns: { "thread_id": "...", "response": "..." }
continue_conversation
Resume a previous conversation with full context.
Parameters:
thread_id(required) β Thread ID from a previous conversation.prompt(required) β Follow-up question.working_directory(optional) β Directory for Codex to work in.
Returns: { "thread_id": "...", "response": "..." }
How It Works
Your AI Assistant ββMCPβββΆ easy-codex-mcp ββCLIβββΆ Codex (read-only sandbox)
β β β
β "Review this code" β codex e --json "..." β
βββββββββββββββββββββββββββββββββββββββββββββββββββββ β
β thread_id + response β JSONL output βYour assistant calls the MCP tool with a prompt
easy-codex-mcp spawns
codexCLI in read-only sandbox modeCodex analyzes your code and responds
The response + thread_id are returned to your assistant
Use thread_id to continue the conversation later
Requirements
Python 3.12+
OpenAI Codex CLI (
npm install -g @openai/codex)Codex CLI logged in (
codex login)
Development
git clone https://github.com/dazebug/easy-codex-mcp.git
cd easy-codex-mcp
uv sync
# Run tests
uv run pytest
# Dev mode
uv run mcp dev src/easy_codex/server.pyLicense
MIT
Available Tools
2 toolscontinue_conversationA
Continue an existing Codex conversation.
Resumes a previous conversation using thread_id to maintain context. Same read-only sandbox limitations as start_new_conversation apply.
When to use:
Asking follow-up questions based on previous analysis
Continuing multi-step analysis on the same codebase
Sending additional requests while maintaining conversation context
Args: thread_id: thread_id from a previous conversation. prompt: Follow-up prompt to send to codex. Use @filepath to mention files. working_directory: Directory path for codex to work in (optional).
Returns: Dict with thread_id and response.
| Name | Required | Description | Default |
|---|---|---|---|
| prompt | Yes | ||
| thread_id | Yes | ||
| working_directory | No |
TDQS
Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?
With no annotations, the description carries the full burden. It discloses context resumption via thread_id, read-only sandbox limitations, and the return format. The detailed sandbox limitations are delegated to the sibling tool rather than spelled out, which is a minor gap.
Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.
Is the description appropriately sized, front-loaded, and free of redundancy?
Well-structured with an opening statement, context, use cases, Args, and Returns sections. Content is organized and front-loaded; the slight redundancy between 'Continue' and 'Resumes' is minor and does not detract from effectiveness.
Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.
Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?
Given no annotations and no output schema, the description covers purpose, usage, parameters, and return value. It could mention error handling for invalid thread_id, but for a conversational continuation tool, the provided information is sufficient for an agent to use it correctly.
Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.
Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?
Schema description coverage is 0%, but the description provides an Args section explaining each parameter clearly: thread_id from previous conversation, prompt with @filepath mention, and working_directory as optional. This fully compensates for the schema's lack of descriptions.
Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.
Does the description clearly state what the tool does and how it differs from similar tools?
Description explicitly states 'Continue an existing Codex conversation' with a specific verb and resource. It distinguishes from sibling start_new_conversation by emphasizing thread_id-based resumption and referencing the sibling's sandbox limitations.
Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.
Does the description explain when to use this tool, when not to, or what alternatives exist?
A dedicated 'When to use' section lists three concrete scenarios for using this tool. However, it lacks an explicit 'when not to use' clause and only indirectly references start_new_conversation as an alternative, so it doesn't fully meet the 5-level bar.
Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.
start_new_conversationA
Start a new conversation with OpenAI Codex CLI.
Runs codex CLI in read-only sandbox mode and returns a thread_id for continuing the conversation later.
Limitations:
Runs in read-only sandbox β cannot modify files or execute shell commands.
Use only for read-only tasks: code reading, analysis, and Q&A.
When to use:
Analyzing the structure or behavior of a codebase
Code review or root cause analysis of bugs
Generating explanations or documentation drafts for code
Getting refactoring or architecture suggestions
Args: prompt: Prompt to send to codex. Use @filepath to mention files. working_directory: Directory path for codex to work in (optional).
Returns: Dict with thread_id and response.
| Name | Required | Description | Default |
|---|---|---|---|
| prompt | Yes | ||
| working_directory | No |
TDQS
Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?
With no annotations, the description carries the full burden. It clearly discloses read-only sandbox mode, inability to modify files/execute commands, and returns a thread_id and response. The description adds context beyond the basic schema, though it omits potential auth/error details.
Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.
Is the description appropriately sized, front-loaded, and free of redundancy?
The description is well-structured with clear sections (main description, limitations, when to use, args, returns). It is front-loaded with the core purpose, and every bullet point adds value without excessive verbosity.
Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.
Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?
Despite no output schema or annotations, the description explains the return format (Dict with thread_id and response), lists limitations, and provides use cases. It is sufficiently complete for an AI agent to understand when and how to invoke the tool.
Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.
Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?
Schema description coverage is 0%, but the description compensates by explaining each parameter: prompt includes the useful '@filepath' syntax hint, and working_directory is described as 'Directory path for codex to work in.' This adds meaning beyond the schema.
Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.
Does the description clearly state what the tool does and how it differs from similar tools?
The description states a specific verb and resource: 'Start a new conversation with OpenAI Codex CLI.' It clearly distinguishes from the sibling tool continue_conversation by mentioning it returns a thread_id for continuing the conversation later.
Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.
Does the description explain when to use this tool, when not to, or what alternatives exist?
Provides explicit 'When to use' list with four concrete use cases and a 'Limitations' section that explicitly excludes write operations and shell commands, saying 'Use only for read-only tasks.' This is strong guidance on when to use and when not to use.
Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.
TDQS
The two tools have clearly distinct purposes: one starts a new conversation and returns a thread_id, the other continues an existing conversation using that thread_id. There is no overlap or ambiguity between them.
Both tool names follow the same verb_noun pattern with snake_case, using 'start_new_' and 'continue_' as clear action prefixes. This consistency makes the API predictable and easy to navigate.
At only two tools, the count is on the low end but perfectly appropriate for the server's narrow purpose of managing Codex conversations. The tools cover the essential start/continue workflow without unnecessary additions.
The tool surface covers the primary conversation lifecycle (start and continue) with no dead ends. Minor gaps such as the absence of explicit conversation termination or history listing are acceptable given the read-only, session-based scope.
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
Search your AI chat history (ChatGPT, Claude, Codex) from any MCP client. Remote, private, read-only
The Cortex MCP server provides read-only access to real-time engineering context from the Cortex developer portal, allowing AI coding assistants to answer natural language questions about your organization's catalog (microservices, libraries, domains, teams, infrastructure), scorecards (engineering standards and best practices), initiatives (goals and deadlines), and Engineering Intelligence metrics. It includes tools for querying documentation, tracking personal entities, and accessing AI-assisted insights across the entire Cortex ecosystem.
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.
Related MCP Servers
- AlicenseAqualityBmaintenanceBridges OpenAI Codex CLI to any MCP client, allowing headless Codex sessions via tools like codex and codex-reply.2261MIT
- AlicenseNot gradedqualityDmaintenanceAn MCP server that provides technical consultation, code review, and code explanation by integrating with OpenAI's Codex CLI, enabling AI-powered coding assistance in a sandboxed, read-only environment.641MIT
- AlicenseNot gradedqualityDmaintenanceIntegrates OpenAI Codex CLI with Claude Code via MCP, enabling code execution, analysis, fixing, and web search within Claude Code.7651ISC
- AlicenseNot gradedqualityBmaintenanceA local, read-only MCP bridge that lets OpenAI Codex ask your authenticated Grok Build CLI for a second opinion without copying API keys into Codex.MIT
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/dazebug/easy-codex-mcp'
If you have feedback or need assistance with the MCP directory API, please join our Discord server