spyrae/claude-concilium
š š š šŖ š§ - Multi-agent AI consultation framework for Claude Code. Three MCP servers wrapping CLI tools (Codex, Gemini, Qwen) for parallel code review and problem-solving with fallback chains and error detection. Includes ready-to-use Claude Code skill.
Quick Install
{
"mcpServers": {
"spyrae-claude-concilium": {
"command": "uvx",
"args": [
"spyrae-claude-concilium"
]
}
}
}Using an AI coding agent (Claude Code, Cursor, etc.)? Copy a ready-made prompt that tells it to fetch the setup instructions and install this server for you.
Documentation Overview
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 | OAuth 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 | OAuth / API key | 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 |
AUTH_NOT_CONFIGURED | Qwen auth type not set | Set QWEN_AUTH_TYPE env var |
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 |
Docker
Run any server in a container:
# Build
docker build -t claude-concilium .
# Run a specific server (mcp-openai | mcp-gemini | mcp-qwen)
docker run -i --rm -e SERVER=mcp-openai claude-concilium
docker run -i --rm -e SERVER=mcp-gemini claude-concilium
Note: The servers wrap CLI tools (codex, gemini, qwen) that require local authentication. Mount your auth credentials when running:
# OpenAI (Codex)
docker run -i --rm -e SERVER=mcp-openai \
-v ~/.codex:/root/.codex:ro \
claude-concilium
# Gemini
docker run -i --rm -e SERVER=mcp-gemini \
-v ~/.config/gemini:/root/.config/gemini:ro \
claude-concilium
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
Changelog
v2.0.0 (2026-03-02)
mcp-qwen:
- Prompt delivery via stdin (
-p -) instead of command argument ā safe for any content, no length limits - OAuth auth-type support via
QWEN_AUTH_TYPEenv var (e.g.,qwen-oauth) - New error detection:
AUTH_NOT_CONFIGURED(catches "no auth type is selected") - Graceful shutdown handler (SIGTERM)
mcp-openai:
- Default timeout increased from 90s to 180s (codex exec can be slow on complex prompts)
All servers:
- Version bumped to 2.0.0
- Updated documentation and setup guides
v0.1.0 (2025-12-15)
- Initial release with 3 MCP servers (OpenAI, Gemini, Qwen)
- Concilium skill with fallback chains
- Smoke test suite
- Docker support
License
MIT