codex-mcp-server

v1.3.9
@etheaven/codex-mcp-server Checked 4 days ago Published 8 months ago

MCP 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.

ParameterTypeDescription
prompt *stringTask or question. Use @ to include files (e.g., '@largefile.ts explain').
approvalstringApproval policy: untrusted, on-failure, on-request, never
approvalPolicystringApproval: never, on-request, on-failure, untrusted
cdstringWorking directory
changeModebooleanReturn structured OLD/NEW edits for refactoring
chunkCacheKeystringCache key for continuation
chunkIndexnumberChunk index (1-based)
configConfiguration overrides as 'key=value' string or object
disableFeaturesarrayDisable feature flags (repeatable). Equivalent to -c features.<name>=false
enableFeaturesarrayEnable feature flags (repeatable). Equivalent to -c features.<name>=true
fullAutobooleanFull automation mode
imageOptional image file path(s) to include with the prompt
includeMetadatabooleanInclude configuration metadata in response
includeThinkingbooleanInclude reasoning/thinking section in response
modelstringModel 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…
ossbooleanUse local Ollama server (convenience for -c model_provider=oss). Requires Ollama running locally. Automatically sets sandbox to workspace-write if not specified.
profilestringConfiguration profile to use from ~/.codex/config.toml
reasoningEffortstringReasoning 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…
sandboxbooleanQuick automation mode: enables workspace-write + on-failure approval. Alias for fullAuto.
sandboxModestringAccess: read-only, workspace-write, danger-full-access
searchbooleanEnable web search by activating web_search_request feature flag. Requires network access - automatically sets sandbox to workspace-write if not specified.
timeoutnumberMaximum execution time in milliseconds (optional)
workingDirstringWorking directory for execution
yoloboolean⚠️ 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.

ParameterTypeDescription
tasks *arrayArray of atomic tasks to delegate to Codex
disableFeaturesarrayDisable feature flags
enableFeaturesarrayEnable feature flags
modelstringModel 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.
ossbooleanUse local Ollama server
parallelbooleanExecute tasks in parallel (experimental)
reasoningEffortstringReasoning effort: none, minimal, low, medium, high, xhigh.
sandboxstringSandbox mode: read-only, workspace-write, danger-full-access
searchbooleanEnable web search for all tasks (activates web_search_request feature)
stopOnErrorbooleanStop execution if any task fails
timeoutnumberMaximum execution time per task in milliseconds
workingDirstringWorking directory for execution

ping

Echo

ParameterTypeDescription
promptstringMessage 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.

ParameterTypeDescription
prompt *stringBrainstorming challenge or question
approvalPolicystringApproval: never, on-request, on-failure, untrusted
cdstringWorking directory
constraintsstringLimitations: budget, time, technical, legal, etc.
disableFeaturesarrayDisable feature flags
domainstringDomain: software, business, creative, research, product, marketing, etc.
enableFeaturesarrayEnable feature flags
existingContextstringBackground info or previous attempts
fullAutobooleanFull automation mode
ideaCountintegerNumber of ideas (default: 12, range: 5-30)
includeAnalysisbooleanInclude feasibility/impact analysis
methodologystringFramework: divergent, convergent, scamper, design-thinking, lateral, auto (default)
modelstringModel 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.
ossbooleanUse local Ollama server
reasoningEffortstringReasoning effort: none, minimal, low, medium (default), high, xhigh. Higher = deeper analysis, slower, more expensive.
sandboxModestringAccess: read-only, workspace-write, danger-full-access
searchbooleanEnable web search for research (activates web_search_request feature)
yoloboolean⚠️ 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.

ParameterTypeDescription
cacheKey *stringThe cache key provided in the initial changeMode response
chunkIndex *numberWhich chunk to retrieve (1-based index)

timeout-test

Test timeout prevention by running for a specified duration

ParameterTypeDescription
duration *numberDuration in milliseconds (minimum 10ms)