AI Cli MCP logo

AI Cli MCP

Runs Claude, Codex, Gemini, Grok, OpenCode, and Pi agents as tracked background processes over MCP.

Install AI Cli MCP

Pick your client, then add it in one click or paste the config.

STDIONode.js
~/Library/Application Support/Claude/claude_desktop_config.json
claude_desktop_config.json
{
  "mcpServers": {
    "ai-cli-mcp": {
      "command": "npx",
      "args": [
        "-y",
        "--package",
        "ai-cli-mcp@latest",
        "ai-cli"
      ]
    }
  }
}

Settings → Developer → Edit Config, merge this into mcpServers, then fully quit and reopen Claude Desktop.

We couldn’t confirm it starts correctly

We ran the install command but it didn't respond within our test window — this can mean a slow first-time install rather than a real problem.

npx -y --package ai-cli-mcp@latest ai-cli

No response to initialize.

This is an experimental automated check and can have false negatives — missing environment variables, a slow cold install, etc. It doesn’t necessarily mean something’s wrong. Last checked 5d ago.

Overview

The ai-cli-mcp MCP server lets MCP clients launch Claude, Codex, Gemini, Forge, OpenCode, Grok, and Pi command-line agents as background processes. Its run tool selects a backend from the requested model, while wait, peek, get_result, list_processes, and kill_process manage execution by PID. Doctor checks CLI availability and models reports supported names and discovery hints. Reach for it when an MCP client needs parallel, asynchronous work from locally installed AI CLI tools.

Use cases

  • Launch parallel coding agents for separate repository areas
  • Run asynchronous documentation and test-generation tasks
  • Inspect child-agent progress without waiting for completion
  • Collect combined results from multiple process IDs
  • Check local CLI availability before starting an agent

Key features

  • Automatic CLI selection from model names
  • Background process management with PID tracking
  • Parallel waits with combined results
  • Incremental message and tool-call observation
  • CLI availability and model discovery checks
  • Support for multiple local AI CLI backends

Tools8

What AI Cli MCP lets your agent do. Expand a tool for its parameters.

Self-reported~332 tokens of context

Security & health

What it can reach and how reliably it runs — from our own checks, not the maintainer’s claims.

ActiveLast checked 1d ago

Recent health check succeeded.

4/4 checks healthy over the last 40d

Supply-chain signal

No high-severity advisories surfaced by our automated scan.

Critical 0High 0Medium 0Low 0

Scanned 13d ago via OSV.dev · ai-cli-mcp@latest (npm)

Adoption & maintenance

Factual signals from GitHub, npm, and our automated checks — not a rating.

GitHub stars27Stargazers on the source repository.
Last commit23d agoMost recent push to the default branch.
Install checkInconclusiveDidn't respond in our test window — often a slow first install.
Tools exposed8Callable tools this server registers over MCP.
Directory activity2 viewsConfig copies, upvotes, and views on AllMCPs.

How AI Cli MCP works

What ai-cli-mcp does

The ai-cli-mcp MCP server exposes local AI command-line programs through MCP. The requested model determines which CLI is selected.

Runs are tracked by process ID, allowing an MCP client to start several agents and handle other work while they execute. Results can be collected individually or together. This fits repository maintenance, code review, documentation, and other tasks where separate agents can work on distinct areas.

How it works

The run tool accepts a prompt and execution context such as a working directory, model, and, where supported, session information. It returns process information instead of requiring the caller to remain blocked until completion. wait accepts multiple process IDs and blocks until they finish or its timeout expires, then combines their results.

Use peek for a short observation window over active child agents. It returns structured events from that call, including assistant messages by default and normalized tool-call events when requested. get_result reports the current output and status for one PID, while list_processes shows active and completed processes with basic status information. kill_process terminates a running process.

The ai-cli-mcp MCP server also provides diagnostic and discovery tools. doctor checks whether supported CLI binaries can be found from the MCP client environment; it does not check login status or terms acceptance. models returns supported model names, aliases, and dynamic backend discovery hints.

Setup and configuration

The ai-cli-mcp MCP server is distributed as the ai-cli-mcp npm package. The documented MCP configuration runs it with npx -y ai-cli-mcp@latest. It can also be added through the Claude CLI MCP command. A global npm installation exposes both the human-facing ai-cli command and the ai-cli-mcp server entrypoint.

Before using a backend, install and configure its local CLI. Claude requires a successful claude doctor check and an interactive login and terms-acceptance step. Codex, Antigravity, Grok Build, OpenCode, and Pi are optional backends with their own installation or authentication requirements. Antigravity uses agy; its binary path can be overridden with ANTIGRAVITY_CLI_NAME. Grok and Pi provide GROK_CLI_NAME and PI_CLI_NAME overrides. ANTIGRAVITY_PRINT_TIMEOUT changes the Antigravity run limit.

Tools and capabilities

  • Launch prompts against several locally installed AI CLIs.
  • Run multiple agents asynchronously and track them by PID.
  • Wait for groups of processes and combine their results.
  • Inspect incremental messages and optional tool-call events.
  • Query backend availability, model aliases, and discovery data.
  • Resume supported sessions using returned session identifiers.

Limitations and notes

Execution uses local binaries and their existing account configuration; installing the npm package does not install or authenticate those tools. Some integrations deliberately run with unattended permissions or approval bypasses, including Claude and Codex, so they should be used only in environments where that behavior is acceptable.

Gemini support uses Antigravity CLI rather than the older Gemini CLI output format. The integration has a separate run-time limit from the MCP wait timeout, and a zero value for Antigravity means an immediate timeout. Model names and available provider/model pairs can depend on the installed CLI and account configuration.

Reviews

No reviews yet — be the first to share how it worked for you.

Frequently Asked Questions about AI Cli MCP

ai-cli-mcp is an MCP server that connects MCP clients to locally installed AI command-line tools, including Claude, Codex, Gemini through Antigravity, Grok, OpenCode, Pi, and Forge. Its main tools launch background runs, wait for processes, inspect results, observe events, list processes, terminate runs, and check CLI or model availability.

Install it through an MCP client with `npx -y ai-cli-mcp@latest`.

It supports Claude, Codex, Gemini through Antigravity CLI, Grok Build, OpenCode, Pi, and Forge through the `run` interface. The exact model names and provider/model pairs depend on the installed CLI and account configuration.

Yes. The server is intended for MCP clients and the README specifically discusses using it with Cursor. Configure Cursor to start the standard stdio entrypoint with `npx -y ai-cli-mcp@latest`, then ensure the local AI CLIs you plan to call are installed and configured.

Use the returned PID with `get_result` to retrieve output and status, `peek` to observe a short event window, `list_processes` to view tracked runs, or `kill_process` to terminate a running process. `wait` can block until one or more selected processes finish.

Related MCP servers

Add a badge to your READMEShow it’s listed — live SVG, Markdown or HTML.

AllMCPs Directory Badge

Full Badge Customizer

Showcase your server listing on GitHub or your project documentation. Embed this dynamic SVG badge to highlight official listing status and live engagement.

Badge Style:
Live Dynamic SVG PreviewAI Cli MCP AllMCPs Directory Badge
Markdown (GitHub README)
[![AllMCPs](https://allmcps.com/api/badge/ai-cli-mcp?style=directory)](https://allmcps.com/mcp/ai-cli-mcp)
HTML Embed
<a href="https://allmcps.com/mcp/ai-cli-mcp"><img src="https://allmcps.com/api/badge/ai-cli-mcp?style=directory" alt="AI Cli MCP on AllMCPs" /></a>