Get a second opinion in Claude Code from GPT, Gemini, and Grok - plus 400+ more models through OpenRouter, including Qwen, Kimi, and DeepSeek.
概要
Get a second opinion in Claude Code from GPT, Gemini, and Grok - plus 400+ more models through OpenRouter, including Qwen, Kimi, and DeepSeek.
README
Deliberation
Get a second opinion in Claude Code from GPT, Gemini, and Grok - plus 400+ more models through OpenRouter, including Qwen, Kimi, and DeepSeek. Seven domain experts (Architect, Code Reviewer, Security Analyst, and four more) review your plans, find bugs, and debate edge cases until they agree.
Recent blog post: Meet Deliberation: 400+ models is easy, knowing which ones earn a place is hard.
What is Deliberation?
Claude can ask GPT, Gemini, Grok, or any OpenAI-compatible model (via OpenRouter) for help through MCP. The plugin handles the wiring for each provider so you just write the prompt. Each expert has a distinct specialty and can advise or implement.
You can use any subset of the providers. The plugin detects which are configured and routes
accordingly. OpenRouter is advisory-only and config-driven: models are declared in
~/.config/deliberation/config.json (Windows: %APPDATA%\deliberation\config.json; override
with DELIBERATION_CONFIG) and hot-reload without restarting Claude Code.
| What you get | Why it matters |
|---|---|
| 7 domain experts | The right specialist for each problem type |
| GPT, Gemini, Grok, or OpenRouter models | Use your preferred provider(s) |
| Dual mode | Experts analyze (read-only) or implement (write) |
| Auto-routing | Claude detects when to delegate from your request |
| Synthesized responses | Claude interprets expert output, never raw passthrough |
Install
Claude Code plugin (recommended):
1. Add the marketplace - antonbabenko/agent-plugins
/plugin marketplace add antonbabenko/agent-plugins
2. Install the plugin
/plugin install deliberation@antonbabenko
3. Run setup
/deliberation:setup
Claude now routes complex tasks to your GPT, Gemini, Grok, and OpenRouter experts (Grok and OpenRouter advise; GPT and Gemini can also implement).
Setup is a one-time step. The MCP servers are registered by the plugin manifest, so they load automatically and stay current across updates.
Updating (Claude Code)
/plugin marketplace update antonbabenko # pull the new version from the marketplace
/reload-plugins # reconnect the MCP servers (or just restart Claude Code)
Updating on non-Claude hosts: hosts that run the standalone server via npx -y @antonbabenko/deliberation-mcp get the latest published version on each fresh resolve. npx
caches resolved packages, so if a host serves an old build, clear the npx cache
(rm -rf ~/.npm/_npx) or pin/refresh the version.
Alternative: Use deliberation MCP server (standalone, works with any agents)
The orchestration server is also published on its own - npm @antonbabenko/deliberation-mcp, Official MCP Registry name io.github.antonbabenko/deliberation.
One-click install:
Native plugins per host (Cursor / Codex / Kiro / OpenCode)
Beyond the raw MCP config above, deliberation ships native plugin artifacts for four hosts so the experience matches the Claude Code plugin (persona-bearing experts + when-to-delegate guidance, not just bare tools). All of these are generated from the canonical sources by node scripts/sync-hosts.js and committed, so they never drift (a CI drift test enforces it). Each host scans the repo for its own files:
| Host | Native artifacts (in this repo) | Install |
|---|---|---|
| Cursor | .cursor/rules/deliberation.mdc |
Use the one-click MCP button above, then copy the .mdc into your project’s .cursor/rules/. |
| Codex CLI | plugins/deliberation/ (.codex-plugin/plugin.json + .mcp.json + skills/) and a repo-scoped .agents/plugins/marketplace.json |
codex plugin marketplace add antonbabenko/deliberation, then install deliberation from /plugins. |
| Kiro | POWER.md + mcp.json + steering/ (a “Kiro Power”) |
In Kiro, “Add power from GitHub” -> this repo URL. Submit to the registry at kiro.dev/powers/submit. |
| OpenCode | .opencode/commands/*.md + .opencode/agents/*.md |
Add the MCP server to opencode.json (mcp key, type: "local", command: ["npx","-y","@antonbabenko/deliberation-mcp"]), then copy .opencode/commands/ and .opencode/agents/ into your project. |
Provider credentials work the same as the standalone server (GPT via the Codex CLI, Gemini via agy, XAI_API_KEY for Grok, OPENROUTER_API_KEY for OpenRouter) - set only the providers you use. The MCP server already injects each expert persona server-side, so these native files add the host’s command/steering surface, not duplicated logic.
Full per-host install guides: docs/hosts/ - Cursor, Codex CLI, Kiro, OpenCode.
Requirements
You need at least one provider:
- Codex CLI (GPT):
npm install -g @openai/codex, thencodex login. - Antigravity CLI: Getting Started with Antigravity CLI and Migrating from Gemini CLI, then run
agyand login. - Grok (xAI): no CLI to install; the bridge ships with the plugin (needs Node 18+). Set
XAI_API_KEY(get a key at https://console.x.ai). - OpenRouter: no CLI; the bridge ships with the plugin (needs Node 18+). Set
OPENROUTER_API_KEY(get a key at https://openrouter.ai/keys), then declare models in~/.config/deliberation/config.json(Windows:%APPDATA%\deliberation\config.json; override withDELIBERATION_CONFIG). Works with any OpenAI-compatible endpoint (Ollama, vLLM, LM Studio, HuggingFace Inference) - auth is skipped automatically when the key env var is empty.
Commands
Bundled with the plugin (available once installed):
| Command | Purpose |
|---|---|
/deliberation:setup |
Configure Codex/Gemini/Grok/OpenRouter MCP servers + orchestration rules |
/deliberation:help |
How to use deliberation on your host, with paste-ready example prompts |
/deliberation:doctor |
Health check (config, provider CLIs, sessions/debug, path drift) with fixes; read-only |
/deliberation:consensus |
🔥🔥🔥 Arbiter-mediated GPT + Gemini + Grok + Claude convergence loop |
/deliberation:ask-all |
🔥 GPT + Gemini + Grok (+ configured OpenRouter models) in parallel, synthesized |
/deliberation:ask-gpt |
One-shot GPT (Codex) second opinion |
/deliberation:ask-gemini |
One-shot Gemini second opinion |
/deliberation:ask-grok |
One-shot Grok (xAI) second opinion (advisory-only) |
/deliberation:ask-openrouter |
One-shot OpenRouter model second opinion (advisory-only) |
/deliberation:analyze |
Analyze recent runs (latency, tokens, verdict agreement) and suggest model/reasoning/fanout tuning (advisory) |
/deliberation:uninstall |
Remove MCP config, rules, and aliases |
/deliberation:grok-files |
List, prune, or gc Grok-uploaded files (storage + local cache cleanup) |
/setup can also install short aliases (/ask-gpt, /ask-gemini, /ask-grok, /ask-all, /consensus, /analyze) into ~/.claude/commands/. This is opt-in. Existing same-named commands are kept by default; setup asks before overwriting any of them. /deliberation:uninstall removes an alias only if it is byte-identical to the bundled copy.
The Experts
| Expert | What they do | Example triggers |
|---|---|---|
| Architect | System design, tradeoffs, complex debugging | “How should I structure this?” / “What are the tradeoffs?” |
| Plan Reviewer | Validate plans before you start | “Review this migration plan” / “Is this approach sound?” |
| Scope Analyst | Catch ambiguities early | “What am I missing?” / “Clarify the scope” |
| Code Reviewer | Find bugs, improve quality | “Review this PR” / “What’s wrong with this?” |
| Security Analyst | Vulnerabilities, threat modeling | “Is this secure?” / “Harden this endpoint” |
| Researcher | External libraries, docs, best practices | “How do I use X?” / “Find examples of Y” |
| Debugger | Root-cause analysis, minimal fixes | “Why does this crash?” / “Debug this failing test” |
When experts help most
- Architecture decisions - “Should I use Redis or in-memory caching?”
- Stuck debugging - after two or more failed attempts, get a fresh perspective
- Pre-implementation - validate a plan before writing code
- Security concerns - “Is this auth flow safe?”
- Code quality - a second opinion on your implementation
When not to use experts
- Simple file operations (Claude handles these directly)
- First attempt at any fix (try yourself first)
- Trivial questions (no need to delegate)
How to Use
Describe your task. Claude detects when an expert helps and delegates automatically:
You: "Is this authentication flow secure?"
Claude: routes to the Security Analyst, then synthesizes the findings.
You can also ask explicitly: “Ask GPT to review this architecture”, “Ask Gemini to…”, or “Ask Grok to…”. Each expert runs read-only for analysis or with write access to apply fixes, and Claude picks the mode from your request.
Or invoke the slash commands directly - see Commands above.
How /consensus and /ask-* keep models honest
/ask-gpt, /ask-gemini, /ask-grok, and /ask-all are the quick commands: each dispatches one or three external models, Claude reads the output, and you get one synthesized answer. Single shot, no loop, no peer round.
/consensus is the heavy one. Same parallel dispatch, but with a peer-review round and a multi-round loop that stops only when the models agree. The cost: the orchestrator (Claude) writes the review prompt, casts a vote, decides which objections are real, and runs the loop. Left alone, that setup can quietly rubber-stamp its own plan. Four guards stop that.
See the detailed diagram with bias guards and per-model flow
The four guards:
- Blind verdict. Claude posts its own verdict (APPROVE / REQUEST CHANGES / REJECT) in a message sent before the one that calls the panel. The pre-commitment sits in the transcript, so Claude cannot reshape its opinion after seeing the others. The engine enforces this: the panel is not revealed until the blind verdict is recorded.
- Peer review. Each external model reviews the plan independently and returns a verdict plus categorized critical issues; Claude weighs them as the arbiter. The models vote, Claude adjudicates.
- No self-approval. A round converges only when every responding external approves and at least one external actually answered. Claude’s own approval never carries a round by itself. A provider that errors (an unconfigured Grok returning
missing-auth, for example) drops out of the count instead of jamming the loop. - No silent dismissal. Every critical issue that gets dismissed or deferred ships with a one-line reason in the final report, including the times Claude walks back one of its own blind objections. The engine rejects an adjudication that dismisses an issue without a reason.
The /ask-* commands carry a lighter version of the same rule. The external model only advises: Claude reads the output, applies its own judgment, and owns the synthesized answer. When the models agree, that is input, not a verdict.
Configuration
Full setup and configuration reference lives in SETUP.md. It covers:
- Expert modes - advisory (
read-only) vs implementation (workspace-write), chosen automatically from your request - Config file - location (
~/.config/deliberation/config.json), theDELIBERATION_CONFIGoverride, and hot-reload - The six config sections -
providers,models,routing,consensus,sessions,debug- with a minimal example - OpenRouter models - declaring records,
askAll/consensuseligibility, fan-out,reasoningEffort, and arbiter selection;consensusalso configures the round cap (maxRounds) and wall-time budget (maxWallMs, default 20 min) - Timeouts -
providers.defaults.timeoutraises the per-call ceiling for every provider at once;providers..timeoutoverrides one, and a pinned model’smodels..timeoutstill wins. A rate-limited (HTTP 429) call is retried once, honoring the upstream’sRetry-After - Debug log - opt-in latency / token / voting trace
- Session persistence - opt-in on-disk run history (incl. the host-driven
/consensusloop) and thesession-*tools;sessions.captureText(default off) additionally stores provider response bodies (scrubbed)
For provider internals, environment variables, and manual MCP setup, see TECHNICAL.md.
Author
Maintained by Anton Babenko - LinkedIn, X/Twitter.
Contributing
Contributions welcome. See CONTRIBUTING.md for the workflow, commit conventions, and the automated release process.
License
インストール
npx -y @antonbabenko/deliberation-mcp設定
{
"mcpServers": {
"deliberation": {
"command": "npx",
"args": ["-y", "@antonbabenko/deliberation-mcp"],
"env": {
"XAI_API_KEY": "xai-...",
"OPENROUTER_API_KEY": "sk-or-v1-..."
}
}
}
}