ai-cli-mcp

v2.24.0
io.github.mkXultra/ai-cli-mcp Checked 3 days ago Published 2 months ago

Run 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…

ParameterTypeDescription
workFolder *stringThe working directory for the agent execution. Must be an absolute path.
modelstringThe 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…
promptstringThe detailed natural language prompt for the agent to execute. Either this or prompt_file is required.
prompt_filestringPath to a file containing the prompt. Either this or prompt is required. Must be an absolute path or relative to workFolder.
reasoning_effortstringReasoning 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_idstringOptional 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.

ParameterTypeDescription
pid *numberThe process ID returned by run tool.
verbosebooleanOptional: 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.

ParameterTypeDescription
pids *arrayList of process IDs to wait for (returned by the run tool).
timeoutnumberOptional: Maximum time to wait in seconds. Defaults to 180 (3 minutes).
verbosebooleanOptional: 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.

ParameterTypeDescription
pids *arrayProcess IDs returned by run. Duplicates are deduplicated server-side, preserving first occurrence order. Unknown PIDs are returned per process as not_found.
include_tool_callsbooleanOptional: include normalized tool_call events without raw tool output. Defaults to false.
peek_time_secnumberOptional positive integer observation window in seconds. Defaults to 10; maximum is 60.

kill_process

Terminate a running AI agent process by PID.

ParameterTypeDescription
pid *numberThe 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.