claude-concilium
Multi-agent AI consultation framework for Claude Code via MCP — get second opinions from OpenAI, Gemini, Qwen, DeepSeek
README
Claude Concilium
Multi-agent AI consultation framework for Claude Code via MCP.
Get a second (and third) opinion from other LLMs when Claude Code alone isn't enough.
Claude Code ──┬── OpenAI (Codex CLI) ──► Opinion A
├── Gemini (gemini-cli) ─► Opinion B
│
└── Synthesis ◄── Consensus or iterate
The Problem
Claude Code is powerful, but one brain can miss bugs, overlook edge cases, or get stuck in a local optimum. Critical decisions benefit from diverse perspectives.
The Solution
Concilium runs parallel consultations with multiple LLMs through standard MCP protocol. Each LLM server wraps a CLI tool — no API keys needed for the primary providers (they use OAuth).
Key features:
- Parallel consultation with 2+ AI agents
- Production-grade fallback chains with error detection
- Each MCP server works standalone or as part of Concilium
- Plug & play: clone,
npm install, add to.mcp.json
Architecture
┌─────────────────────────────────────────────────────────┐
│ Claude Code │
│ │
│ "Review this code for race conditions" │
│ │
│ ┌──────────────┐ ┌──────────────┐ │
│ │ MCP Call #1 │ │ MCP Call #2 │ (parallel) │
│ └──────┬───────┘ └──────┬───────┘ │
│ │ │ │
└─────────┼──────────────────┼──────────────────────────────┘
│ │
▼ ▼
┌──────────────┐ ┌──────────────┐
│ mcp-openai │ │ mcp-gemini │ Primary agents
│ (codex exec)│ │ (gemini -p) │
└──────┬───────┘ └──────┬───────┘
│ │
▼ ▼
┌──────────────┐ ┌──────────────┐
│ OpenAI │ │ Google │ LLM providers
│ (OAuth) │ │ (OAuth) │
└──────────────┘ └──────────────┘
Fallback chain (on quota/error):
OpenAI → Qwen → DeepSeek
Gemini → Qwen → DeepSeek
Quickstart
1. Clone and install
git clone https://github.com/spyrae/claude-concilium.git
cd claude-concilium
# Install dependencies for each server
cd servers/mcp-openai && npm install && cd ../..
cd servers/mcp-gemini && npm install && cd ../..
cd servers/mcp-qwen && npm install && cd ../..
# Verify all servers work (no CLI tools required)
node test/smoke-test.mjs
Expected output:
PASS mcp-openai (Tools: openai_chat, openai_review)
PASS mcp-gemini (Tools: gemini_chat, gemini_analyze)
PASS mcp-qwen (Tools: qwen_chat)
All tests passed.
2. Set up providers
Pick at least 2 providers:
| Provider | Auth | Free Tier | Setup |
|---|---|---|---|
| OpenAI | codex login (OAuth) |
ChatGPT Plus weekly credits | Setup guide |
| Gemini | Google OAuth | 1000 req/day | Setup guide |
| Qwen | qwen login or API key |
Varies | Setup guide |
| DeepSeek | API key | Pay-per-use (cheap) | Setup guide |
3. Add to Claude Code
Copy config/mcp.json.example and update paths:
# Edit the example with your actual paths
cp config/mcp.json.example .mcp.json
# Update "/path/to/claude-concilium" with actual path
Or add servers individually to your existing .mcp.json:
{
"mcpServers": {
"mcp-openai": {
"type": "stdio",
"command": "node",
"args": ["/absolute/path/to/servers/mcp-openai/server.js"],
"env": {
"CODEX_HOME": "~/.codex-minimal"
}
},
"mcp-gemini": {
"type": "stdio",
"command": "node",
"args": ["/absolute/path/to/servers/mcp-gemini/server.js"]
}
}
}
4. Install the skill (optional)
Copy the Concilium skill to your Claude Code commands:
cp skill/ai-concilium.md ~/.claude/commands/ai-concilium.md
Now use /ai-concilium in Claude Code to trigger a multi-agent consultation.
MCP Servers
Each server can be used independently — you don't need all of them.
| Server | CLI Tool | Auth | Tools |
|---|---|---|---|
| mcp-openai | codex |
OAuth (ChatGPT Plus) | openai_chat, openai_review |
| mcp-gemini | gemini |
Google OAuth | gemini_chat, gemini_analyze |
| mcp-qwen | qwen |
API key / CLI login | qwen_chat |
DeepSeek uses the existing deepseek-mcp-server npm package — no custom server needed.
How It Works
Consultation Flow
- Formulate — describe the problem concisely (under 500 chars)
- Send in parallel — OpenAI + Gemini get the same prompt
- Handle errors — if a provider fails, fallback chain kicks in (Qwen → DeepSeek)
- Synthesize — compare responses, find consensus
- Iterate (optional) — resolve disagreements with follow-up questions
- Decide — apply the synthesized solution
Error Detection
All servers detect provider-specific errors and return structured responses:
| Error Type | Meaning | Action |
|---|---|---|
QUOTA_EXCEEDED |
Rate/credit limit hit | Use fallback provider |
AUTH_EXPIRED / AUTH_REQUIRED |
Token needs refresh | Re-authenticate CLI |
MODEL_NOT_SUPPORTED |
Model unavailable on plan | Use default model |
| Timeout | Process hung | Auto-killed, use fallback |
Fallback Chain
Primary: OpenAI ──────────────► Response
(QUOTA_EXCEEDED?)
│
Fallback 1: Qwen ──┴────────────► Response
(timeout?)
│
Fallback 2: DeepSeek ───────────► Response (always available)
When to Use Concilium
| Scenario | Recommended Agents |
|---|---|
| Code review | OpenAI + Gemini (parallel) |
| Architecture decision | OpenAI + Gemini → iterate if disagree |
| Stuck bug (3+ attempts) | All available agents |
| Performance optimization | Gemini (1M context) + OpenAI |
| Security review | OpenAI + Gemini + manual verification |
Customization
See docs/customization.md for:
- Adding your own LLM provider
- Modifying the fallback chain
- MCP server template
- Custom prompt strategies
Documentation
- Architecture — flow diagrams, error handling, design decisions
- OpenAI Setup — Codex CLI, ChatGPT Plus, minimal config
- Gemini Setup — gemini-cli, Google OAuth
- Qwen Setup — Qwen CLI, DashScope
- DeepSeek Setup — API key, npm package
- Customization — add your own LLM, modify chains
License
MIT
推荐服务器
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 模型以安全和受控的方式获取实时的网络信息。