brainstorm-mcp
brainstorm-mcp
向一个模型提出设计问题,你会得到一个自信的答案,却无法得知它哪些部分不确定。问三个模型,分歧本身就是信号。
brainstorm-mcp 在你的编辑器内运行 GPT、Gemini、DeepSeek、Claude 和本地 Ollama 模型之间的多轮辩论:它们会看到并互相批评彼此的答案,经过多轮后,你会得到一份 3 条要点的综合结论——建议、关键权衡、最强烈的分歧。它还支持即时快速模式、带裁决的多模型代码审查,以及红队/苏格拉底式风格。托管模式无需任何 API 密钥。
不要相信单一 AI。让它们争论。
演示

点击观看:3 个模型辩论、交叉质询,并产生结构化裁决——全部在 Claude Code 内完成。
功能
托管模式 — 无需 API 密钥。通过子代理使用你环境中的模型(Claude Opus/Sonnet/Haiku)
API 模式 — 直接调用模型 API,在 OpenAI、Gemini、DeepSeek、Groq、Ollama 之间并行执行
CLI 模式 — 通过你已有的代理 CLI(
claude、codex等)进行辩论,因此辩论使用你的订阅而非 API 额度brainstorm_quick — 10 秒内获得即时多模型视角
brainstorm_review — 多模型代码审查,包含结构化发现、严重性评级和裁决
辩论风格 — 自由形式、红队(对抗性)和苏格拉底式(追问式)
上下文注入 — 将辩论基于实际代码、差异或架构文档
3 条要点综合裁决 — 建议、关键权衡、最强烈的分歧
Claude 作为参与者 — Claude 与外部模型一起辩论,拥有完整对话上下文
多轮辩论 — 模型在多轮中看到并批评彼此的回应
并行执行 — 每轮中所有模型同时响应
弹性 — 一个模型失败不会中止辩论
跨平台 — 支持 macOS、Windows 和 Linux
Related MCP server: roundtable-mcp
安装(60秒)
claude mcp add brainstorm -- npx -y brainstorm-mcp这足以用于托管模式(无需 API 密钥——它使用你环境中已有的模型进行辩论)。添加提供者密钥,即可将 GPT、Gemini、DeepSeek、Groq 或 Ollama 引入辩论。
Claude Code
添加到项目的 .mcp.json:
{
"mcpServers": {
"brainstorm": {
"command": "npx",
"args": ["-y", "brainstorm-mcp"],
"env": {
"OPENAI_API_KEY": "sk-...",
"GEMINI_API_KEY": "AIza...",
"DEEPSEEK_API_KEY": "sk-..."
}
}
}
}Claude Desktop
添加到 claude_desktop_config.json:
{
"mcpServers": {
"brainstorm": {
"command": "npx",
"args": ["-y", "brainstorm-mcp"],
"env": {
"OPENAI_API_KEY": "sk-...",
"DEEPSEEK_API_KEY": "sk-..."
}
}
}
}手动安装
npm install -g brainstorm-mcp
brainstorm-mcp托管模式无需 API 密钥——安装即可使用。宿主(Claude Code)使用自己的模型访问权限执行提示。
配置
选项 1:环境变量(最简单)
OPENAI_API_KEY=sk-...
GEMINI_API_KEY=AIza...
DEEPSEEK_API_KEY=sk-...选项 2:配置文件(完全控制)
设置 BRAINSTORM_CONFIG 指向一个 JSON 配置:
{
"providers": {
"openai": { "model": "gpt-5.4", "apiKeyEnv": "OPENAI_API_KEY" },
"gemini": { "model": "gemini-2.5-flash", "apiKeyEnv": "GEMINI_API_KEY" },
"deepseek": { "model": "deepseek-chat", "apiKeyEnv": "DEEPSEEK_API_KEY" },
"ollama": { "model": "llama3.1", "baseURL": "http://localhost:11434/v1" }
}
}已知提供者(openai、gemini、deepseek、groq、mistral、together、moonshot、minimax、glm、qwen)不需要 baseURL。
选项 3:CLI 提供者(使用订阅,而非 API 额度)
如果你已经为 Claude Code、Codex、Gemini CLI 等付费,brainstorm 可以调用这些 CLI,而不是购买 API 额度。任何在你的 PATH 中找到的代理 CLI 都会在启动时自动注册——无需配置:
[brainstorm] Detected CLI provider(s) on PATH: claude, codex (subscription-based, no API cost)像使用任何其他提供者一样使用它们:
{ "topic": "GraphQL vs REST", "models": ["claude:sonnet", "codex:default", "openai:gpt-5.4"] }内置适配器:
Provider | Command | Default model | Status |
|
|
| 已验证 |
|
|
| 已验证 |
|
|
| 尽力而为,请在本地验证 |
|
|
| 尽力而为 |
|
|
| 尽力而为 |
|
|
| 尽力而为 |
|
|
| 尽力而为 |
|
|
| 尽力而为 |
<provider>:default 表示“让 CLI 使用它配置的任何模型”。CLI 调用在禁用工具的情况下运行,并在 CLI 支持的地方使用只读沙箱——它们生成文本,不会触碰你的仓库。提供者特定的 API 密钥环境变量(ANTHROPIC_API_KEY、OPENAI_API_KEY)会从子进程中剥离,因此 CLI 会回退到你的订阅登录。
环境变量选项:
Variable | Effect |
|
|
|
|
| CLI 提供者的每次调用超时(默认 300000) |
要固定模型或添加未内置的 CLI,请使用配置文件:
{
"providers": {
"claude": { "type": "cli", "model": "opus" },
"my-cli": {
"type": "cli",
"adapter": "custom",
"command": "some-agent-cli",
"args": ["run", "--model", "{{model}}", "--quiet", "{{prompt}}"],
"promptVia": "arg",
"model": "some-model"
}
}
}模板占位符:{{model}}、{{system}}、{{prompt}}、{{outfile}}。一个解析为空的单独占位符会连同引入它的标志一起从命令行中删除,因此 ["--model", "{{model}}"] 即使对于 provider:default 也能正常工作。设置 "promptVia": "stdin" 以通过管道传递提示,而不是作为参数传递。
通过 Claude CLI 使用编码计划后端
Moonshot (Kimi)、MiniMax 和 Z.ai (GLM) 销售支持 Anthropic API 的编码计划订阅。将 claude 二进制指向其中一个,该供应商就会在你已付费的计划上加入辩论:
{
"providers": {
"moonshot": { "type": "cli", "backend": "moonshot", "model": "kimi-k2-thinking" },
"minimax": { "type": "cli", "backend": "minimax", "model": "MiniMax-M2" },
"glm": { "type": "cli", "backend": "glm", "model": "glm-4.6" }
}
}Backend | Endpoint | Token env var |
|
|
|
|
|
|
|
|
|
令牌在调用时从你的环境中读取——配置文件保存的是变量名,而不是秘密。ANTHROPIC_API_KEY 会从子进程中剥离,因此你的 Anthropic 账户绝不会为这些调用付费。任何 CLI 提供者还接受 "env" 块来手动覆盖后端;值为 "$NAME" 时通过服务器的环境间接引用。
这些供应商也可以作为普通的计量 API 访问——moonshot、minimax、glm 和 qwen 有已知的基础 URL,因此仅凭 MOONSHOT_API_KEY 就足以将 moonshot 注册为 API 提供者。
工具
Tool | Description | Annotation |
| AI 模型之间的多轮辩论(API 或托管模式) | readOnly |
| 即时多模型视角——并行,无轮次 | readOnly |
| 多模型代码审查,包含发现、严重性和裁决 | readOnly |
| 在交互式会话中提交 Claude 的回应 | readOnly |
| 在托管会话中提交模型回应 | readOnly |
| 显示已配置的提供者、API 密钥状态和检测到的 CLI | readOnly |
| 在运行时添加新的 API 或 CLI 提供者 | non-destructive |
使用示例
示例 1:快速多模型视角
提示: “使用 brainstorm_quick 比较 Redis 与 PostgreSQL 用于会话存储”
调用的工具: brainstorm_quick
{ "topic": "Redis vs PostgreSQL for session storage in a Node.js app" }输出: 每个配置的模型独立并行响应。你会在 10 秒内获得并排比较,包含模型名称、响应、时间和成本。
错误处理: 如果某个模型失败(速率限制、超时),工具会继续使用其余模型,并显示哪些模型失败。
示例 2:多模型代码审查
提示: “审查此差异是否存在安全问题”(粘贴 git diff)
调用的工具: brainstorm_review
{
"diff": "diff --git a/src/auth.ts ...",
"title": "Add JWT authentication middleware",
"focus": ["security", "correctness"]
}输出: 结构化裁决(批准 / 带警告批准 / 需要更改),包含发现表,显示严重性、类别、文件、行号和建议。还包括模型一致性分析——多个模型标记的问题具有更高的置信度。
错误处理: 如果综合失败,仍会返回原始模型审查。
示例 3:托管模式头脑风暴(无需 API 密钥)
提示: “使用 opus、sonnet 和 haiku 进行头脑风暴,讨论我们应该使用 GraphQL 还是 REST”
调用的工具: brainstorm
{
"topic": "GraphQL vs REST for our public API",
"models": ["opus", "sonnet", "haiku"],
"mode": "hosted",
"rounds": 2,
"style": "redteam"
}输出: 工具为每个模型返回提示。宿主(Claude Code)生成使用不同模型的子代理,收集响应,并通过 brainstorm_collect 反馈。所有轮次结束后,综合模型产生 3 条要点裁决:建议、关键权衡、最强烈的分歧。
错误处理: 会话在 10 分钟后过期。如果找不到会话,会返回清晰的错误消息,并附有启动新会话的说明。
工作原理
API / CLI 模式
你要求 Claude 对一个主题进行头脑风暴
工具将主题并行发送给所有配置的提供者——API 提供者使用 HTTP,CLI 提供者使用生成的子进程
Claude 阅读它们的响应,并贡献自己的视角
模型看到彼此的响应,并在多轮中完善
综合器产生最终裁决
托管模式
你要求 Claude 使用特定模型(例如 opus、sonnet、haiku)进行头脑风暴
工具返回提示——不进行任何 API 调用
Claude 生成使用不同模型的子代理来执行提示
收集响应并反馈给下一轮
重复直到综合
隐私政策
brainstorm-mcp 完全在你的机器上运行,不收集、存储或传输任何个人数据、遥测或分析。
在 API 模式下,提示直接从你的机器发送到你配置的模型提供者(OpenAI、Gemini、DeepSeek 等),使用你自己的 API 密钥。在 CLI 模式下,提示传递给你机器上安装的代理 CLI,它们在你现有的订阅下与各自的供应商通信。在 托管模式下,不进行任何外部 API 调用。
辩论会话仅存储在内存中,TTL 为 10 分钟。除非你明确保存结果,否则不会向磁盘写入任何数据。
完整隐私政策:PRIVACY.md
支持
开发
git clone https://github.com/spranab/brainstorm-mcp.git
cd brainstorm-mcp
npm install
npm run build
npm start相关项目
同一作者的其他代理基础设施,设计为一起使用:
saga-mcp — 基于 SQLite 的项目追踪器:一旦讨论尘埃落定,决策就会存入持久化存储。
yantrikdb-mcp — 持久化认知记忆,让代理记住你做了什么决定以及为什么。
swarmcode — 不同机器上 Claude Code 实例之间的实时通道。
truenas-mcp — 278 个 TrueNAS SCALE 操作,统一封装在一个分层工具中。
mcpier — 自托管的 MCP 控制平面,让 API 密钥远离你的客户端。
许可证
MIT
Available Tools
7 toolsadd_providerA
Add a new AI provider for brainstorming. Supports any OpenAI-compatible API, or a locally installed agent CLI (kind='cli') that runs on an existing subscription instead of API credits.
Inputs: name (required), defaultModel (required), args, kind, +6 more.
brainstormARead-only
Run a multi-round brainstorming debate between multiple AI models. IMPORTANT: Before calling this tool, you MUST ask the user to choose a mode:
API mode — Calls configured providers. These are either HTTP APIs billed per token (OpenAI, Gemini, DeepSeek, ...) or locally installed agent CLIs such as 'claude' and 'codex', which run on the user's existing subscription at no API cost. Call list_providers to see which of each are available.
Hosted mode — No API keys needed. You execute prompts using sub-agents with models available in your environment (opus/sonnet/haiku, GPT, Gemini, etc.). Same model can be used multiple times — each run produces different perspectives.
Present these two options to the user with a one-liner explanation, then proceed based on their choice.
For API mode: set mode='api'. When participate=true (default), YOU also participate as a debater alongside external models via brainstorm_respond. For Hosted mode: set mode='hosted'. Ask the user which models to use, then spawn sub-agents for each model, collect responses, and call brainstorm_collect.
Inputs: topic (required), mode, style, models, +5 more.
brainstorm_collectARead-only
Submit collected model responses for a hosted brainstorm session. After receiving prompts from brainstorm (mode='hosted') or a previous brainstorm_collect call, execute each prompt by spawning a sub-agent for EACH model (use the model parameter to select the right model, e.g., model='sonnet' or model='haiku'). Collect all responses and submit them here. This tool returns either: (1) the next round's prompt to execute, (2) a synthesis prompt for a single model, or (3) the final formatted debate result when complete.
Inputs: responses (required), session_id (required).
brainstorm_quickARead-only
Get instant multi-model perspectives on any question — no debate rounds, no synthesis delay. Fires all models in parallel and returns a compact comparison. Under 10 seconds. Use this for quick second opinions, snap decisions, or when you want diverse perspectives fast. For deeper analysis with multiple rounds and synthesis, use the brainstorm tool instead.
Inputs: topic (required), style, models, context.
brainstorm_respondARead-only
Submit YOUR (Claude's) response for the current round of an interactive brainstorm session. After the brainstorm tool returns external models' responses, call this tool with your substantive contribution. Read all responses carefully and engage with specific points — agree, disagree, build upon, or challenge ideas. Do not just summarize. After your response, the next round runs automatically (or synthesis if final round).
Inputs: response (required), session_id (required).
brainstorm_reviewARead-only
Multi-model code review. Pass a diff and get structured findings with severity, file/line references, and a verdict (approve / approve with warnings / needs changes). Multiple models review independently, then findings are synthesized and deduplicated. Use this for PR reviews, code audits, or pre-commit checks.
Inputs: diff (required), focus, title, models, +2 more.
list_providersARead-only
List all configured AI providers and their default models for brainstorming. Includes locally installed agent CLIs (claude, codex, ...) which run on an existing subscription instead of metered API credits.
Inputs: no named parameters.
Tool Schema Changelog
Recent tool additions, removals, and schema changes observed during successful MCP inspections.
Loading tool schema changelog…
TDQS
Scored across 7 tools
Each tool has a clearly distinct role: the main brainstorm tool handles debate setup, with dedicated helpers for API (brainstorm_respond) and hosted (brainstorm_collect) modes. Brainstorm_quick is a fast parallel mode, brainstorm_review is code-specific, and list/add_provider manage providers. No overlapping purposes.
All tools follow a consistent snake_case verb_noun pattern. Core brainstorming actions are prefixed with 'brainstorm_', while provider management uses list_providers and add_provider. Naming is predictable and clear.
Seven tools is well-scoped for a brainstorming server. It covers the core debate workflow (main, respond, collect), a quick alternative, a specialized code review mode, and provider management, without unnecessary bloat or missing essentials.
The surface covers the full brainstorming workflow—multi-round debate, quick requests, code review, and provider setup. Minor gaps exist in provider management (no update/delete) and no explicit session management, but these are non-critical and easily worked around.
Maintenance
Related MCP Connectors
Multi-model AI debates: GPT-4o, Claude, Gemini & 200+ models discuss, then synthesize insight.
Convene a panel of expert AI personas to debate any decision from every side.
Join a lab where AI agents from different people debate in turns and refute each other.
Five AI models debate your decision blind, then give one recommendation and the strongest objection.
Related MCP Servers
- FlicenseNot gradedqualityNot gradedmaintenanceOrchestrates multiple AI models (Gemini, OpenAI, Claude, local models) within a single conversation context, enabling collaborative workflows like multi-model code reviews, consensus building, and CLI-to-CLI bridging for specialized tasks.-
- AlicenseNot gradedqualityNot gradedmaintenanceEnables Claude to orchestrate multi-model AI roundtable discussions between GPT-4o, Gemini, Grok, and DeepSeek through independent responses and cross-critique rounds. It supports various discussion presets such as debate, brainstorm, and consensus to facilitate diverse perspectives and synthesis.MIT
- AlicenseNot gradedqualityDmaintenanceEnables AI assistants to facilitate structured multi-model debates that synthesize multiple perspectives into clear categories like ground truths and blind spots. It provides tools for running real-time debates, checking model health, and managing history via the Model Context Protocol.40 npm1MIT
- AlicenseAqualityDmaintenanceFacilitates structured multi-agent debates with arguments, rebuttals, and judgments across multiple rounds, enabling diverse AI personas to engage in formal debate and collaborative problem-solving.137 npm17MIT