codex-mcp-async
Enables Claude Code to execute OpenAI Codex (GPT-5) tasks asynchronously with context filtering, supporting model selection and reasoning levels.
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-asyncanalyze this codebase and generate comprehensive documentation"
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 Async Server
Asynchronous MCP wrapper for OpenAI Codex CLI with 95% context savings
Enable Claude Code to call Codex (GPT-5) asynchronously, filtering out thinking processes to save 95% context tokens.
Features
โ Async execution - Start Codex tasks in background, continue working
โ Context-efficient - Filters thinking/exec logs, returns only core results
โ Full control - Access all Codex models and reasoning efforts
โ Zero config - Works out of the box with Claude Code
Related MCP server: claude-code
Quick Start
๐ Install with UVX
Zero configuration - just run:
uvx codex-mcp-asyncConfigure Claude Code
Add to your ~/.claude/settings.json:
{
"mcpServers": {
"codex-mcp": {
"command": "uvx",
"args": ["codex-mcp-async"],
"env": {}
}
}
}Or use the provided config: Copy
mcp-config.jsonto your Claude settings directory
Restart Claude Code
Reload or restart Claude Code to load the MCP server.
Usage Examples
๐ Async Execution (Game Changer!)
Start a long Codex task and continue working immediately:
You:
Please analyze this entire codebase and generate comprehensive documentation
Claude: I'll analyze your entire codebase and generate comprehensive documentation. This is a large task, so I'll start it asynchronously...
โ Task Started (Task ID: abc12345) You can continue working on other things while it runs in the background!
You: (Continue working immediately)
While the documentation is being generated, help me fix this bug
Claude: Sure! Let me help you fix that bug...
You: (A few minutes later)
Can you check if the documentation task is finished?
Claude: โ Documentation Complete!
[View Generated Documentation]
API reference
Code examples
Architecture overview
Setup instructions
โก Parallel Execution
Run multiple Codex tasks simultaneously:
You:
I need to do three things at once:
Generate unit tests for utils.py
Refactor database.py to use async/await
Add type hints to all functions in api.py
Claude: I'll start all three tasks in parallel!
๐ Task 1 Started (Task ID: task1) - Generating unit tests ๐ Task 2 Started (Task ID: task2) - Refactoring database code ๐ Task 3 Started (Task ID: task3) - Adding type hints
All tasks are running in parallel...
You: (Later)
Are all three tasks finished?
Claude: โ All Complete!
โ Task 1: Unit tests for utils.py generated
โ Task 2: database.py refactored to async mode
โ Task 3: Type hints added to api.py functions
๐ฏ Quick Sync Tasks
For simple immediate tasks:
You:
Write a Python function to validate email addresses
Claude:
import re
def validate_email(email):
pattern = r'^[a-zA-Z0-9._%+-]+@[a-zA-Z0-9.-]+\.[a-zA-Z]{2,}$'
return re.match(pattern, email) is not None
# Usage examples
print(validate_email("user@example.com")) # True
print(validate_email("invalid-email")) # Falseโ Task Complete!
๐ง Model Selection
You:
Analyze this research paper using GPT-5 with high reasoning
Claude:
# Uses analysis model instead of coding model
mcp__codex_mcp__codex_execute(
prompt="Analyze this research paper on machine learning",
args=["--full-auto", "-m", "gpt-5", "--config", "model_reasoning_effort=high"]
)Why Async + Context Filtering?
Problem 1: Codex blocks Claude Code while running. Problem 2: Codex outputs 3000+ tokens of thinking logs for every task.
Solution: This MCP server runs Codex asynchronously and filters out 95% of the noise.
Benefits:
๐ Start a task and continue working immediately
โก Run multiple tasks in parallel
๐พ 95% context savings (3000 tokens โ 150 tokens)
๐ฏ Clean, focused results only
๐งน Automatic process cleanup
Advanced Usage
Model Selection
gpt-5-codex (default) - Best for coding, debugging, implementation
gpt-5 - Best for analysis, planning, research
Reasoning Levels
minimal/low- Quick tasksmedium- Standard work (default)high- Complex problems
Example Configurations
# Quick coding task
args=["--full-auto", "--config", "model_reasoning_effort=low"]
# Complex analysis
args=["--full-auto", "-m", "gpt-5", "--config", "model_reasoning_effort=high"]
# Web search + analysis
args=["--full-auto", "--search", "-m", "gpt-5"]Architecture & Performance
Claude Code (you)
โ calls MCP tool
codex-mcp-async (runs Codex in background)
โ filters thinking logs (95% savings!)
Codex CLI (GPT-5)
โ returns clean result
Claude Code (receives focused output)Context Savings:
Before: 3600 tokens (thinking + logs + result)
After: 180 tokens (clean result only)
95% reduction!
Troubleshooting
Server not showing up?
Check:
uvx codex-mcp-asyncruns without errorsRestart Claude Code after config change
Task stuck in "running"?
Large tasks take time to complete
Check debug logs:
/tmp/codex_mcp_debug.log
Context too large?
Enable filtering: Always use async mode for long tasks
Split large tasks into smaller chunks
Requirements
License
MIT License - see LICENSE
Questions? Open an issue on GitHub.
Made with โค๏ธ for the Claude Code + Codex community
Available Tools
3 toolscodex_check_resultA
Check the status of an async Codex task. Returns running/completed status and the result if available.
| Name | Required | Description | Default |
|---|---|---|---|
| task_id | Yes | The task_id returned by codex_execute_async |
TDQS
Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?
No annotations provided, so the description bears full burden. It transparently discloses that it returns running/completed status and result if available. However, it lacks details on error handling (e.g., task not found) or whether the call blocks.
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?
A single, well-structured sentence that front-loads the purpose and delivers key behavioral details without wasting words.
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?
For a simple checker tool with one parameter and no output schema, the description is largely complete. It covers status outcomes and result availability, though adding a note about potential error states would improve completeness.
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 coverage is 100% with the schema description already explaining the parameter. The tool description adds no new meaning beyond what the schema provides, so baseline 3 is appropriate.
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 the tool checks status of an async Codex task, with specific verb 'Check' and resource 'async Codex task'. It distinguishes from siblings by focusing on polling/completion, while codex_execute presumably runs synchronously and codex_execute_async initiates the task.
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 after codex_execute_async by mentioning 'task_id returned by codex_execute_async' in the schema, but it does not explicitly state when to use or not use this tool, nor does it provide direct alternatives beyond naming siblings.
Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.
codex_executeA
Execute OpenAI Codex (GPT-5) synchronously with full control over subcommand and arguments. Returns only the core result, filtering out thinking process to save context. Common usage: subcommand="exec", prompt="your task", args=["--full-auto"]
| Name | Required | Description | Default |
|---|---|---|---|
| args | No | Additional command-line arguments. Model selection: ["-m", "gpt-5-codex"] for coding (default) or ["-m", "gpt-5"] for analysis. Reasoning effort: ["--config", "model_reasoning_effort=low|medium|high"] (gpt-5-codex supports low/medium/high; gpt-5 supports minimal/low/medium/high). Example: ["--full-auto", "-m", "gpt-5", "--config", "model_reasoning_effort=high"]. Always include "--full-auto" for non-interactive execution. | |
| prompt | No | Main prompt/argument for the command (required for exec, optional for others) | |
| timeout | No | Timeout in seconds (default: no limit) | |
| subcommand | No | Codex subcommand to execute | exec |
TDQS
Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?
No annotations present, so the description carries the full burden. It discloses that execution is synchronous and that the thinking process is filtered out, but does not address error handling, timeouts, authentication needs, or potential side effects.
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 three sentences, front-loading the core purpose and key behavioral trait (synchronous, filters thinking). No redundant information.
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 absence of an output schema, the description should clarify the return format beyond 'core result.' It also lacks guidance on error conditions. However, the example usage helps contextualize parameter 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 description coverage is 100%, and the schema already provides detailed parameter documentation. The description adds a common usage example but does not significantly extend 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 clearly states 'Execute OpenAI Codex (GPT-5) synchronously' with specific verb and resource. It mentions synchronization, which hints at differentiation from the async sibling, but does not explicitly contrast them.
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 provides a common usage example and mentions subcommands, but does not explicitly state when to use this tool versus the async sibling or other alternatives. No when-not-to-use guidance is given.
Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.
codex_execute_asyncA
Start a Codex task in the background and return immediately with a task_id. Use codex_check_result to retrieve the result later. This allows you to continue working while Codex runs.
| Name | Required | Description | Default |
|---|---|---|---|
| args | No | Additional command-line arguments. Model selection: ["-m", "gpt-5-codex"] for coding (default) or ["-m", "gpt-5"] for analysis. Reasoning effort: ["--config", "model_reasoning_effort=low|medium|high"] (gpt-5-codex supports low/medium/high; gpt-5 supports minimal/low/medium/high). Example: ["--full-auto", "-m", "gpt-5", "--config", "model_reasoning_effort=high"]. Always include "--full-auto" for non-interactive execution. | |
| prompt | No | Main prompt/argument for the command | |
| subcommand | No | Codex subcommand to execute | exec |
TDQS
Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?
No annotations are provided, so the description must cover behavioral traits. It discloses the key behavior (async, returns task_id) but does not mention limitations, error handling, permissions, or side effects. It is adequate but not comprehensive.
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 three sentences, front-loaded with the primary purpose. Every sentence adds value: first gives action, second explains retrieval, third states benefit. No wasted words.
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?
The description covers the core asynchronous flow and how to retrieve results, which is sufficient given the tool's simplicity and the schema's completeness. It could briefly mention subcommand defaults or args usage, but the schema handles that.
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 coverage is 100%, so the baseline is 3. The description does not add any parameter-specific information; it only describes the overall tool behavior. The schema already documents each parameter with 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 'Start a Codex task in the background and return immediately with a task_id', specifying the verb and resource, and differentiates from sibling tools by noting the asynchronous behavior and the need to use codex_check_result to retrieve results.
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 explains that the tool allows you to continue working while Codex runs, and instructs to use codex_check_result to retrieve results later. This implies when to use it versus the synchronous codex_execute, but does not explicitly exclude other scenarios.
Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.
TDQS
Each tool serves a distinct purpose: synchronous execution, async execution, and result checking. No overlap exists between these operations.
All tools start with 'codex_', but there is a slight inconsistency: 'codex_execute' lacks a 'sync' modifier while its async counterpart has it, and 'codex_check_result' uses a noun phrase. Still, the pattern is mostly predictable.
With only 3 tools, the server is minimal but appropriately scoped for its purpose of providing both sync and async code execution with result retrieval.
The core execution and result checking are covered, but missing features like cancelling async tasks or listing pending tasks create minor gaps in the lifecycle.
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
No-data MCP handoff for local Claude Code to Codex harness moves. $49 lifetime.
Coding agents from Claude Code, Cursor and Codex claim jobs and lock files on one shared board.
A paid remote MCP for OpenAI Codex context compressor, built to return verdicts, receipts, usage log
A paid remote MCP for OpenAI Codex agent coordination MCP, built to return verdicts, receipts, usage
Related MCP Servers
- FlicenseNot gradedqualityDmaintenanceEnables asynchronous and parallel execution of Claude Code tasks across multiple sessions, allowing users to start background tasks and continue working immediately without blocking.1
- AlicenseNot gradedqualityDmaintenanceEnables Codex to delegate tasks to Claude Code, allowing Claude to investigate, edit, and verify changes in the repository with background job management.3MIT
- AlicenseNot gradedqualityDmaintenanceEnables asynchronous and parallel execution of Gemini CLI tasks within Claude Code, allowing background task management and multi-instance parallelism.4MIT
- 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
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/jeanchristophe13v/codex-mcp-async'
If you have feedback or need assistance with the MCP directory API, please join our Discord server