by raine
Consult LLM escalates complex reasoning tasks to advanced models with code context, git diffs, and detailed cost trackin
Lets Claude consult more powerful AI models (GPT-5, Gemini Pro, DeepSeek) when handling complex reasoning tasks, especially for debugging code issues. Includes detailed cost tracking and multi-turn conversations.
Consult LLM is a community-built MCP server published by raine that provides AI assistants with tools and capabilities via the Model Context Protocol. Consult LLM escalates complex reasoning tasks to advanced models with code context, git diffs, and detailed cost trackin It is categorized under ai ml, developer tools.
You can install Consult LLM in your AI client of choice. Use the install panel on this page to get one-click setup for Cursor, Claude Desktop, VS Code, and other MCP-compatible clients. This server runs locally on your machine via the stdio transport.
MIT
Consult LLM is released under the MIT license. This is a permissive open-source license, meaning you can freely use, modify, and distribute the software.
Add new capabilities to Claude beyond text generation
Example
Access external data sources, execute code, interact with tools and services
Transform Claude from chatbot to action-taking agent
Provide Claude with access to relevant context and data
Example
Load project documentation, access knowledge bases, query databases
Get more accurate, context-aware responses
Automate multi-step workflows combining AI and external tools
Example
Research → Summarize → Create document → Send notification
Complete complex tasks end-to-end without manual steps
Share your MCP server with the developer community
We evaluated Consult LLM against two servers with overlapping tools; this profile had the clearer scope statement.
Useful MCP listing: Consult LLM is the kind of server we cite when onboarding engineers to host + tool permissions.
Consult LLM is among the better-indexed MCP projects we tried; the explainx.ai summary tracks the official description.
Consult LLM reduced integration guesswork — categories and install configs on the listing matched the upstream repo.
Consult LLM is among the better-indexed MCP projects we tried; the explainx.ai summary tracks the official description.
Consult LLM reduced integration guesswork — categories and install configs on the listing matched the upstream repo.
Useful MCP listing: Consult LLM is the kind of server we cite when onboarding engineers to host + tool permissions.
I recommend Consult LLM for teams standardizing on MCP; the explainx.ai page compares cleanly with sibling servers.
Strong directory entry: Consult LLM surfaces stars and publisher context so we could sanity-check maintenance before adopting.
We evaluated Consult LLM against two servers with overlapping tools; this profile had the clearer scope statement.
showing 1-10 of 65
An MCP server that lets Claude Code consult stronger AI models (GPT-5.2, Gemini 3.1 Pro, DeepSeek Reasoner) when Sonnet has you running in circles and you need to bring in the heavy artillery. Supports multi-turn conversations.
> Still getting this error after your fix. Ask gemini
E5108: Error executing lua: attempt to call method 'child' (a nil value)
⏺ Let me consult Gemini to understand the Neovim treesitter API changes:
⏺ consult-llm:consult_llm (MCP)(prompt: "Neovim plugin broken due to treesitter
API changes...", files: ["lua/testonly.lua"],
model: "gemini-2.5-pro")
⎿ The issue is that iter_matches() can return nil nodes in newer Neovim
versions. Switch to iter_captures() which never returns nil nodes, and use
named_child(0) instead of child(0) to get only meaningful syntax nodes.
… +93 lines (ctrl+r to expand)
⏺ The LLM identified the issue - iter_matches() API changed. Switching to
iter_captures() approach now.
Quick start · Configuration · Monitor TUI · Changelog
gemini CLI to take advantage of
free quotacodex CLI for OpenAI modelscursor-agent CLI to route GPT and
Gemini models through a single toolthread_idAdd to Claude Code (choose one):
With npx (no install required):
claude mcp add consult-llm \
-e OPENAI_API_KEY=your_key \
-e GEMINI_API_KEY=your_key \
-- npx -y consult-llm-mcp
With binary (no Node.js required):
curl -fsSL https://raw.githubusercontent.com/raine/consult-llm-mcp/main/scripts/install.sh | bash
claude mcp add consult-llm \
-e OPENAI_API_KEY=your_key \
-e GEMINI_API_KEY=your_key \
-- consult-llm-mcp
For global availability across projects, add --scope user.
claude mcp add consult-llm \
-e OPENAI_API_KEY=your_openai_key \
-e GEMINI_API_KEY=your_gemini_key \
-e DEEPSEEK_API_KEY=your_deepseek_key \
-e CONSULT_LLM_GEMINI_BACKEND=gemini-cli \
-- npx -y consult-llm-mcp
</details>
Verify connection with /mcp:
❯ 1. consult-llm ✔ connected
Ask a question:
"Consult Gemini about how to fix the race condition in server.ts"
Some real-world examples. Click to expand.
<details> <summary>Explain the problem, and tell CC to consult a smarter LLM</summary> <Some long explanation of the issue here>
Consult LLM for assistance, use gemini
⏺ I see the issue! The problem is that the frontend is trying to use the hint
for "isn't" but the server generated a hint for "isn't it" (the full phrase).
This is a mismatch between how the frontend segments text and how the server
generates hints.
Let me consult the LLM to get assistance on this segmentation mismatch issue.
⏺ Write(hint-segmentation-issue.md)
⎿ Wrote 53 lines to hint-segmentation-issue.md
# Hint Segmentation Mismatch Issue
## Problem Description
There's a mismatch between how the frontend segments text for clickable
words and how the backend generates hints. This causes hint unlocking to
fail when the segments don't match exactly.
## Example Case
**Original Text**: "Hello! Nice weather, isn't it?"
… +43 lines (ctrl+r to expand)
⏺ consult-llm:consult_llm (MCP)(model: "gemini-2.5-pro", files: ["/project/hint
-segmentation-issue.md","/project/web/src/compo
nents/HintsText.tsx","/project/web/src/utils/hi
nts.ts","/project/server/src/routes/public/hint
s.ts","/project/server/src/llm/hints.ts"])
⎿ An excellent analysis of the problem. The root cause has been correctly
identified: a race condition within the `handleConfirmGenerateHints`
function in `HintsText.tsx`. The component state updates in the background
after `await generateHints()`, but the function continues executing with a
stale `activeSegment` variable, causing it to request a hint for a smaller
text segment ( e.g., "isn't") instead of the full, newly-available hint
phrase (e.g., "isn't it").
… +607 lines (ctrl+r to expand)
⏺ Perfect! The LLM identified the core issue - there's a race condition in
handleConfirmGenerateHints where the function uses stale state after async
operations. The solution is to re-target the hint key after generation to
find the correct matching hint.
Let me implement this solution:
⏺ Update Todos
⎿ ☐ Fix hint segmentation mismatch by implementing smarter hint key
targeting in handleConfirmGenerateHints
</details>
<details>
<summary>Using web mode to copy prompts to clipboard for browser-based LLMs</summary>
> I need help implementing a -b/--background flag for my Rust CLI. Use consult LLM with web mode
⏺ I'll use web mode to copy the formatted prompt to your clipboard so you can
paste it into any browser-based LLM service.
⏺ consult-llm:consult_llm (MCP)(prompt: "What is the best approach to implement a
-b/--background flag for the "workmux add" command that
creates a tmux window in the background without switching to
it?
The current implementation automatically switches to
the newly created window via `tmux::select_window()` in the
`setup_environment()` function. I need to make this behavior
conditional based on a flag passed from the
CLI.
Consider:
1. Where should the background flag be
threaded through the call chain?
2. Should I modify the
existing SetupOptions struct or add a parameter?
3. What's
the most maintainable approach given the codebase
structure?
4. Are there any edge cases to consider (e.g.,
should select_pane also be conditional)?", files:
["src/cli.rs","src/workflow.rs","src/tmux.rs"], web_mode:
true)
⎿ ✓ Prompt copied to clipboard!
Please paste it into your browser-based LLM service and share the response
here before I proceed with any implementation.
Note: File paths were included:
- src/cli.rs
- src/workflow.rs
- src/tmux.rs
> [User pastes the response from the external LLM]
⏺ Thank you! Based on the recommendations, I'll now implement the solution...
This is useful when:
⏺ Fixed! Added nil checks for both node and child and updated the iter_matches call to handle the newer API properly.
> Still not working:
E5108: Error executing lua /Users/raine/code/testonly.nvim/lua/testonly.lua:92: attempt to call method 'child' (a nil value)
stack traceback:
/Users/raine/code/testonly.nvim/lua/testonly.lua:92: in function 'reset_all_exclusive'
/Users/raine/code/testonly.nvim/lua/testonly.lua:110: in function 'reset_all_exclusive'
[string ":lua"]:1: in main chunk
Ask gemini
⏺ Let me consult with a more powerful AI to understand the current Neovim treesitter API changes:
⏺ consult-llm:consult_llm (MCP)(prompt: "I'm debugging a Neovim plugin that's broken due to treesitter API changes. The error is "attempt to call method 'child' (a nil value)" on line 92. The
code is trying to access child nodes from treesitter matches but the API seems to have changed in newer Neovim versions.
Here's the problematic
code:
```lua
for _, match, _ in parsed_query:iter_matches(root, bufnr, start_row, end_row) do
for id, node in pairs(match) do
local name =
parsed_query.captures[id]
if name == "call" and node then
local child = node:child(0) -- ERROR HERE
if child then
local text = vim.treesitter.get_node_text(child, bufnr)
-- ... rest of logic
end
end
end
end
```
What's the
correct way to iterate over treesitter query matches and access child nodes in current Neovim versions? What API changes should I be aware of?", files:
["/Users/raine/code/testonly.nvim/lua/testonly.lua"])
⎿ Problem
-------
---
Prerequisites
Time Estimate
15-60 minutes depending on server complexity
Steps
Troubleshooting
✓ Do
✗ Don't
💡 Pro Tips
Architecture
Model Context Protocol standardizes how AI hosts (Claude, Cursor) communicate with external tools and data sources through server implementations.
Protocols
Compatibility
✓ Use when
Use when you need Claude to access external data, execute actions, or integrate with tools. Best for extending AI capabilities beyond conversation.
✗ Avoid when
Avoid when native integrations exist (use official APIs directly), for real-time critical systems, or when security/compliance requires zero external dependencies.