codex-mcp-server
v1.3.9MCP server for Codex CLI integration
These tools were reported by the server itself during our smoke test (tools/list), not copied from the README.
ask-codex
Use OpenAI Codex to analyze, review, edit, or generate code. Call this tool whenever the user mentions "codex", "use codex", or wants to leverage OpenAI models (GPT-5.4, GPT-5.3-codex, etc.) for code tasks. Supports file references with @ syntax (e.g. @src/), model selection, reasoning effort control, and structured edits via changeMode.
| Parameter | Type | Description |
|---|---|---|
prompt * | string | Task or question. Use @ to include files (e.g., '@largefile.ts explain'). |
approval | string | Approval policy: untrusted, on-failure, on-request, never |
approvalPolicy | string | Approval: never, on-request, on-failure, untrusted |
cd | string | Working directory |
changeMode | boolean | Return structured OLD/NEW edits for refactoring |
chunkCacheKey | string | Cache key for continuation |
chunkIndex | number | Chunk index (1-based) |
config | Configuration overrides as 'key=value' string or object | |
disableFeatures | array | Disable feature flags (repeatable). Equivalent to -c features.<name>=false |
enableFeatures | array | Enable feature flags (repeatable). Equivalent to -c features.<name>=true |
fullAuto | boolean | Full automation mode |
image | Optional image file path(s) to include with the prompt | |
includeMetadata | boolean | Include configuration metadata in response |
includeThinking | boolean | Include reasoning/thinking section in response |
model | string | Model ID to use. IMPORTANT: Use exact IDs listed below, do NOT invent or modify model names. Recommended (use in this order): gpt-5.4 (default, best), gpt-5.3-codex (best coding), gpt-5.3-codex-spar… |
oss | boolean | Use local Ollama server (convenience for -c model_provider=oss). Requires Ollama running locally. Automatically sets sandbox to workspace-write if not specified. |
profile | string | Configuration profile to use from ~/.codex/config.toml |
reasoningEffort | string | Reasoning effort level. Controls depth of internal reasoning. Values: none, minimal, low, medium (default), high, xhigh. Higher = deeper analysis but slower and more expensive. Not all models support… |
sandbox | boolean | Quick automation mode: enables workspace-write + on-failure approval. Alias for fullAuto. |
sandboxMode | string | Access: read-only, workspace-write, danger-full-access |
search | boolean | Enable web search by activating web_search_request feature flag. Requires network access - automatically sets sandbox to workspace-write if not specified. |
timeout | number | Maximum execution time in milliseconds (optional) |
workingDir | string | Working directory for execution |
yolo | boolean | ⚠️ Bypass all safety (dangerous) |
batch-codex
Run multiple tasks through OpenAI Codex in batch. Use when the user wants Codex to handle several tasks sequentially — mass refactoring, bulk code changes, or automated transformations.
| Parameter | Type | Description |
|---|---|---|
tasks * | array | Array of atomic tasks to delegate to Codex |
disableFeatures | array | Disable feature flags |
enableFeatures | array | Enable feature flags |
model | string | Model ID. Recommended order: gpt-5.4 (default), gpt-5.3-codex (coding), gpt-5.2-codex, gpt-5.2, gpt-5.1, gpt-5, gpt-5-mini. |
oss | boolean | Use local Ollama server |
parallel | boolean | Execute tasks in parallel (experimental) |
reasoningEffort | string | Reasoning effort: none, minimal, low, medium, high, xhigh. |
sandbox | string | Sandbox mode: read-only, workspace-write, danger-full-access |
search | boolean | Enable web search for all tasks (activates web_search_request feature) |
stopOnError | boolean | Stop execution if any task fails |
timeout | number | Maximum execution time per task in milliseconds |
workingDir | string | Working directory for execution |
ping
Echo
| Parameter | Type | Description |
|---|---|---|
prompt | string | Message to echo |
Help
receive help information
version
Display version and system information
brainstorm
Brainstorm ideas using OpenAI Codex with structured frameworks (SCAMPER, design-thinking, lateral, etc.). Use when the user wants creative ideation, brainstorming, or idea generation via Codex.
| Parameter | Type | Description |
|---|---|---|
prompt * | string | Brainstorming challenge or question |
approvalPolicy | string | Approval: never, on-request, on-failure, untrusted |
cd | string | Working directory |
constraints | string | Limitations: budget, time, technical, legal, etc. |
disableFeatures | array | Disable feature flags |
domain | string | Domain: software, business, creative, research, product, marketing, etc. |
enableFeatures | array | Enable feature flags |
existingContext | string | Background info or previous attempts |
fullAuto | boolean | Full automation mode |
ideaCount | integer | Number of ideas (default: 12, range: 5-30) |
includeAnalysis | boolean | Include feasibility/impact analysis |
methodology | string | Framework: divergent, convergent, scamper, design-thinking, lateral, auto (default) |
model | string | Model ID. Recommended order: gpt-5.4 (default), gpt-5.3-codex (coding), gpt-5.2-codex, gpt-5.2, gpt-5.1, gpt-5, gpt-5-mini, gpt-5-nano, gpt-4.1. |
oss | boolean | Use local Ollama server |
reasoningEffort | string | Reasoning effort: none, minimal, low, medium (default), high, xhigh. Higher = deeper analysis, slower, more expensive. |
sandboxMode | string | Access: read-only, workspace-write, danger-full-access |
search | boolean | Enable web search for research (activates web_search_request feature) |
yolo | boolean | ⚠️ Bypass all safety (dangerous) |
fetch-chunk
Retrieves cached chunks from a changeMode response. Use this to get subsequent chunks after receiving a partial changeMode response.
| Parameter | Type | Description |
|---|---|---|
cacheKey * | string | The cache key provided in the initial changeMode response |
chunkIndex * | number | Which chunk to retrieve (1-based index) |
timeout-test
Test timeout prevention by running for a specified duration
| Parameter | Type | Description |
|---|---|---|
duration * | number | Duration in milliseconds (minimum 10ms) |