Ask Llm

io.github.Lykhoyda由 GitHub 帳號 Lykhoyda 發布v1.7.0更新於 Nov 21, 2026

Unified MCP server for Gemini, Codex, Claude, Grok, Ollama, and Antigravity

已驗證STDIO僅桌面開發者工具AI 與機器學習

概覽

AI 產生的概覽

讓編碼助理呼叫其他大型語言模型供應商(Codex、Claude、Grok、Antigravity、Ollama、Gemini、Cursor 模型)為程式碼與方案提供第二意見。

可以做什麼
  • 向指定的模型供應商送出提示,回傳文字與結構化回應
  • 把同一提示平行分送給多個供應商並比較回答
  • 透過唯讀的 Cursor Agent 通道諮詢 Cursor 目錄中的指定模型
  • 重用回傳的 sessionId 繼續支援的對話串
  • 檢查伺服器連線、執行環境與供應商 CLI 是否可用
  • 查看記憶體中的工作階段用量統計:呼叫次數、token、耗時,以及依供應商與模型的細分
適用情境
適合已為另一家供應商的模型訂閱付費、希望不離開編碼工作階段就取得程式碼變更審查或方案質疑的開發者。也適合跨供應商比較回答,或用多個模型對同一問題交叉驗證。
執行需求
需要 Linux 或 macOS 上的 Node.js 24+;以本機 stdio 程序執行,透過 npm 安裝並以 setup 指令設定。宿主助理與所諮詢的供應商 CLI 都需已安裝並登入。選用密鑰:CURSOR_API_KEY 用於 Cursor Agent,XAI_API_KEY 用於按量計費的 Grok API。Ollama 需可連線的伺服器位址(OLLAMA_HOST)。
安裝前請注意
呼叫會消耗現有供應商方案的額度或依該帳戶計費;xAI API 選項另行按量計費並需要 XAI_API_KEY。Antigravity 執行預設關閉,開啟後不保證唯讀。只提交允許傳送給所選供應商的資料;供應商與宿主的資料政策仍然適用。多個模型意見一致不代表正確,需自行核實結論。

安裝

在 SourceWeft 中

  1. 開啟 儀表板中的 Ask Llm,將其新增到工作區。
  2. 為需要使用其工具的對話啟用該服務。

Desktop only,透過 STDIO。 STDIO 服務會啟動本機處理程序,因此需要 SourceWeft 桌面主機。

其他 MCP 客戶端

參照 儲存庫 中的啟動說明。

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.

text
You:    ask codex to review src/auth.ts for security issuesCodex:  ⚠ verifyToken() compares tokens with === — not timing-safe (line 42)        ⚠ the session cookie is missing a SameSite attributeClaude: 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.

bash
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.

In Codex, setup installs the workflows and prints the registration command for you to run. Inspect existing user and project configuration before running it. For a default global install it is:

bash
codex mcp add ask-llm -- "$(npm prefix -g)/bin/ask-llm-mcp"

Your first review

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

text
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. Grok CLI supports a per-edit hook with Codex Sol by default or Claude Opus 5.5 via reviewer: claude; shell reviews cover command text only.

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
CodexTools and portable workflows; pairing on demand; you run the printed registration command
Cursor, Gemini CLITools and portable workflows; pairing on demand
Grok BuildTools and portable workflows; opt-in per-edit pairing
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 the Codex registration step.

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.

來源:README.md,提交 966e52d

工具

6

ask-llm

Ask LLM

Send a prompt to an LLM provider (Codex, Claude, Grok, Antigravity, Ollama, Gemini). Specify which provider to use. Provider-specific fallback behavior is reported truthfully; Grok never substitutes or falls back from the requested model. Returns both human-readable text and a structured response (provider, model, sessionId, usage) via outputSchema.

輸入參數modelprompt必填harnesssandboxprovider必填preferredsessionIdincludeDirsreasoningEffort

ask-cursor-agent

Ask via Cursor Agent

Use Cursor Agent as a model-neutral, read-only consultation harness. The provider and exact Cursor catalog model ID are separate required fields. Runs `agent --print --mode ask` without --force/--trust, never changes spend settings, and never falls back to another model or provider.

輸入參數model必填prompt必填provider必填sessionIdincludeDirs

ping

Ping

Test connectivity with the MCP server

輸入參數message

get-usage-stats

Get Usage Stats

Get the current MCP server's session usage stats: total LLM calls, token totals (input/output/thinking/cached), wall time, and breakdowns per provider and per model. No data leaves your machine — counts are tracked in-memory for the lifetime of the server process. Returns both human-readable markdown and a structured JSON snapshot via outputSchema.

無需輸入參數。

multi-llm

Multi-LLM Parallel Dispatch

Dispatch the same prompt to multiple LLM providers in parallel and return all responses in one structured payload. Use when you want to compare answers across Codex, Claude, Grok, Antigravity, Ollama, and Gemini, or when you want a multi-provider sanity check on a question. Returns per-provider success/failure, response text, model, sessionId, and token usage. Each call is fresh — no session continuity (use ask-llm for individual session-bearing calls).

輸入參數prompt必填providers

diagnose

Diagnose Environment

Run a self-diagnosis of the MCP server's environment: Node version, resolved PATH, provider CLI presence and versions, key env vars. Returns a structured report and a human-readable summary. Read-only; never spawns LLM calls.

無需輸入參數。

版本歷史

14
  1. v1.7.0最新Nov 20, 2026
  2. v1.6.3Nov 19, 2026
  3. v1.5.0Nov 17, 2026
  4. v1.4.0Nov 16, 2026
  5. v1.3.2Nov 11, 2026
  6. v1.3.0Nov 5, 2026
  7. v1.2.1Oct 13, 2026
  8. v1.2.0Oct 12, 2026
  9. v1.1.0Sep 29, 2026
  10. v1.0.0Sep 29, 2026
  11. v0.12.1Sep 27, 2026
  12. v0.12.0Sep 27, 2026
  13. v0.11.0Sep 26, 2026
  14. v0.9.3Sep 16, 2026

評分

已滿足適用檢查項的 90%

該評分衡量此收錄條目的完整程度,依據註冊中心條目、端點與公開來源計算得出。它不是對伺服器本身的評價,也不表示伺服器安全或目前可用:可連通性是帶日期的檢查結果,評分也不包含安裝量或使用者評價。

  • 近 30 天內可連通25 分
  • 已宣告認證方式10 分

    請在註冊中心條目中宣告憑證請求標頭,或保持端點能夠回應探測,以便判定其認證方式。

  • 已列出工具必需15 分
  • 描述必需15 分
  • 圖示10 分
  • 文件15 分
  • 授權條款10 分