Skip to main content
Glama

Server Configuration

Describes the environment variables required to run the server.

NameRequiredDescriptionDefault
DEBUGNoEnable debug logging (set to any value)
GEMINI_MODELSNoAdditional models for Gemini (JSON object of model->description).
CODEX_CONFIG_PATHNoPath to Codex config file.
VIBE_ACTIVE_MODELNoOverride active model for Mistral Vibe.
LLM_GATEWAY_CONFIGNoPath to gateway TOML config (default: ~/.llm-cli-gateway/config.toml)
CODEX_DEFAULT_MODELNoExplicit default model for Codex.
GEMINI_HISTORY_ROOTNoPath to Gemini history root directory.
LLM_GATEWAY_JOBS_DBNoDeprecated legacy env var. Use config.toml instead.
LLM_GATEWAY_LOGS_DBNoDeprecated: override persistence path. Use config.toml instead.
CLAUDE_DEFAULT_MODELNoExplicit default model for Claude.
CLAUDE_SETTINGS_PATHNoPath to Claude settings file.
GEMINI_DEFAULT_MODELNoExplicit default model for Gemini.
GEMINI_MODEL_ALIASESNoAliases for Gemini models.
GEMINI_SETTINGS_PATHNoPath to Gemini settings file.
GROK_CODE_XAI_API_KEYNoAPI key for Grok CLI (alternative to OAuth login).
LLM_GATEWAY_AUTH_TOKENNoBearer token for HTTP transport authentication.
LLM_GATEWAY_MODEL_ALIASESNoGlobal model aliases for all CLIs.
CLAUDE_SETTINGS_LOCAL_PATHNoPath to Claude local settings file.
LLM_GATEWAY_APPROVAL_POLICYNoDefault approval policy (strict, balanced, permissive)
LLM_GATEWAY_DEDUP_WINDOW_MSNoOverride dedupWindowMs for async job deduplication.
LLM_GATEWAY_JOB_RETENTION_DAYSNoOverride retentionDays for job persistence.
LLM_GATEWAY_ACKNOWLEDGE_EPHEMERALNoSet to 1/true/yes to acknowledge ephemeral backend for async tools.
LLM_GATEWAY_DISABLE_MODEL_DISCOVERYNoSet to 1 to disable local model-history discovery.

Capabilities

Features and capabilities supported by this server

CapabilityDetails
tools
{
  "listChanged": true
}
resources
{
  "listChanged": true
}

Tools

Functions exposed to the LLM to take actions

NameDescription
review_changes

Capture one complete, immutable Git evidence artifact, fence it as untrusted data, and start independent read-only provider reviews. Includes committed, staged, unstaged, and untracked changes without truncation.

validate_with_models

Ask two or more provider CLIs to independently validate a question. Starts validation jobs — poll with job_status, collect with job_result (not llm_job_*).

second_opinion

Ask one provider CLI to review an answer (starts a validation job; poll job_status, collect job_result).

compare_answers

Summarize agreement/differences between caller-provided answers LOCALLY — does not call any provider.

red_team_review

Challenge a plan, answer, or document for risks and failure modes via provider CLIs (starts validation jobs).

consensus_check

Ask provider CLIs whether they agree or disagree with a claim (starts validation jobs).

ask_model

Ask one provider CLI a question through the simplified validation surface (starts a validation job).

synthesize_validation

Run an explicit judge model over validation results. General validation uses caller-supplied terminal results; review_changes rebuilds its question and results from the owned durable run.

list_available_models

List models and capabilities for every available provider CLI (takes no arguments; complements per-provider list_models).

job_status

Check a VALIDATION job's status (jobs started by validate_with_models/ask_model/etc.) — distinct from llm_job_status, which tracks provider request jobs.

job_result

Collect a VALIDATION job's normalized provider output — distinct from llm_job_result, which returns raw provider request job output.

validation_receipt

Retrieve the canonically hashed immutable receipt of a terminal cross-LLM validation run by validationId. Returns minted | pending | expired_unminted (no receipt exists and none can be minted) | verification_failed (a stored receipt does not verify against its run) | not_found (own-or-not-found).

workspace_list

List registered workspace aliases for remote HTTP/OAuth provider calls. Does not browse files. Stdio/local callers should not use workspace_* tools to fix provider path access; pass local workingDir/addDir/includeDirs directly.

workspace_getA

Inspect a registered remote HTTP/OAuth workspace alias. Does not list files. Not needed for stdio/local provider calls; do not use workspace_* tools to fix local path access.

workspace_create

Create a remote HTTP/OAuth workspace alias by creating a new local folder or git repo under a configured allowed root. Not for stdio/local provider path access. Requires LLM_GATEWAY_WORKSPACE_ADMIN=1 and OAuth scope workspace:admin.

workspace_register_existing_repo

Register an existing local Git repo as a remote HTTP/OAuth workspace alias. Not for stdio/local provider path access. Requires LLM_GATEWAY_WORKSPACE_ADMIN=1 and OAuth scope workspace:admin.

config_init

Initialize or clone the local Personal Agent Config baseline. This never activates a release by itself.

config_publish

Push the clean local Personal Agent Config baseline to its configured Git upstream without force-pushing.

config_syncA

Synchronize, verify, compile, and atomically activate a Personal Agent Config release. It never pushes.

config_statusA

Show Personal Agent Config state without exposing baseline paths or local machine binding values.

config_rollback

Atomically activate an already verified retained Personal Agent Config release.

config_ack_stale

Acknowledge the current stale Personal Agent Config release for at most 24 hours.

config_recover_kit_attemptA

Fence and release one exact unadmitted durable Kit attempt after the previous gateway process has been stopped. Copy the execution and attempt identity from local session_get output. This action is local-only and cannot recover an existing durable job.

explain_effective_configB

Explain the selected Personal Agent Config release and context provenance without returning local paths or instruction text.

provider_admin_list

List provider CLI admin operations (auth status, model list, mcp list, plugin list, doctor, etc.) available on the installed CLIs, projected from runtime discovery. Read-only.

provider_admin_run

Execute a READ-ONLY provider CLI admin operation (from provider_admin_list) and return redacted output. Rejects mutating operations.

provider_admin_mutate

Execute a MUTATING provider CLI admin operation (mcp add/remove, login/logout, plugin install/remove, session delete/archive, ...). Disabled unless [admin] allow_mutating_cli_admin_ops=true; routed through approval and audited.

claude_request

Run a Claude Code CLI request synchronously (when async jobs are enabled, auto-defers to a pollable job past the sync deadline; otherwise runs to completion). Requires exactly one of prompt or promptParts.

codex_request

Run an OpenAI Codex CLI request synchronously (when async jobs are enabled, auto-defers to a pollable job past the sync deadline; otherwise runs to completion). Requires exactly one of prompt or promptParts.

codex_fork_session

Fork an existing Codex session into a new branch (codex fork <ID|--last>) without mutating the original. This prompt remains argv-bound and rejects oversized UTF-8 input as non-retryable input_too_large.

gemini_request

Run a Google Antigravity CLI (agy) request through the Gemini-compatible gateway tool synchronously (when async jobs are enabled, auto-defers to a pollable job past the sync deadline; otherwise runs to completion). Requires exactly one of prompt or promptParts.

grok_request

Run an xAI Grok CLI request synchronously (when async jobs are enabled, auto-defers to a pollable job past the sync deadline; otherwise runs to completion). Requires exactly one of prompt or promptParts.

devin_request

Run a Cognition Devin CLI request synchronously (auto-defers to a pollable job past the sync deadline when async jobs are enabled; otherwise runs to completion). Headless print mode (devin -p).

cursor_request

Run a Cursor Agent request synchronously (auto-defers to a pollable job past the sync deadline when async jobs are enabled; otherwise runs to completion). Default cli uses headless print mode (cursor-agent --print); gated acp uses native cursor-agent acp and accepts prompt, model, a gateway ACP session, and a registered workspace alias.

mistral_request

Run a Mistral Vibe CLI request synchronously (when async jobs are enabled, auto-defers to a pollable job past the sync deadline; otherwise runs to completion). Requires exactly one of prompt or promptParts. Defaults to --agent accept-edits (auto-accepts file edits; dangerous ops such as shell stay gated).

claude_request_async

Start a Claude Code CLI request as a durable background job. Poll with llm_job_status, collect with llm_job_result.

codex_request_async

Start an OpenAI Codex CLI request as a durable background job. Poll with llm_job_status, collect with llm_job_result.

gemini_request_async

Start a Google Antigravity CLI (agy) request as a durable background job through the Gemini-compatible gateway tool. Poll with llm_job_status, collect with llm_job_result.

grok_request_async

Start an xAI Grok CLI request as a durable background job. Poll with llm_job_status, collect with llm_job_result.

devin_request_async

Start a Cognition Devin CLI request as a durable background job. Poll with llm_job_status, collect with llm_job_result.

cursor_request_async

Start a Cursor Agent CLI request as a durable background job. Poll with llm_job_status, collect with llm_job_result.

mistral_request_async

Start a Mistral Vibe CLI request as a durable background job. Poll with llm_job_status, collect with llm_job_result.

llm_job_status

Check lifecycle status and bounded privacy-safe normalized progress for a gateway async or deferred-sync job by jobId.

llm_job_watch

Wait briefly for privacy-safe normalized progress on an owned async job. When the MCP request carries a progress token, notifications are emitted only while this watch request remains active.

llm_job_resultA

Retrieve captured stdout/stderr for a gateway async or deferred-sync job by jobId. Use rawOutput:true with independent stream offsets for resumable pages.

llm_job_cancelA

Cancel a running gateway async or deferred-sync job by jobId.

llm_request_result

Read back any persisted request (sync or async) from the flight recorder by correlationId, including prompt and response.

llm_process_health

Report gateway process health: async-job manager state plus the resolved persistence configuration and paths.

approval_list

List recent MCP-managed approval decisions recorded by the gateway (approvalStrategy: mcp_managed).

list_models

List models, aliases, and defaults for one provider (claude|codex|gemini|grok|mistral|devin|cursor, or an enabled API provider name), or omit cli to list all providers. API providers are returned under an apiProviders array.

provider_tool_capabilitiesA

Report provider tool/feature capabilities and discovered local skill/tool integrations for claude|codex|gemini|grok|mistral|devin|cursor|grok_api, or an enabled API provider name.

cli_versions

Report installed provider CLI versions, availability, and login status for all registered CLI providers (claude|codex|gemini|grok|mistral|devin|cursor) or one.

upstream_contracts

Return the gateway's declared provider CLI contracts; with probeInstalled true, diff against installed --help surfaces to detect flag drift.

provider_subcommands_list

Return a compact, filterable read-only catalog of declared provider CLI subcommands without flags or raw help.

provider_subcommand_contract

Return the detailed read-only contract for exactly one declared provider CLI subcommand.

provider_subcommand_drift

Probe declared provider subcommand --help surfaces and return compact drift rows without raw help output.

cli_upgrade

Plan (dryRun, default true) or execute an upgrade for one provider CLI using its native update mechanism.

session_create

Create a gateway session record for a provider. NOTE: this is gateway bookkeeping (a plain UUID), not a provider-native session; Codex resume needs a real Codex UUID.

session_list

List gateway session records and the active session per provider, optionally filtered by provider.

session_set_active

Set or clear the active session for a provider; the active session is used when a request omits sessionId.

session_delete

Delete a gateway session record by ID (also removes any gateway-owned worktree attached to it).

session_get

Get one gateway session record by session ID, including recent request history when available.

session_clear_allA

Delete all gateway session records, optionally scoped to one provider.

Prompts

Interactive templates invoked by user choice

NameDescription

No prompts

Resources

Contextual data attached and managed by the client

NameDescription
skill-async-job-orchestrationManage long-running async LLM jobs across Claude, Codex, Gemini, Grok, Mistral, Devin, and Cursor. Use for parallel or non-blocking execution. Covers backend-qualified durability, cache-aware `promptParts`, `cache-state://` MCP resources, and the Claude `cache_ttl_expiring_soon` warning.
skill-implement-review-fixImplement a change, obtain complete evidence-backed review through the local stdio gateway, fix findings, and repeat without arbitrary review limits. Use for features, bugs, or refactoring.
skill-least-cost-routingRoute a model-agnostic request to the cheapest capable (provider, model) via route_request, subject to a quality-tier floor and a hard budget cap. Use when you do not care WHICH model runs a task, only that it is cheap enough and good enough.
skill-multi-llm-reviewRun complete, evidence-backed code reviews through the local stdio gateway across the seven canonical CLI providers: Claude, Codex, Gemini, Grok, Mistral, Devin, and Cursor. Use for quality, security, correctness, or release validation that requires independent reviewers.
skill-personal-agent-config-kitSynchronize a single developer's verified agent instructions and bounded preferences across local workstations and repositories. Use when setting up, publishing, syncing, inspecting, rolling back, or recovering Personal Agent Config Kit state.
skill-provider-claudeTrack and maintain the upstream Claude Code CLI contract. Use when Anthropic ships a Claude Code release, when a `claude` flag/output/permission/subcommand behaviour changes, or when an upstream scan flags drift. Process guidance only; `src/upstream-contracts.ts` is the mechanical source of truth.
skill-provider-codexTrack and maintain the upstream OpenAI Codex CLI contract. Use when OpenAI ships a Codex release, when a `codex exec` flag/sandbox/approval/resume/subcommand behaviour changes, or when an upstream scan flags drift. Process guidance only; `src/upstream-contracts.ts` is the mechanical source of truth.
skill-provider-cursorTrack and maintain the upstream Cursor Agent CLI contract. Use when Cursor ships a CLI release, when a `cursor-agent` flag, execution mode, session command, ACP entrypoint, or subcommand changes, or when an upstream scan flags drift. Process guidance only: `src/upstream-contracts.ts` is the mechanical source of truth.
skill-provider-devinTrack and maintain the upstream Devin CLI contract. Use when Devin ships a CLI release, when a `devin` flag, permission mode, ACP entrypoint, or subcommand changes, or when an upstream scan flags drift. Process guidance only: `src/upstream-contracts.ts` is the mechanical source of truth.
skill-provider-geminiTrack and maintain the gateway's Gemini-compatible Google Antigravity CLI contract. Use when Google ships an Antigravity CLI release, when an `agy` flag/permission/session/subcommand behaviour changes, or when an upstream scan flags drift. Process guidance only; `src/upstream-contracts.ts` is the mechanical source of truth.
skill-provider-grokTrack and maintain the upstream xAI Grok CLI contract. Use when xAI ships a Grok CLI release, when a `grok` flag/permission-mode/sandbox/output-format/resume/subcommand behaviour changes, or when an upstream scan flags drift. Process guidance only; `src/upstream-contracts.ts` is the mechanical source of truth.
skill-provider-mistralTrack and maintain the upstream Mistral Vibe CLI contract. Use when Mistral ships a Vibe release, when a `vibe` flag/agent-mode/output-format/session-logging/env-model/subcommand behaviour changes, or when an upstream scan flags drift. Process guidance only; `src/upstream-contracts.ts` is the mechanical source of truth.
skill-public-demo-sessionPrepare and drive clean public llm-cli-gateway demo sessions for recordings, README demos, screenshots, or transcripts. Use when the user needs a redacted path, compact Codex output, direct provider calls, or a demo-safe Codex environment.
skill-retrospective-walkWalk a human or agent through a diff, worktree, commit range, gateway job, or episode reference as a structured retrospective. Use after implement-review-fix or multi-LLM review cycles, when reviewing prior jobs or uncommitted work, or when durable evidence is needed for what changed, why it changed, who/when contributed, and captured human or model comments.
skill-secure-orchestrationOrchestrate security-sensitive LLM work with the gateway's Claude-managed approval boundary, provider-native legacy controls, evidence-aware auditing, and complete no-limit review handling.
skill-session-workflowManage gateway bookkeeping and provider-native conversation continuity across Claude, Codex, Gemini, Grok, Mistral, Devin, and Cursor. Use for multi-turn work, session inspection, and safe resume decisions.
all-sessionsAll conversation sessions across CLIs
claude-sessionsAnthropic Claude Code conversation sessions
claude-modelsAnthropic Claude Code models and capabilities
codex-sessionsOpenAI Codex CLI conversation sessions
codex-modelsOpenAI Codex CLI models and capabilities
gemini-sessionsGoogle Antigravity CLI conversation sessions
gemini-modelsGoogle Antigravity CLI models and capabilities
grok-sessionsxAI Grok Build conversation sessions
grok-modelsxAI Grok Build models and capabilities
mistral-sessionsMistral Vibe conversation sessions
mistral-modelsMistral Vibe models and capabilities
devin-sessionsCognition Devin CLI conversation sessions
devin-modelsCognition Devin CLI models and capabilities
cursor-sessionsCursor Agent CLI conversation sessions
cursor-modelsCursor Agent CLI models and capabilities
performance-metricsRequest counts, latency, success/failure rates
cache-state-globalAggregate cache hit/miss/savings across all CLIs in the flight recorder. Tokens/hashes only — no prompt text.
provider-subcommands-catalogCompact read-only catalog of declared provider CLI subcommands
provider-tools-catalogRead-only catalog of gateway tool controls and discovered provider skills
grok-provider-acpNative ACP entrypoint, negotiated capabilities, supported session methods, and host-service policy for xAI Grok Build
mistral-provider-acpNative ACP entrypoint, negotiated capabilities, supported session methods, and host-service policy for Mistral Vibe
devin-provider-acpNative ACP entrypoint, negotiated capabilities, supported session methods, and host-service policy for Cognition Devin CLI
cursor-provider-acpNative ACP entrypoint, negotiated capabilities, supported session methods, and host-service policy for Cursor Agent CLI
process-healthAsync job health (CPU, memory, zombie detection)

Latest Blog Posts

MCP directory API

We provide all the information about MCP servers via our MCP API.

curl -X GET 'https://glama.ai/api/mcp/v1/servers/verivus-oss/llm-cli-gateway'

If you have feedback or need assistance with the MCP directory API, please join our Discord server