compare-mcp
compare-mcp
在 Claude Code CLI 中进行带有待办事项排名和子代理派遣的多模型代码审查。
Claude Code 非常擅长代码审查,但它只能与一个模型对话。Copilot CLI 最近推出了多模型调试功能,允许一次性向 GPT、Claude 和 Gemini 抛出问题。Claude Code 原生不支持此功能。此 MCP 服务器添加了该功能:使用您自己的 API 密钥,分发到任意模型组合,并获取它们各自发现的差异化、排名列表。
将任何错误或任务同时分发给多个 LLM,对比它们的独特见解,可选运行模型互相批评的辩论环节,然后派遣并行子代理来实施综合后的最佳修复方案——每个修复方案都有其对应的 git 提交。
演示
https://github.com/user-attachments/assets/8990dabb-bc61-4625-8930-c914cffe75da
/compare models→/compare review config.py for security issues→/compare --debate→/compare status
Related MCP server: Debate Agent MCP
架构
安装
pip install compare-mcp
claude mcp add -s user compare-mcp -- python -m compare_mcp然后获取 /compare 技能和示例配置:
git clone https://github.com/carolinacherry/compare-mcp.git --depth 1
mkdir -p ~/.claude/skills ~/.compare
cp -r compare-mcp/.claude/skills/compare ~/.claude/skills/
cp compare-mcp/.compare/config.example.json ~/.compare/config.json快速开始
编辑
~/.compare/config.json— 通过设置"enabled": true并添加您的 API 密钥(作为$ENV_VAR引用或直接粘贴密钥)来启用至少 2 个提供商。在 Claude Code 中:
/compare memory leak in the tile rendering loop /compare race condition in the connection pool --debate --providers claude,openai /compare status /compare models
配置参考
配置位于 ~/.compare/config.json。API 密钥使用 $ENV_VAR 语法 — 在加载时展开。
提供商类型
类型 | SDK | 用途 |
| anthropic-python | 直接使用 Claude 模型 |
| openai-python (带自定义 | OpenAI、Kimi、Minimax、Gemini、Ollama API 或任何兼容端点 |
| subprocess stdin/stdout | Ollama CLI、Codex CLI 或任何二进制文件 |
比较设置
键 | 默认值 | 描述 |
| 2048 | 每个提供商响应的最大 token 数 |
| 120 | 每个提供商的超时时间(见下文说明) |
|
| SQLite 待办事项存储位置 |
| 0.65 | 模糊匹配阈值 (0-1)。越高越严格 |
| 1000 | 在发送超过此行数的文件前发出警告 |
超时说明: 某些模型(例如 Kimi 的 kimi-k2.5)在处理大型提示词时比 GPT-4o 慢得多,在 60 秒时会超时。我们默认设置为 120 秒。如果某个提供商持续超时,请尝试更快的模型变体 — 对于 Kimi,moonshot-v1-auto 比 kimi-k2.5 更快,并会自动选择正确的上下文窗口。
添加提供商
任何 OpenAI 兼容端点
{
"my_provider": {
"enabled": true,
"type": "openai_compat",
"api_key": "$MY_API_KEY",
"model": "model-name",
"base_url": "https://api.example.com/v1"
}
}适用于:OpenAI、Kimi (api.moonshot.ai)、Minimax (api.minimax.io)、Gemini (generativelanguage.googleapis.com/v1beta/openai/)、Ollama API (localhost:11434/v1)、OpenRouter、Together AI、Groq 等。
CLI 子进程模型
{
"ollama_local": {
"enabled": true,
"type": "cli",
"cli_command": "ollama",
"cli_args": ["run", "codellama"],
"cli_parser": "text"
}
}cli_parser 选项:"text" (原始 stdout)、"json" (解析为 JSON)、"jsonl" (最后一行完整的 JSON)。
命令
在 Claude Code 中,输入以下任一命令:
命令 | 功能 |
| 分发给所有已启用的模型,对比发现,保存排名后的待办事项 |
| 同上,外加一个模型互相批评的辩论环节 |
| 仅比较特定提供商 |
| 显示已配置的提供商及其状态 |
| 显示按状态分组的所有待办事项 (pending/in_progress/done) |
| 更改待办事项的状态 |
在 /compare 运行后,系统会询问是否派遣子代理并行修复发现的问题。每个子代理负责一个待办事项,实施修复并提交。
工作原理
分发 —
compare_run通过asyncio.gather将代码和问题分发给所有已启用的提供商。超时或出错的提供商会被排除,不会导致整个运行崩溃。对比 —
compare_diff使用 rapidfuzz (token sort ratio) 对跨提供商的发现进行去重。被 2 个以上提供商发现的问题为“共享”;其余为“独特”。一致性比率 = 共享 / 总独特组。辩论 (可选) —
compare_debate将每个提供商的发现发送给其他所有提供商进行批评。综合调用会合并结果。限制为最多 4 个提供商以限制 API 调用 (N*(N-1)+1)。待办事项 —
compare_todos将排名后的发现写入 SQLite。按严重程度优先,然后按提供商数量排序。执行 —
/compare技能派遣并行的 Claude Code 子代理,每个待办事项一个。每个子代理实施修复并提交。
MCP 工具 (7)
工具 | 描述 |
| 列出已配置的提供商(不暴露 API 密钥) |
| 并行分发代码审查给提供商 |
| 使用模糊去重提取独特与共享的见解 |
| 模型互相批评,然后进行综合 |
| 将排名后的发现写入 SQLite |
| 读取按状态分组的待办事项 |
| 更新待办事项的状态 |
与 multi_mcp 的对比
multi_mcp 在并行分发方面做得很好。compare-mcp 在其之上构建了工作流层:
功能 | multi_mcp | compare-mcp |
并行分发 | 是 | 是 |
OpenAI 兼容提供商 | 是 | 是 |
CLI 子进程模型 | 是 | 是 |
辩论 / 批评环节 | 原始 | 结构化 + 合并输出 |
见解对比 (独特 vs 共享) | 否 | rapidfuzz 去重 |
一致性比率指标 | 否 | 是 |
SQLite 排名待办事项存储 | 否 | 是 |
每个待办事项的子代理派遣 | 否 | 是 |
每个修复的 Git 提交 | 否 | 是 |
CC 技能 + /compare | 否 | 是 |
pip 安装 | 否 (git clone + make) | 是 |
与 Copilot CLI 多模型对比
Copilot CLI 通过 GitHub 的 API 代理路由 — 不支持自带密钥 (BYO),不支持 Kimi/Minimax/本地模型。compare-mcp 直接调用提供商 API:拥有完整的上下文窗口、您自己的速率限制,以及任何带有 HTTP 端点或 CLI 二进制文件的模型。
开发
git clone https://github.com/carolinacherry/compare-mcp.git
cd compare-mcp
pip install -e ".[dev]"
pytest
ruff check .Maintenance
Resources
Unclaimed servers have limited discoverability.
Looking for Admin?
If you are the server author, to access and configure the admin panel.
Related MCP Servers
- Flicense-quality-maintenanceOrchestrates 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.
- Flicense-qualityDmaintenanceEnables multi-agent code review with P0/P1/P2 severity scoring by orchestrating locally installed AI CLIs (Claude, Codex) to perform parallel analysis, deterministic scoring, and consensus-building on git diffs.2

@storybloq/lensesofficial
Alicense-qualityBmaintenanceEnables multi-lens code review by running 8 specialized reviewers in parallel, deduplicating findings, and producing a single verdict.6116PolyForm Noncommercial 1.0.0- Alicense-qualityAmaintenanceMulti-model AI code review with structured debate. OpenAI, Gemini, Grok, and Claude review your code in parallel, then an anonymized arbitration produces a single consensus summary.MIT
Related MCP Connectors
Agentic code review, no signup to try: reality gates + frontier-model review, with veto.
AI code review for GitHub PRs with an MCP autofix loop for Claude Code and Cursor
Cross-agent artifact workspace with provenance across Claude Code, Codex, Cursor, LangGraph.
Latest Blog Posts
- Who's Calling? MCP Hosts Are an Identity Blind Spot (And the Spec Knows It)By Om-Shree-0709 on .mcpAgent IdentityOAuth 2.1
- Your AI Chatbot Just Exposed Your CEO's Salary to an InternBy Om-Shree-0709 on .Agent IdentityMCP SecurityOAuth Delegation
- Why MCP Servers Need Execution Sandboxing (And Why Your Current Stack Isn't Enough)By Om-Shree-0709 on .Agentic AiPrompt InjectionWebAssembly
MCP directory API
We provide all the information about MCP servers via our MCP API.
curl -X GET 'https://glama.ai/api/mcp/v1/servers/Cristophereasygoing927/compare-mcp'
If you have feedback or need assistance with the MCP directory API, please join our Discord server