LLM CLI Gateway logo

LLM CLI Gateway

Routes MCP requests to Claude Code, Codex, Gemini/Antigravity, and Grok CLIs with session support and Codex session forking.

Install LLM CLI Gateway

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": {
    "llm-cli-gateway": {
      "command": "npx",
      "args": [
        "-y",
        "llm-cli-gateway"
      ]
    }
  }
}

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

Automated check passed— started and listed 37 tools correctly ().

Overview

The llm-cli-gateway MCP server routes MCP calls to Claude Code, Codex, Google Antigravity, and Grok command-line agents. It exposes provider-specific request tools with optional session tracking, plus Codex session forking that preserves the original history. Install it locally when an MCP client needs to delegate work to configured coding-agent CLIs through one gateway.

Use cases

  • Delegate coding requests to Claude Code from an MCP client
  • Continue Codex work across tracked sessions
  • Fork a Codex session for parallel implementation paths
  • Route Gemini or Grok CLI requests through one MCP endpoint

Key features

  • Claude Code request execution
  • Codex request and session tracking
  • Codex session forking
  • Google Antigravity CLI requests
  • Grok CLI requests
  • Optional provider session support

Tools37

What LLM CLI Gateway lets your agent do. Expand a tool for its parameters.

Verified live~19.2k 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

Recent health check succeeded.

16/16 checks healthy over the last 82d

What it can do

From the 37 tools this server returned when we ran it.

Can delete or modify data · 1Makes network requests · 11Read-only tools · 36
Network at startup3 connections
Files written at startup3
Install scriptsNone
npm provenanceSigned build
Package age208 days
Maintainers1

Observed 2026-10-25 in an isolated sandbox. A description of reach, not a security audit.

Supply-chain signal

No high-severity advisories surfaced by our automated scan.

Critical 0High 0Medium 0Low 0

Scanned 12d ago via OSV.dev · llm-cli-gateway (npm)

Adoption & maintenance

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

GitHub stars19Stargazers on the source repository.
npm downloads818Package downloads in the last 30 days.
Last commit6d agoMost recent push to the default branch.
Availability100%Our rolling endpoint + install checks that succeeded.
Install checkPassedOur sandbox started it and listed its tools.
Tools exposed37Callable tools this server registers over MCP.
Directory activity1 viewsConfig copies, upvotes, and views on AllMCPs.

How LLM CLI Gateway works

What llm-cli-gateway MCP server does

The llm-cli-gateway MCP server provides one MCP entry point for several command-line coding agents. Its currently listed provider tools are claude_request, codex_request, gemini_request, and grok_request. These execute requests through Claude Code, Codex, the Google Antigravity CLI (agy), and a Grok CLI respectively.

Codex also has a dedicated codex_fork_session tool. It creates a new branch from an existing Codex session using the equivalent of codex fork, retaining the source session's history while allowing the new branch to diverge. The fork operation uses an argument-bound prompt and rejects prompts that exceed its supported UTF-8 input size.

How it works

The gateway runs as a local MCP process and dispatches each tool call to the selected provider CLI. Request tools can use provider sessions, allowing callers to continue work rather than starting every request from scratch. Codex session forking accepts an existing session identifier or the most recent session and starts a separate continuation.

The project describes the gateway as a single-user control plane rather than a general chat proxy. It can preserve native CLI sessions and local credentials, and its broader design includes synchronous and asynchronous request handling, durable jobs, cancellation, deduplication, and workspace-scoped execution. Those capabilities are part of the gateway architecture; the listed tool surface here identifies the provider request and Codex fork operations.

Setup and configuration

Install the package globally with npm:

Terminal
npm install -g llm-cli-gateway

Alternatively, configure an MCP client to launch it through npx:

config.json
{
  "mcpServers": {
    "llm-gateway": {
      "command": "npx",
      "args": ["-y", "llm-cli-gateway"]
    }
  }
}

The provider CLIs and their authentication are external prerequisites. The optional LLM_GATEWAY_SKILLS_PATH variable configures additional local skill-pack directories; it is not required for the basic MCP launch configuration.

Tools and capabilities

  • claude_request: sends a Claude Code request with optional session management.
  • codex_request: sends a Codex request with optional session tracking.
  • codex_fork_session: branches an existing Codex session while preserving the original.
  • gemini_request: sends a request through the Google Antigravity CLI.
  • grok_request: sends a request through a Grok CLI with session support.

Limitations and notes

The llm-cli-gateway MCP server is documented for a single trusted user operating local or remote clients through an owned machine or volume. It depends on the provider CLIs being available and configured. Codex fork prompts have an input-size limit, and an oversized UTF-8 prompt is reported as a non-retryable input error.

Written by AllMCPs with AI assistance from the project’s README and listing data. How we build listings

Reviews

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

Frequently Asked Questions about LLM CLI Gateway

llm-cli-gateway is an MCP server that connects supported MCP clients to local Claude Code, Codex, Google Antigravity, and Grok CLIs. Its main tools—claude_request, codex_request, codex_fork_session, gemini_request, and grok_request—run provider requests while supporting session handling; Codex forking preserves the original session while creating a branch.

Install it with `npm install -g llm-cli-gateway`, or launch it from an MCP client with `npx -y llm-cli-gateway`. The client configuration uses the `llm-gateway` server name and starts the package as a local process.

Use the `codex_fork_session` tool with an existing Codex session identifier or `--last` equivalent. It creates a new branch while preserving the original session history. Oversized UTF-8 prompts are rejected as non-retryable input errors.

Cursor is named among supported MCP-client contexts in the project material, so confirm the current client path and configuration before relying on it.

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 PreviewLLM CLI Gateway AllMCPs Directory Badge
Markdown (GitHub README)
[![AllMCPs](https://allmcps.com/api/badge/llm-cli-gateway?style=directory)](https://allmcps.com/mcp/llm-cli-gateway)
HTML Embed
<a href="https://allmcps.com/mcp/llm-cli-gateway"><img src="https://allmcps.com/api/badge/llm-cli-gateway?style=directory" alt="LLM CLI Gateway on AllMCPs" /></a>