codex-mcp-agent
Enables calling OpenAI's Codex agent for general-purpose task execution and specialized code review.
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-agentcreate a JavaScript function that reverses a string"
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-agent
Note: This project is a fork of the current Git remote:
Enable Claude Code, Cursor and other AI tools to call Codex for task execution. Plus/Pro/Team subscribers can maximize GPT-5 usage without additional costs.
Setup
1. Install Codex CLI
npm install -g @openai/codex
codex login2. Configure MCP
Add to your .mcp.json:
Safe Mode (Default):
{
"mcpServers": {
"codex": {
"type": "stdio",
"command": "uvx",
"args": ["codex-mcp-agent@latest"]
}
}
}Writable Mode:
{
"mcpServers": {
"codex": {
"type": "stdio",
"command": "uvx",
"args": ["codex-mcp-agent@latest", "--yolo"]
}
}
}Or use Claude Code commands:
# Safe mode (default)
claude mcp add codex-mcp-agent -- uvx codex-mcp-agent@latest
# Writable mode
claude mcp add codex-mcp-agent -- uvx codex-mcp-agent@latest --yoloRelated MCP server: Codex MCP Server
Tools
The MCP server exposes two tools:
codex_execute(prompt, work_dir)- General purpose codex executioncodex_review(review_type, work_dir, target?, prompt?)- Specialized code review
If you have any other use case requirements, feel free to open issue.
HTTP/SSE Mode (Optional)
For local personal use, you can run the server over HTTP with Server-Sent Events (SSE) and connect via type: "sse".
Start the server in SSE mode:
uvx codex-mcp-agent@latest --sse # safe mode, localhost:8822
uvx codex-mcp-agent@latest --sse --yolo # writable mode
# Options
# --host (default: 127.0.0.1)
# --port (default: 8822)Configure your client .mcp.json:
{
"mcpServers": {
"codex": {
"type": "sse",
"url": "http://127.0.0.1:8822"
}
}
}Notes:
SSE mode keeps the same Safe/Writable behavior controlled by
--yolo.SSE server binds to
127.0.0.1by default and has no auth/CORS for simplicity.Stdio mode remains the default; use
--sseonly if you prefer HTTP.
Optional: Streamable HTTP transport (if your client supports it):
uvx codex-mcp-agent@latest --http # safe mode streamable-http transportSafety
Safe Mode: Default read-only operations protect your environment
Writable Mode: Use
--yoloflag when you need full codex capabilitiesSequential Execution: Prevents conflicts from parallel agent operations
Available Tools
3 toolscodex_executeD
Execute prompt using codex for general purpose.
| Name | Required | Description | Default |
|---|---|---|---|
| prompt | Yes | ||
| work_dir | Yes | ||
| ctx | Yes |
Output Schema
| Name | Required | Description |
|---|---|---|
| result | Yes |
TDQS
Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?
No annotations provided, and the description fails to disclose any behavioral traits such as side effects, authentication requirements, rate limits, or what happens upon execution. The agent has no insight into the tool's safety or behavior.
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 a single short sentence, but this conciseness comes at the cost of necessary detail. It is under-specification rather than efficient communication.
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 the tool has 3 required parameters, a complex input, and an output schema but no annotations, the description is severely incomplete. It fails to provide essential context for correct invocation.
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%. The description does not elaborate on any of the three parameters (prompt, work_dir, ctx), nor does it explain the complex Context object. The agent receives no additional meaning beyond the bare 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?
Description states 'Execute prompt using codex for general purpose', which is somewhat clear but vague. It does not distinguish from sibling tools codex_research and codex_review, leaving the agent guessing about the specific behavior.
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?
No guidance on when to use this tool vs alternatives. The description provides no context about prerequisites, exclusions, or scenarios where codex_execute is preferred over codex_research or codex_review.
Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.
codex_researchA
Produce an analysis report around a topic using the repository code.
Args:
system_prompt: High-level system guidance for the research process.
work_dir: Repository/workspace directory to analyze.
topic: Investigation topic or question to answer.
| Name | Required | Description | Default |
|---|---|---|---|
| system_prompt | Yes | ||
| work_dir | Yes | ||
| topic | Yes | ||
| ctx | No |
Output Schema
| Name | Required | Description |
|---|---|---|
| result | Yes |
TDQS
Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?
No annotations provided, so description carries full burden. It states the tool produces a report but does not disclose side effects, auth needs, or output format. Adequate but minimal.
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 concise with a clear docstring format listing parameters. It avoids extraneous information, though it could be slightly more structured.
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, no output schema description, and moderate complexity (4 params, 3 required), the description adequately covers the tool's purpose and core parameters. It lacks details on return value or behavior beyond 'produce a report', but is sufficient for basic use.
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 has 0% description coverage. The description adds meaning to all three required parameters (e.g., 'high-level system guidance', 'repository/workspace directory', 'investigation topic'). The optional ctx parameter is not mentioned, but it's internal. Overall, description compensates well for lack of schema 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?
The description clearly states it produces an analysis report about a topic using repository code, with a specific verb and resource. This distinguishes it from sibling tools codex_execute (execution) and codex_review (review).
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?
The description implies usage for research/analysis but provides no explicit guidance on when to use vs. alternatives like codex_execute or codex_review, nor any conditions for use.
Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.
codex_reviewC
Execute code review using codex with pre-defined review prompts.
| Name | Required | Description | Default |
|---|---|---|---|
| review_type | Yes | ||
| work_dir | Yes | ||
| target | No | ||
| prompt | No | ||
| ctx | No |
Output Schema
| Name | Required | Description |
|---|---|---|
| result | Yes |
TDQS
Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?
With no annotations provided, the description carries the full burden of behavioral disclosure. However, it only mentions 'pre-defined review prompts,' giving a slight hint about input constraints, but omits critical details like whether the tool is read-only, whether it modifies state, or what side effects occur.
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 a single sentence, which is concise but overly brief given the tool's complexity (5 parameters, no schema descriptions). It fails to earn its place by omitting essential details, making it under-specified rather than efficiently concise.
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?
Considering the tool has 5 parameters, 0% schema description coverage, no annotations, and an output schema that is not explained, the description is severely incomplete. It does not address how parameters interact, what valid inputs are, or what the tool returns, leaving the agent with insufficient information to use it effectively.
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?
The schema has 0% description coverage for parameters, so the description must compensate. Yet it adds no meaning to review_type, work_dir, target, prompt, or ctx. The agent gains no insight into what these parameters represent or how to use them correctly.
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 'Execute code review using codex with pre-defined review prompts,' which clearly identifies the tool's purpose as code review. While it distinguishes from siblings like codex_execute and codex_research by focusing on review, it does not elaborate on what makes this review tool unique.
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?
There is no guidance on when to use this tool versus the alternatives codex_execute or codex_research. The description lacks context about typical use cases or prerequisites, leaving the agent without decision support.
Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.
TDQS
Each tool targets a distinct activity: general execution, repository research, and code review. No overlap in purpose.
All tools follow a consistent 'codex_verb' pattern (execute, research, review), making them predictable and easy to distinguish.
Three tools is well-scoped for a focused Codex-based agent, covering key functionalities without bloat.
The tools cover general execution, research, and code review, but could benefit from additional tools like code generation or explanation to fully round out the domain.
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
Live SEO workflow tools for Claude Code, Codex, and AI agents.
No-data MCP handoff for local Claude Code to Codex harness moves. $49 lifetime.
A paid remote MCP for OpenAI Codex agent coordination MCP, built to return verdicts, receipts, usage
Operate Linux, macOS and Windows from your LLM. Every action runs through an auditable allowlist.
Related MCP Servers
- AlicenseCqualityFmaintenanceConnects AI assistants like Claude to the Codex CLI for code analysis, editing, and execution. Supports file references with @ syntax, sandboxed code execution with approval workflows, and structured code changes for automated refactoring and documentation.8198179MIT
- AlicenseNot gradedqualityDmaintenanceIntegrates OpenAI Codex CLI with Claude Code via MCP, enabling code execution, analysis, fixing, and web search within Claude Code.7651ISC
- AlicenseAqualityDmaintenanceEnables Claude Code to delegate tasks to OpenAI's Codex CLI (GPT-5.4) with structured execution traces, parallel execution, session persistence, and adversarial code review.15MIT
- AlicenseNot gradedqualityCmaintenanceEnables Talon agents to delegate autonomous coding tasks to OpenAI Codex, supporting multi-step code operations with configurable sandboxing and approval policies.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/1WorldCapture/codex-as-mcp'
If you have feedback or need assistance with the MCP directory API, please join our Discord server