codex-as-mcp
v2026.6.29.1MCP server for delegating tasks to Codex CLI subagents
These tools were reported by the server itself during our smoke test (tools/list), not copied from the README.
spawn_agent
Spawn a Codex agent to work inside the current working directory. The server resolves the working directory via ``os.getcwd()`` so it inherits whatever environment the MCP process currently has. Args: prompt: All instructions/context the agent needs for the task. Returns: The agent's final response (clean output from Codex CLI).
| Parameter | Type | Description |
|---|---|---|
prompt * | string |
spawn_agents_parallel
Spawn multiple Codex agents in parallel. Each spawned agent reuses the server's current working directory (``os.getcwd()``). Args: agents: List of agent specs, each with a 'prompt' entry. Example: [ {"prompt": "Create math.md"}, {"prompt": "Create story.md"} ] Returns: List of results with 'index', 'output', and optional 'error' fields.
| Parameter | Type | Description |
|---|---|---|
agents * | array |