ai-cli-mcp
v2.24.0Run Claude, Codex, Gemini, Forge, and OpenCode CLIs through MCP with background jobs
These tools were reported by the server itself during our smoke test (tools/list), not copied from the README.
run
AI Agent Runner: Starts a Claude, Codex, Gemini, Forge, or OpenCode CLI process in the background and returns a PID immediately. Use list_processes and get_result to monitor progress. • File ops: Create, read, (fuzzy) edit, move, copy, delete, list files, analyze/ocr images, file content analysis • Code: Generate / analyse / refactor / fix • Git: Stage ▸ commit ▸ push ▸ tag (any workflow) • Terminal: Run any CLI cmd or open URLs • Web search + summarise content on-the-fly • Multi-step workflows & GitHub integration **IMPORTANT**: This tool now returns immediately with a PID…
| Parameter | Type | Description |
|---|---|---|
workFolder * | string | The working directory for the agent execution. Must be an absolute path. |
model | string | The model to use. Aliases (including user config): "claude-ultra" (opus; auto max reasoning), "codex-ultra" (gpt-6-astra; auto ultra reasoning), "gemini-ultra" (gemini-3.1-pro-preview). An explicit re… |
prompt | string | The detailed natural language prompt for the agent to execute. Either this or prompt_file is required. |
prompt_file | string | Path to a file containing the prompt. Either this or prompt is required. Must be an absolute path or relative to workFolder. |
reasoning_effort | string | Reasoning control for Claude and Codex. Claude uses --effort with "low", "medium", "high", "xhigh", "max". Codex uses model_reasoning_effort with "low", "medium", "high", "xhigh"; GPT-6 Astra and GPT-… |
session_id | string | Optional session ID to resume a previous session. Supported for Claude, Codex, Gemini, Forge, and OpenCode. OpenCode resumes in-place via --session and may also be combined with explicit oc-<provider/… |
list_processes
List all running and completed AI agent processes. Returns a simple list with PID, agent type, and status for each process.
get_result
Get the current output and status of an AI agent process by PID. Defaults to a compact result shape; set verbose to true for full metadata and detailed parsed output.
| Parameter | Type | Description |
|---|---|---|
pid * | number | The process ID returned by run tool. |
verbose | boolean | Optional: If true, returns the full result shape including metadata fields and detailed parsed output such as tool usage history. Defaults to false. |
wait
Wait for multiple AI agent processes to complete and return their results. Defaults to compact result items; set verbose to true for full metadata and detailed parsed output.
| Parameter | Type | Description |
|---|---|---|
pids * | array | List of process IDs to wait for (returned by the run tool). |
timeout | number | Optional: Maximum time to wait in seconds. Defaults to 180 (3 minutes). |
verbose | boolean | Optional: If true, each result item uses the full result shape including metadata fields and detailed parsed output. Defaults to false. |
peek
One-shot short observation window for running child agents. Returns only natural-language message events, and optionally normalized tool_call events, observed during this call; not a history API, not gapless streaming, and not stdout/stderr tailing. In v1, message extraction is supported for Codex, Claude, OpenCode, Gemini, and best-effort Forge Summary/Completed successfully lines. Forge tool calls are low-precision Execute/Finished markers and never include command output. Tool calls exclude raw tool output.
| Parameter | Type | Description |
|---|---|---|
pids * | array | Process IDs returned by run. Duplicates are deduplicated server-side, preserving first occurrence order. Unknown PIDs are returned per process as not_found. |
include_tool_calls | boolean | Optional: include normalized tool_call events without raw tool output. Defaults to false. |
peek_time_sec | number | Optional positive integer observation window in seconds. Defaults to 10; maximum is 60. |
kill_process
Terminate a running AI agent process by PID.
| Parameter | Type | Description |
|---|---|---|
pid * | number | The process ID to terminate. |
cleanup_processes
Remove all completed and failed processes from the process list to free up memory.
doctor
Check supported AI CLI binary availability and path resolution. Does not verify login state or terms acceptance.
models
List supported model names, model aliases, and dynamic backend discovery hints.