Install llm-cli-gateway

llm-cli-gateway is a secure local control plane for AI coding agents. It wraps installed coding-agent CLIs, can register HTTP API providers from config, and lets supported MCP clients operate them through one user-owned gateway. It runs locally over stdio by default, and can also run remotely over HTTP behind a bearer token or a built-in OAuth 2.0 server.

Requires Node.js 24.4.0 or newer. The default durable store uses Node's built-in node:sqlite module: no native bindings, no install scripts. PostgreSQL is available for service or multi-instance deployments when the optional pg peer dependency is installed.

Quick install

Run it without a global install:

npx -y llm-cli-gateway

Or install it globally:

npm install -g llm-cli-gateway
llm-cli-gateway

Use stdio transport and point your MCP client at the command above. No subcommand is required.

Install with an agent

Give your coding agent this prompt and let it configure your MCP client:

Read https://llm-cli-gateway.dev/install.md and configure yourself to use llm-cli-gateway as an MCP server.

The machine-readable spec lives at install.md.

Provider CLIs

Install whichever provider CLIs you want the gateway to expose:

npm install -g @anthropic-ai/claude-code
npm install -g @openai/codex
# Gemini provider runs through Google Antigravity CLI (agy):
curl -fsSL https://antigravity.google/cli/install.sh | bash
# Grok Build (xAI):
curl -fsSL https://x.ai/cli/install.sh | bash
# Mistral Vibe:
curl -LsSf https://mistral.ai/vibe/install.sh | bash
# Devin:
curl -fsSL https://cli.devin.ai/install.sh | bash
# Cursor Agent CLI: install from https://cursor.com/cli and ensure cursor-agent is on PATH.

Mistral Vibe ships separately as the vibe binary (pip install mistral-vibe, uv tool install mistral-vibe, or brew install mistral-vibe).

Remote / HTTP transport (optional)

The default is stdio. To serve the gateway over HTTP for remote MCP clients, start it with --transport=http (or LLM_GATEWAY_TRANSPORT=http):

LLM_GATEWAY_AUTH_TOKEN=your-long-random-token llm-cli-gateway --transport=http

It binds to 127.0.0.1:3333 at /mcp by default. Authenticate with a static bearer token (LLM_GATEWAY_AUTH_TOKEN), the built-in OAuth 2.0 server (PKCE on by default), or your own trusted identity proxy. Every session, job, and stored request is owned by a principal, and remote provider calls require a registered workspace. A dangerous OAuth configuration fails closed rather than starting. See the full install spec and the agent guide for the complete options.

Persistence (optional)

SQLite is the default durable backend. PostgreSQL can be selected in ~/.llm-cli-gateway/config.toml for service or multi-instance deployments; install pg alongside the gateway first. backend = "none" disables the async job tools.

MCP registry

Registry name and package:

io.github.verivus-oss/llm-cli-gateway
llm-cli-gateway

More