Ai MCP Server — mkXultra/ai-cli-mcp

MCP server for AI CLI tools (Claude, Codex, and Gemini) with background process management

Local serverstdio

What is the Ai MCP Server?

MCP server for AI CLI tools (Claude, Codex, and Gemini) with background process management

What you get

An MCP (Model Context Protocol) server that allows running AI CLI tools (Claude, Codex, Gemini, Forge, and OpenCode) in background processes with automatic permission handling.

This MCP server provides tools that can be used by LLMs to interact with AI CLI tools. When integrated with MCP clients, it allows LLMs to:

Configuration and credentials

The only prerequisite is that the AI CLI tools you want to use are locally installed and correctly configured. - Claude Code: claude doctor passes, and execution with --dangerously-skip-permissions is approved (you must run it manually once to login and accept terms). - Codex CLI (Optional): Installed and initial setup (login etc.) completed. - Gemini CLI (Optional): Installed and

More MCP options

Compare MCP servers by category, or browse hosted MCP servers if you prefer an endpoint over a local process.

Maintainer setup documentation.

Recorded tools

Check the linked publisher documentation and your connected client's tool list. Names and availability can vary with the server version and account permissions.

ToolWhat it does
ai-cli-mcpMCP server entrypoint
ai-clihuman-facing CLI for background AI runs
runps
resultpeek
waitkill
cleanupdoctor
modelsmcp
peekStarts a one-shot short observation window for running child agents and returns structured events observed during that specific call. By default this includes only natural-language message events; pass include_tool_calls
list_processesLists all running and completed AI agent processes with their status, PID, and basic info.
doctorChecks supported AI CLI binary availability and path resolution from MCP clients. Like ai-cli doctor, it returns a checks block and does not verify login state or terms acceptance.
get_resultGets the current output and status of an AI agent process by PID.
kill_process

How to install the Ai MCP Server

{
  "mcpServers": {
    "ai-cli": {
      "command": "npx",
      "args": ["-y", "ai-cli-mcp"],
      "env": {
        "CLAUDE_CLI_NAME": "your-value",
        "CODEX_CLI_NAME": "your-value",
        "OPENCODE_CLI_NAME": "your-value"
      }
    }
  }
}

Add to claude_desktop_config.json, then restart Claude Desktop.

Configuration

The only prerequisite is that the AI CLI tools you want to use are locally installed and correctly configured. - Claude Code: claude doctor passes, and execution with --dangerously-skip-permissions is approved (you must run it manually once to login and accept terms). - Codex CLI (Optional): Installed and initial setup (login etc.) completed. - Gemini CLI (Optional): Installed and

VariableDescriptionRequired
CLAUDE_CLI_NAMEConfiguration value read at startup.Optional
CODEX_CLI_NAMEConfiguration value read at startup.Optional
OPENCODE_CLI_NAMEConfiguration value read at startup.Optional

Example prompts to try

  • “Use Ai to ai-cli-mcp.”
  • “Use Ai to ai-cli.”
  • “Use Ai to run.”

Frequently asked questions

MCP server for AI CLI tools (Claude, Codex, and Gemini) with background process management Confirm the tools offered by your installed version in the connected client. Tool availability and permissions depend on the server and account configuration.