Labsco
Lykhoyda logo

ask-gemini-mcp

โ˜… 12

from Lykhoyda

MCP server that enables AI assistants to interact with Google Gemini CLI

๐Ÿ”ฅ๐Ÿ”ฅ๐Ÿ”ฅโœ“ VerifiedFreeQuick setup

Ask LLM

PackageTypeVersionDownloads
ask-gemini-mcpMCP Serverdownloads
ask-codex-mcpMCP Serverdownloads
ask-ollama-mcpMCP Serverdownloads
ask-antigravity-mcpMCP Serverdownloads
ask-llm-mcpMCP Serverdownloads
@ask-llm/pluginClaude Code Plugin/plugin install

MCP servers + Claude Code plugin for AI-to-AI collaboration

Get a second opinion before you ship. Ask LLM lets your AI assistant โ€” Claude Code, Cursor, Claude Desktop, or any of 40+ MCP clients โ€” consult a second model to review your code, debate a plan, or catch a bug it might have missed. Pick the reviewer that fits: OpenAI Codex (GPT-5.5), Google Antigravity (agy), a local Ollama model, or Gemini (1M+ token context). Standard MCP, no prompt hacks.

โš ๏ธ Gemini CLI goes enterprise-only on 2026-06-18: From that date Google restricts Gemini CLI to Gemini Code Assist Standard/Enterprise seats, and free, Google AI Pro, and Ultra accounts lose access. ask-gemini-mcp still installs, but a non-enterprise account then surfaces actionable guidance instead of output. Free/Pro users: switch to ask-antigravity (the Google-sanctioned successor, subscription-backed via Google AI Pro/Ultra), ask-codex, or ask-ollama. Announcement

Why a second opinion?

Your primary AI is confident โ€” but confidence isn't correctness. A second model, with no stake in the first one's answer, catches what it missed.

  • Second opinion on code โ€” before you commit to an approach, have another model review it independently.
  • Debate a plan โ€” send an architecture proposal for critique, alternatives, and trade-off analysis.
  • Review a diff โ€” have a different model analyze your changes to surface issues your primary AI glossed over.
  • Read more than fits โ€” Gemini and Antigravity's large context windows ingest whole codebases at once.
  • Keep it local โ€” run reviews through Ollama when nothing can leave your machine.

In action

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.

One prompt. A second model reviews independently; your assistant applies the fix โ€” no copy-paste between tools.

Choose your reviewer

ProviderBest forModel (default โ†’ fallback)Notes
CodexCode reasoning, targeted reviews, architecture critiquegpt-5.5 โ†’ gpt-5.4-miniRequires an OpenAI/Codex account
AntigravityA subscription-backed second opinion; larger-context readsGemini 3.1 Pro (High) โ†’ Gemini 3.5 Flash (High)Google AI Pro/Ultra plan; one-shot, experimental
OllamaPrivate/local review, zero cost, offlineqwen3.6:27b (no auto-fallback)Runs entirely on your machine
GeminiWhole-codebase reads (1M+ tokens)gemini-3.1-pro-preview โ†’ gemini-3.5-flashโš ๏ธ Enterprise-gated from 2026-06-18
Unified (ask-llm)One install for all of the above; fan out in parallelroutes per callRecommended

Claude Code Plugin

The Ask LLM plugin adds multi-provider code review, brainstorming, and automated hooks directly into Claude Code:

/plugin marketplace add Lykhoyda/ask-llm
/plugin install ask-llm@ask-llm-plugins

What You Get

FeatureDescription
/multi-reviewParallel Antigravity + Codex review with 4-phase validation pipeline and consensus highlighting (gemini via /gemini-review)
/gemini-reviewGemini-only review with confidence filtering
/codex-reviewCodex-only review with confidence filtering
/ollama-reviewLocal review โ€” no data leaves your machine
/antigravity-reviewSubscription-backed review via Google Antigravity (agy) โ€” experimental
/brainstormMulti-LLM brainstorm: Claude Opus researches the topic against real files in parallel with external providers (Gemini/Codex/Ollama), then synthesizes all findings with verified findings weighted higher
/compareSide-by-side raw responses from multiple providers, no synthesis โ€” for when you want to see how each provider phrases the same answer
codex-pair hookOpt-in continuous review โ€” runs Codex against every Edit/Write/MultiEdit when a .codex-pair/context.md marker is present in the project

The review agents use a 4-phase pipeline inspired by Anthropic's code-review plugin: context gathering, prompt construction with explicit false-positive exclusions, synthesis, and source-level validation of each finding.

See the plugin docs for details.

MCP Tools

ToolPackagePurpose
ask-geminiask-gemini-mcpSend prompts to Gemini CLI with @ file syntax. 1M+ token context. Live progressive output via stream-json
ask-gemini-editask-gemini-mcpGet structured OLD/NEW code edit blocks from Gemini
fetch-chunkask-gemini-mcpRetrieve chunks from cached large responses
ask-codexask-codex-mcpSend prompts to Codex CLI. GPT-5.5 with mini fallback. Native session resume via sessionId
ask-ollamaask-ollama-mcpSend prompts to local Ollama. Fully private, zero cost. Server-side conversation replay via sessionId
ask-antigravityask-antigravity-mcpSend a prompt to Google Antigravity (agy) for a subscription-backed second opinion. Experimental; one-shot
ask-llmask-llm-mcpUnified orchestrator โ€” pick provider per call. Fan out to all installed providers
multi-llmask-llm-mcpDispatch the same prompt to multiple providers in parallel; returns per-provider responses + usage in one call
get-usage-statsallPer-session token totals, fallback counts, breakdowns by provider/model โ€” all in-memory, no persistence
diagnoseask-llm-mcpSelf-diagnosis: Node version, PATH resolution, provider CLI presence + versions. Read-only
pingallConnection test โ€” verify MCP setup

All ask-* tools accept an optional sessionId parameter for multi-turn conversations and now return a structured AskResponse (provider, response, model, sessionId, usage) via MCP outputSchema alongside the human-readable text. The orchestrator (ask-llm-mcp) also exposes usage://current-session as an MCP Resource for live JSON snapshots.

Usage Examples

ask codex to review the changes in src/auth.ts for security issues
ask antigravity to debate this architecture plan in docs/design.md
ask ollama to explain src/config.ts (runs locally, no data sent anywhere)
ask gemini to summarize @. the current directory (1M+ context, @ is Gemini-only)
use multi-llm to compare what codex and gemini think about this approach

CLI Subcommands

The orchestrator binary (ask-llm-mcp) supports two CLI modes alongside the default MCP server:

# Interactive multi-provider REPL โ€” switch providers, persist sessions, see usage live
npx ask-llm-mcp repl

# Diagnose your setup โ€” Node version, PATH, provider CLI versions, env vars
npx ask-llm-mcp doctor          # human-readable
npx ask-llm-mcp doctor --json   # machine-readable, exit 1 on error

The REPL ships sessions per provider (/provider gemini, /provider codex, /new, /sessions, /usage) and inherits all the executor behavior (quota fallback, stream-json output for Gemini, native session resume).

Models

ProviderDefaultFallback
Geminigemini-3.1-pro-previewgemini-3.5-flash (on quota)
Codexgpt-5.5gpt-5.4-mini (on quota)
Ollamaqwen3.6:27bโ€” (local; errors if the model isn't pulled)

Gemini and Codex automatically fall back to a lighter model on quota errors. Ollama runs locally and never substitutes a model โ€” if the requested model isn't pulled, it returns a clear ollama pull error.

Documentation