mcpField
A
ask-llm

ask-llm

Local
github.com/LykhoydaAI & Agents18Updated today

About ask-llm

Ask LLM is an MCP server that lets coding agents request second opinions on code changes and plans from other model providers. It is aimed at developers and small teams, and supports subscription-based access as well as local Ollama inference.

Key features

  1. 01Cross-provider code reviews
  2. 02Plan critique and model comparison
  3. 03Multiple provider access routes
  4. 04Opt-in per-edit pairing
  5. 05Read-only review controls

Use cases

  1. 01Review staged changes for bugs
  2. 02Check code for security issues
  3. 03Challenge a proposed implementation plan

MCP support

The MCP server exposes tools for supported coding assistants to consult providers including Codex, Claude, Grok, Ollama, Gemini, and Antigravity.

Configuration

Local server config is the same for every client. Copy it into your client’s MCP config file.

mcp.json · Universal config
{
"mcpServers": {
"lykhoyda-ask-llm": {
"command": "npx",
"args": [
"-y",
"@ask-llm/mcp"
],
"env": {
"XAI_API_KEY": "<XAI_API_KEY>",
"ASK_GROK_HARNESS": "<ASK_GROK_HARNESS>",
"ASK_GROK_MODEL": "<ASK_GROK_MODEL>",
"ASK_GROK_REASONING_EFFORT": "<ASK_GROK_REASONING_EFFORT>",
"ASK_GROK_MAX_OUTPUT_TOKENS": "<ASK_GROK_MAX_OUTPUT_TOKENS>",
"ASK_GROK_TIMEOUT_MS": "<ASK_GROK_TIMEOUT_MS>",
"CURSOR_API_KEY": "<CURSOR_API_KEY>",
"ASK_CURSOR_TIMEOUT_MS": "<ASK_CURSOR_TIMEOUT_MS>",
"ASK_CLAUDE_MODEL": "<ASK_CLAUDE_MODEL>",
"ASK_CLAUDE_FALLBACK_MODEL": "<ASK_CLAUDE_FALLBACK_MODEL>",
"ASK_CLAUDE_TIMEOUT_MS": "<ASK_CLAUDE_TIMEOUT_MS>",
"OLLAMA_HOST": "<OLLAMA_HOST>",
"ASK_ANTIGRAVITY_TIMEOUT_MS": "<ASK_ANTIGRAVITY_TIMEOUT_MS>",
"ASK_ANTIGRAVITY_SANDBOX": "<ASK_ANTIGRAVITY_SANDBOX>",
"GMCPT_TIMEOUT_MS": "<GMCPT_TIMEOUT_MS>",
"GMCPT_LOG_LEVEL": "<GMCPT_LOG_LEVEL>"
}
}
}
}
Run commandnpx -y @ask-llm/mcp
Environment variables to set
XAI_API_KEYSecretxAI API key for metered Grok requests; Ask LLM never enables billing or credits
ASK_GROK_HARNESSExplicit Grok harness: xai-api (default) or grok-cli; no failover
ASK_GROK_MODELExact selected-harness model override (API default grok-4.7; CLI default grok-4.7; no fallback)
ASK_GROK_REASONING_EFFORTGrok reasoning effort: low, medium, high, or xhigh (default: high)
ASK_GROK_MAX_OUTPUT_TOKENSSecretxAI API output-token ceiling to bound accidental spend (default: 16384)
ASK_GROK_TIMEOUT_MSTimeout for xAI API requests in milliseconds (default: 600000)
CURSOR_API_KEYSecretOptional Cursor CLI credential for ask-cursor-agent; alternative to agent login
ASK_CURSOR_TIMEOUT_MSTimeout for model-neutral Cursor Agent harness calls (default: 600000)
ASK_CLAUDE_MODELDefault Claude model alias or full model name (default: opus)
ASK_CLAUDE_FALLBACK_MODELClaude CLI fallback when Opus is overloaded or unavailable (default: sonnet)
ASK_CLAUDE_TIMEOUT_MSTimeout for Claude CLI execution in milliseconds (default: 600000 = 10 minutes)
OLLAMA_HOSTOllama server address (default: http://localhost:11434)
ASK_ANTIGRAVITY_TIMEOUT_MSTimeout for Antigravity (agy) execution in milliseconds (default: 300000 = 5 minutes)
ASK_ANTIGRAVITY_SANDBOXSet to '0' to drop agy's --sandbox flag if it blocks --add-dir context reads (default: sandbox on)
GMCPT_TIMEOUT_MSTimeout for CLI execution in milliseconds (default: 300000 = 5 minutes)
GMCPT_LOG_LEVELLog verbosity: debug, info, warn, error (default: warn)

Local servers need a runtime on your machine (e.g. Node.js 18+). Config file locations differ by client; see your client’s docs.

Packages
npm@ask-llm/mcp1.2.1

Tools

6

Saved tool list · updated 2w ago

ParameterTypeRequiredDescription
modelstringNoExact model ID for the selected provider/harness. Usually not needed.
promptstringYesThe question, code review request, or analysis task to send
harnessenumNoExecution harness, separate from provider/model. xai-api and grok-cli require provider=grok. Use ask-cursor-agent for Cursor's model-neutral harness. No harness fallback is attempted.provider-default | xai-api | grok-cli
sandboxenumNoCodex-only sandbox. Defaults to the executor's read-only review contract when omitted. Set workspace-write only for explicit write flows such as image generation. Unsupported on other providers; never silently stripped.read-only | workspace-write
providerenumYesWhich LLM provider to use. Available: "gemini" (Gemini, default model: gemini-3.1-pro-preview), "codex" (Codex, default model: gpt-6-astra), "claude" (Claude, default model: opus), "grok" (Grok, default model: grok-4.7), "ollama" (Ollama, default model: qwen3.8:27b), "antigravity" (Antigravity, default model: gemini-3.1-pro)gemini | codex | claude | grok | ollama | antigravity
preferredbooleanNoCodex-only: opt into ASK_CODEX_PREFERRED_MODEL when it differs from the default. Unsupported on other providers; never silently stripped. Leave unset for normal review calls.
sessionIdstringNoOptional session ID. For Codex, pass "" on the first call to create a persisted thread, then pass its returned Thread ID to resume; omitting it makes the call ephemeral. For other session-capable providers, pass a prior Session ID to resume. Claude/Gemini use --resume, Codex uses exec resume, and Ollama uses server-side replay. Grok and Antigravity are one-shot.
includeDirsarrayNoRelative workspace directories exposed to providers that support additional read roots (Codex, Claude, and Antigravity). Unsupported providers are rejected instead of silently dropping this option; Codex only accepts it on a fresh call (sessionId omitted or ""), never on a resumed thread.
reasoningEffortenumNoProvider-native reasoning effort. Codex accepts low/medium/high/xhigh/max/ultra; Grok accepts low/medium/high/xhigh. Unsupported provider/effort combinations are rejected, never stripped.low | medium | high | xhigh | max | ultra

Details

From the project README

Ask LLM

Second opinions for coding agents.

Get a second opinion on your code or plan, inside your coding assistant, using the model subscriptions you already have.

For individual developers and small teams who already use a coding assistant and pay for another model subscription: ask a different vendor's model to review your changes or challenge your plan, without API keys, copy-paste, or leaving the session.

You:    ask codex to review src/auth.ts for security issues
Codex:  ⚠ verifyToken() compares tokens with === — not timing-safe (line 42)
        ⚠ the session cookie is missing a SameSite attribute
Claude: Good catches — applying both fixes to src/auth.ts.

Install

You need Node.js 24+ on Linux or macOS. Before your first review, both your coding assistant (for example Claude Code) and the provider you will consult (for example Codex) must be installed and signed in. Ask LLM configures the connection; it does not install providers or sign you in. If a provider CLI such as Codex has never been signed in on this machine, sign in first and rerun setup.

npm i -g @ask-llm/mcp && ask-llm setup

Setup asks you to confirm each detected host and workflow. Inspect the preview, confirm your assistant's registration and workflows, decline the others, then follow any printed manual steps. Restart your assistant or start a new session in your project.

Your first review

With both Claude Code and Codex installed and signed in, open Claude Code in your project and ask:

Ask Codex to review my staged changes for bugs and missing error handling. Check each finding against the source before proposing fixes.

Working in Codex with a Claude subscription? Ask Claude instead. Choose a provider from a different vendor than your current assistant. A successful review names the reviewer and model, cites relevant code, and reports findings or says it found none. Your assistant applies changes after you decide what to accept. If the request fails, run ask-llm doctor and follow the troubleshooting guide for your selected assistant and reviewer. Warnings about providers you do not use do not require installing them or adding API keys.

For plans, try: “Ask Claude to challenge this plan: what assumptions could fail, and what simpler approach would fit our constraints?”

After an on-demand review, pair review can add ongoing feedback. Pairing requires explicit opt-in; setup leaves it off.

Supported hosts

A host is the assistant you work in; a provider is the model you consult.

HostExperience
Claude CodeReviews, plan critique, comparisons; isolated reviewers and opt-in per-edit pairing
Codex, Cursor, Grok Build, Gemini CLITools and portable workflows; pairing on demand
AntigravityTools; setup prints a manual step for workflows
Pi 0.83.0+Native tools and portable workflows; opt-in per-edit pairing
Claude DesktopTools only
OpenCodeTools and portable workflows; setup verified with fixtures only

See host compatibility for the complete matrix and manual setup limits, including existing Codex registrations.

Supported providers

ProviderAccess
CodexYour authenticated Codex CLI/account
ClaudeYour authenticated Claude Code account; consult it from a host other than Claude Code
GrokAuthenticated Grok Build, an exact Cursor model, or the explicit metered xAI API option
AntigravityYour authenticated agy subscription; execution is off by default, and opt-in has no read-only guarantee
OllamaLocal models on your machine
GeminiAn eligible Gemini Code Assist Standard/Enterprise seat

Cursor Agent can also consult exact models from your Cursor catalog. It is a connection route, with usage governed by your Cursor plan.

Trust and cost

Review runs use read-only provider controls; the assistant you work in remains the editor. Antigravity refuses execution until explicitly enabled and cannot guarantee read-only access after opt-in. Review only material you are allowed to share with the selected provider.

Calls consume your existing provider plan's quota or follow that account's billing. Grok's xAI API is a separate, metered option requiring an API key; Ask LLM never enables billing or overage for you. Ollama supports local inference. Ask LLM sends no telemetry; provider and host data policies still apply.

Agreement between models is not proof of correctness. Validate findings against the code, tests, and your requirements. See data flow and costs and fallbacks.

Migrating from @ask-llm/*

Follow the migration guide before retiring earlier registrations.

Upgrade or remove · Troubleshooting · Documentation

Contributions: CONTRIBUTING.md. Licensed under MIT.

Comments

Markdown supported

New to MCP?

From what the protocol is to installing your first server, these answers cover most first questions.

An open protocol that defines how AI applications connect to external tools and data in a uniform way. Clients talk to the model; MCP servers provide tools, resources and prompt templates. They exchange standard messages, so one server can be reused by many clients.