@antonbabenko/deliberation-mcp 3.0.0 → 3.1.1

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (3) hide show
  1. package/README.md +103 -0
  2. package/dist/index.js +2 -2
  3. package/package.json +5 -3
package/README.md ADDED
@@ -0,0 +1,103 @@
1
+ # deliberation-mcp
2
+
3
+ Get a second opinion from GPT, Gemini, Grok, and 400+ OpenRouter models - and let them
4
+ reach a cross-model **consensus** - from inside any MCP host (Claude Code, Cursor, Codex,
5
+ Kiro, VS Code, Windsurf, Zed, ...).
6
+
7
+ One model is a guess. Three that agree is a plan.
8
+
9
+ This is the standalone MCP server. For the Claude Code plugin, one-click install buttons,
10
+ and full docs, see the repo: **https://github.com/antonbabenko/deliberation**
11
+
12
+ ## What it does
13
+
14
+ You stay the primary agent. When a task needs a second opinion or cross-model review, call
15
+ one of the tools below, read the result, and apply your own judgment. Seven expert personas
16
+ (architect, code reviewer, security analyst, and four more) shape the review. GPT and Gemini
17
+ can also implement changes; Grok and OpenRouter only advise.
18
+
19
+ ## Install
20
+
21
+ Add the server to your MCP host (most hosts use the `mcpServers` key):
22
+
23
+ ```json
24
+ {
25
+ "mcpServers": {
26
+ "deliberation": {
27
+ "command": "npx",
28
+ "args": ["-y", "@antonbabenko/deliberation-mcp"],
29
+ "env": {
30
+ "XAI_API_KEY": "xai-...",
31
+ "OPENROUTER_API_KEY": "sk-or-v1-..."
32
+ }
33
+ }
34
+ }
35
+ }
36
+ ```
37
+
38
+ Per-host config location and key:
39
+
40
+ | Host | Config | Key |
41
+ |------|--------|-----|
42
+ | Claude Code | `claude mcp add deliberation -- npx -y @antonbabenko/deliberation-mcp` | `mcpServers` |
43
+ | Cursor | `~/.cursor/mcp.json` or project `.cursor/mcp.json` | `mcpServers` |
44
+ | Codex CLI | `~/.codex/config.toml` (e.g. `[mcp_servers.deliberation]`) | `mcp_servers` |
45
+ | Gemini CLI | `~/.gemini/settings.json` | `mcpServers` |
46
+ | VS Code | `.vscode/mcp.json` (each entry needs `"type": "stdio"`) | `servers` |
47
+ | Windsurf | `~/.codeium/windsurf/mcp_config.json` | `mcpServers` |
48
+ | Zed | `settings.json` | `context_servers` |
49
+
50
+ ## Provider setup
51
+
52
+ Set only the providers you use:
53
+
54
+ - **GPT** - install the Codex CLI and run `codex login` (keys are not read from `env` here).
55
+ - **Gemini** - install the Antigravity CLI (`agy`) and run it once to sign in.
56
+ - **Grok** - set `XAI_API_KEY` (https://console.x.ai).
57
+ - **OpenRouter** - set `OPENROUTER_API_KEY` and declare models in
58
+ `~/.config/deliberation/config.json` (Windows: `%APPDATA%\deliberation\config.json`;
59
+ override with `DELIBERATION_CONFIG`). OpenRouter is advisory-only.
60
+
61
+ A starter config writer ships as a bin:
62
+
63
+ ```
64
+ npx -y --package @antonbabenko/deliberation-mcp deliberation-setup
65
+ ```
66
+
67
+ It writes a starter `config.json` (never overwrites an existing one).
68
+
69
+ ## Tools
70
+
71
+ - `ask-all` - one question to every configured provider in parallel; get each answer back
72
+ independently (no cross-talk).
73
+ - `consensus` - run the full multi-round convergence loop with a provider arbiter (blind
74
+ pass + peer review -> adjudicate -> revise) and return the converged verdict. Pass
75
+ `synthesizeAlways: true` for a single synthesis pass instead of the loop (best for open
76
+ questions), or `maxRounds` to cap the loop.
77
+ - `consensus-step` - drive the loop yourself as the arbiter, one action per call
78
+ (`init` -> `record_blind` -> `dispatch_peers` -> `submit_adjudication` -> `submit_revision`).
79
+ - `ask-gpt` / `ask-gemini` / `ask-grok` / `ask-openrouter` - one question to one provider.
80
+ - Experts: `architect`, `plan-reviewer`, `scope-analyst`, `code-reviewer`,
81
+ `security-analyst`, `researcher`, `debugger` - call directly, or pass `expert` on the
82
+ fan-out tools to apply one persona to every delegate.
83
+ - Session tools (opt-in `sessions.persist`): `session-get`, `session-revisit`,
84
+ `session-annotate`.
85
+
86
+ Every tool takes a `prompt` - give it full context (the goal, relevant code/paths, prior
87
+ attempts), since the experts do not share your session.
88
+
89
+ ## How consensus stays honest
90
+
91
+ The orchestrator commits a blind verdict before seeing the panel, cannot reach consensus on
92
+ its own vote alone (at least one external must approve), and records a reason for every
93
+ dismissed issue. The loop stops on agreement or at `consensus.maxRounds` (default 5).
94
+
95
+ ## More
96
+
97
+ Configuration reference, the Claude Code plugin, per-host guides, and architecture docs are
98
+ in the repo: **https://github.com/antonbabenko/deliberation**
99
+ (see `AGENTS.md` for the tool guide and `TECHNICAL.md` for the full config reference).
100
+
101
+ ## License
102
+
103
+ MIT
package/dist/index.js CHANGED
@@ -968,7 +968,7 @@ var require_openai_compatible = __commonJS({
968
968
  try {
969
969
  const { text } = await bridge.callOpenRouter({
970
970
  apiBase,
971
- apiKey: process.env[apiKeyEnv],
971
+ apiKey: req && req.apiKey || process.env[apiKeyEnv],
972
972
  model,
973
973
  messages: bridge.buildMessages(turns),
974
974
  reasoningEffort: req.reasoningEffort,
@@ -1024,7 +1024,7 @@ var require_grok = __commonJS({
1024
1024
  async ask(req) {
1025
1025
  const started = Date.now();
1026
1026
  const reasoningEffort = bridge.resolveReasoningEffort(req.reasoningEffort);
1027
- const apiKey = process.env.XAI_API_KEY;
1027
+ const apiKey = req && req.apiKey || process.env.XAI_API_KEY;
1028
1028
  try {
1029
1029
  const out = req.files && req.files.length ? await bridge.runWithFiles({
1030
1030
  files: req.files,
package/package.json CHANGED
@@ -1,10 +1,12 @@
1
1
  {
2
2
  "name": "@antonbabenko/deliberation-mcp",
3
- "version": "3.0.0",
3
+ "version": "3.1.1",
4
4
  "description": "Deliberation for Claude Code and any MCP host - GPT, Gemini, Grok, and OpenRouter expert subagents.",
5
5
  "mcpName": "io.github.antonbabenko/deliberation",
6
- "bin": { "deliberation-mcp": "./dist/index.js", "deliberation-setup": "./dist/setup.js" },
7
- "main": "./dist/index.js",
6
+ "repository": { "type": "git", "url": "git+https://github.com/antonbabenko/deliberation.git", "directory": "server/mcp" },
7
+ "homepage": "https://github.com/antonbabenko/deliberation#readme",
8
+ "bin": { "deliberation-mcp": "dist/index.js", "deliberation-setup": "dist/setup.js" },
9
+ "main": "dist/index.js",
8
10
  "files": ["dist/"],
9
11
  "engines": { "node": ">=18" },
10
12
  "scripts": {