multi-model-mcp
An MCP server that exposes tools for sub-agent style reasoning across multiple LLM providers, enabling delegation of prompts to various models and running critique loops, debates, red-teaming, and answer ranking.
README
multi-model-mcp
An MCP server that exposes tools for sub-agent style reasoning across multiple LLM providers. From Claude Code (or any MCP client), you can delegate prompts to OpenAI, Anthropic, Gemini, Groq, Ollama, OpenRouter, and any LiteLLM-supported provider — then run critique loops, debates, red-teaming, and answer ranking without leaving your conversation.
Tools
| Tool | Description |
|---|---|
ask_model |
Send a prompt to one configured model |
ask_many |
Send the same prompt to multiple models in parallel |
reason_together |
Multi-step reasoning: independent → critique, debate, or red-team |
critique_answer |
Ask models to critique a draft answer |
pick_best_answer |
Have a judge model rank candidate answers |
list_models |
List all configured model aliases |
reason_together strategies
independent_then_critique(default): All models answer independently → critic synthesizesdebate: Models see each other's answers and refine over N rounds → critic synthesizesred_team: Proposer answers → red teamers attack → proposer revises (N rounds) → critic finalizes
Setup
1. Install
Requires Python ≥ 3.11 and uv.
git clone https://github.com/YOUR_USERNAME/multi-model-mcp
cd multi-model-mcp
uv sync
2. Configure models
Copy and edit models.yaml — it ships with common models pre-configured. Each entry is a model alias pointing to a LiteLLM model string:
models:
gpt:
litellm_model: gpt-4.1
api_key_env: OPENAI_API_KEY
claude:
litellm_model: claude-sonnet-4-5
api_key_env: ANTHROPIC_API_KEY
local:
litellm_model: ollama/qwen3:latest
api_base: http://localhost:11434 # no key needed
Add any provider LiteLLM supports: Groq (groq/llama-3.3-70b-versatile), Mistral, Together AI, DeepSeek, OpenRouter (openrouter/...), etc.
3. Set API keys
cp .env.example .env
# edit .env with your keys
Only keys for providers you actually use are required.
4. Register with Claude Code
Add to your project's .mcp.json (or ~/.claude.json for global):
{
"mcpServers": {
"multi-model": {
"command": "uv",
"args": [
"run",
"--project", "/path/to/multi-model-mcp",
"multi-model-mcp"
],
"env": {
"OPENAI_API_KEY": "sk-...",
"ANTHROPIC_API_KEY": "sk-ant-...",
"GEMINI_API_KEY": "...",
"MODELS_CONFIG_PATH": "/path/to/multi-model-mcp/models.yaml"
}
}
}
}
Or if you install it:
uv tool install .
Then use "command": "multi-model-mcp" without args.
Example Claude Code usage
# Simple query
Use ask_model with alias "gpt" to explain backpressure in streaming systems.
# Parallel comparison
Use ask_many with aliases ["gpt", "claude", "gemini"] to explain the CAP theorem.
Compare their answers.
# Multi-model reasoning
Use reason_together with task "Should we use event sourcing for this service?"
model_aliases ["gpt", "gemini"], critic_model_alias "claude", strategy "independent_then_critique"
# Debate
Use reason_together with task "Is GraphQL worth the complexity over REST?"
model_aliases ["gpt", "claude"], critic_model_alias "gemini", strategy "debate", rounds 2
# Red-team a decision
Use reason_together with task "Our plan is to use a single Postgres instance for all tenants"
model_aliases ["gpt", "gemini", "groq"], strategy "red_team", rounds 2
# Critique a draft
Use critique_answer with question "What is eventual consistency?"
draft_answer "It means data will eventually be the same across nodes."
model_aliases ["claude", "gpt"]
# Pick the best
Use pick_best_answer with question "What is the best way to handle auth tokens?"
candidate_answers ["Store in localStorage", "Store in httpOnly cookies", "Store in memory only"]
judge_model_alias "claude"
Configuration reference
models.yaml fields
| Field | Required | Description |
|---|---|---|
litellm_model |
Yes | LiteLLM model string (e.g. gpt-4.1, gemini/gemini-2.5-pro, ollama/qwen3:latest) |
description |
No | Human-readable label |
api_key_env |
No | Env var name holding the API key |
api_base |
No | Override base URL (needed for Ollama, proxies) |
timeout |
No | Per-call timeout in seconds (default: 60) |
max_retries |
No | Retry attempts on rate limit / timeout (default: 2) |
LiteLLM model strings by provider
| Provider | Example model string |
|---|---|
| OpenAI | gpt-4.1, gpt-4o, o4-mini |
| Anthropic | claude-sonnet-4-5, claude-opus-4-8 |
| Google Gemini | gemini/gemini-2.5-pro, gemini/gemini-2.5-flash |
| Groq | groq/llama-3.3-70b-versatile |
| Ollama | ollama/qwen3:latest, ollama/llama3.3 |
| OpenRouter | openrouter/anthropic/claude-sonnet-4-5 |
| Mistral | mistral/mistral-large-latest |
| DeepSeek | deepseek/deepseek-chat |
| Together AI | together_ai/meta-llama/Llama-3-70b-chat-hf |
See LiteLLM providers docs for the full list.
Design notes
- No key leakage: API keys are never logged; errors are sanitized before returning.
- Failure isolation: one model failing in
ask_many/reason_togetherdoes not crash the call. - Synthesis ≠ truth:
reason_togetherpresents the critic's output as a synthesized answer, not ground truth. - No hidden reasoning exposed: traces summarize what happened (which model, which step) without exposing chain-of-thought internals.
- Easy to extend: add any LiteLLM-supported model in
models.yamlwith no code changes.
推荐服务器
Baidu Map
百度地图核心API现已全面兼容MCP协议,是国内首家兼容MCP协议的地图服务商。
Playwright MCP Server
一个模型上下文协议服务器,它使大型语言模型能够通过结构化的可访问性快照与网页进行交互,而无需视觉模型或屏幕截图。
Magic Component Platform (MCP)
一个由人工智能驱动的工具,可以从自然语言描述生成现代化的用户界面组件,并与流行的集成开发环境(IDE)集成,从而简化用户界面开发流程。
Audiense Insights MCP Server
通过模型上下文协议启用与 Audiense Insights 账户的交互,从而促进营销洞察和受众数据的提取和分析,包括人口统计信息、行为和影响者互动。
VeyraX
一个单一的 MCP 工具,连接你所有喜爱的工具:Gmail、日历以及其他 40 多个工具。
graphlit-mcp-server
模型上下文协议 (MCP) 服务器实现了 MCP 客户端与 Graphlit 服务之间的集成。 除了网络爬取之外,还可以将任何内容(从 Slack 到 Gmail 再到播客订阅源)导入到 Graphlit 项目中,然后从 MCP 客户端检索相关内容。
Kagi MCP Server
一个 MCP 服务器,集成了 Kagi 搜索功能和 Claude AI,使 Claude 能够在回答需要最新信息的问题时执行实时网络搜索。
e2b-mcp-server
使用 MCP 通过 e2b 运行代码。
Neon MCP Server
用于与 Neon 管理 API 和数据库交互的 MCP 服务器
Exa MCP Server
模型上下文协议(MCP)服务器允许像 Claude 这样的 AI 助手使用 Exa AI 搜索 API 进行网络搜索。这种设置允许 AI 模型以安全和受控的方式获取实时的网络信息。