Multi-MCP

io.github.religa由 GitHub 账号 religa 发布v0.1.1更新于 Oct 24, 2026

Multi-model AI orchestration MCP server with code review, compare, and debate tools.

已验证STDIO仅桌面开发者工具AI 与机器学习

概览

AI 生成的概览

本地 MCP 服务器,在 Claude Code 或 OpenCode 中调度多个 AI 模型进行代码审查、多模型对比、辩论和对话。

可以做什么
执行系统化代码审查,包含 OWASP Top 10 安全与性能检查,可指定使用的模型。并行向多个模型提出同一问题并对比回答。运行辩论流程,各模型先独立作答再互相点评。结合仓库上下文与模型对话,并在多步之间保持线程。列出可用模型及其别名。
适用场景
适合希望在代码质量、安全或架构决策上获得多个模型意见、又不想在多个厂商工具间切换的人;也适合已在 Claude Code 或 OpenCode 中工作、需要按需获得多模型共识的场景。
运行要求
以本地 Python 进程运行(需 Python 3.11+),从 PyPI 或源码安装并在 MCP 客户端中配置。至少需要一个厂商 API 密钥:OPENAI_API_KEY、ANTHROPIC_API_KEY、GEMINI_API_KEY 或 OPENROUTER_API_KEY,通过环境变量或 .env 文件设置。可选 DEFAULT_MODEL 与 DEFAULT_MODEL_LIST。CLI 模型需另行安装对应命令行工具。
安装前请注意
会把代码和提示发送给你所配置密钥对应的 AI 厂商,审查内容会离开本机。API 调用由厂商计费。CLI 模型可能拥有完整工具权限,包括文件操作和 shell 命令,应谨慎选择。随附的命令行工具标注为实验性。

安装

在 SourceWeft 中

  1. 打开 控制台中的 Multi-MCP,将其添加到工作区。
  2. 为需要使用其工具的对话启用该服务。

Desktop only,通过 STDIO。 STDIO 服务会启动本地进程,因此需要 SourceWeft 桌面宿主。

其他 MCP 客户端

参照 仓库 中的启动说明。

README

Multi-MCP: Multi-Model Code Review and Analysis MCP Server for Claude Code

[CI] [PyPI] [Downloads] [License: MIT] [Python 3.11+] [GitHub stars]

A multi-model AI orchestration MCP server for automated code review and LLM-powered analysis. Multi-MCP integrates with Claude Code CLI and OpenCode to orchestrate multiple AI models (OpenAI GPT, Anthropic Claude, Google Gemini) for code quality checks, security analysis (OWASP Top 10), and multi-agent consensus. Built on the Model Context Protocol (MCP), this tool enables Python developers and DevOps teams to automate code reviews with AI-powered insights directly in their development workflow.

[Demo Video]

Features

  • 🔍 Code Review - Systematic workflow with OWASP Top 10 security checks and performance analysis
  • 💬 Chat - Interactive development assistance with repository context awareness
  • 🔄 Compare - Parallel multi-model analysis for architectural decisions
  • 🎭 Debate - Multi-agent consensus workflow (independent answers + critique)
  • 🤖 Multi-Model Support - OpenAI GPT, Anthropic Claude, Google Gemini, and OpenRouter
  • 🖥️ CLI & API Models - Mix CLI-based (Gemini CLI, Codex CLI) and API models
  • 🏷️ Model Aliases - Use short names like mini, sonnet, gemini
  • 🧵 Threading - Maintain context across multi-step reviews

How It Works

Multi-MCP acts as an MCP server that Claude Code or OpenCode connects to, providing AI-powered code analysis tools:

  1. Install the MCP server and configure your AI model API keys
  2. Integrate with Claude Code or OpenCode automatically via make install
  3. Invoke tools using natural language (e.g., "multi codereview this file")
  4. Get Results from multiple AI models orchestrated in parallel

Performance

Fast Multi-Model Analysis:

  • ⚡ Parallel Execution - 3 models in ~10s (vs ~30s sequential)
  • 🔄 Async Architecture - Non-blocking Python asyncio
  • 💾 Conversation Threading - Maintains context across multi-step reviews
  • 📊 Low Latency - Response time = slowest model, not sum of all models

Quick Start

Prerequisites:

  • Python 3.11+
  • API key for at least one provider (OpenAI, Anthropic, Google, or OpenRouter)

Installation

Option 1: From Source
bash
# Clone and installgit clone https://github.com/religa/multi_mcp.gitcd multi_mcp# Execute ./scripts/install.shmake install
# The installer will:# 1. Install dependencies (uv sync)# 2. Generate your .env file# 3. Automatically add to Claude Code / OpenCode config (requires jq)# 4. Test the installation
Option 2: Manual Configuration

If you prefer not to run make install:

bash
# Install dependenciesuv sync
# Copy and configure .envcp .env.example .env# Edit .env with your API keys

Add to Claude Code (~/.claude.json) or OpenCode (~/.opencode/opencode.json), replacing /path/to/multi_mcp with your actual clone path:

Claude Code:

json
{  "mcpServers": {    "multi": {      "type": "stdio",      "command": "/path/to/multi_mcp/.venv/bin/python",      "args": ["-m", "multi_mcp.server"]    }  }}

OpenCode:

json
{  "mcp": {    "multi": {      "type": "local",      "command": ["/path/to/multi_mcp/.venv/bin/python", "-m", "multi_mcp.server"],      "enabled": true    }  }}

Configuration

Environment Configuration (API Keys & Settings)

Multi-MCP loads settings from .env files in this order (highest priority first):

  1. Environment variables (already set in shell)
  2. Project .env (current directory or project root)
  3. User .env (~/.multi_mcp/.env) - fallback for pip installs

Edit .env with your API keys:

bash
# API Keys (configure at least one)OPENAI_API_KEY=sk-...ANTHROPIC_API_KEY=sk-ant-...GEMINI_API_KEY=...OPENROUTER_API_KEY=sk-or-...
# Azure OpenAI (optional)AZURE_API_KEY=...AZURE_API_BASE=https://your-resource.openai.azure.com/
# AWS Bedrock (optional)AWS_ACCESS_KEY_ID=...AWS_SECRET_ACCESS_KEY=...AWS_REGION_NAME=us-east-1
# Model ConfigurationDEFAULT_MODEL=gpt-5-miniDEFAULT_MODEL_LIST=gpt-5-mini,gemini-3-flash

Model Configuration (Adding Custom Models)

Models are defined in YAML configuration files (user config wins):

  1. Package defaults: multi_mcp/config/config.yaml (bundled with package)
  2. User overrides: ~/.multi_mcp/config.yaml (optional, takes precedence)

To add your own models, create ~/.multi_mcp/config.yaml (see config.yaml and config.override.example.yaml for examples):

yaml
version: "1.0"
models:  # Add a new API model  my-custom-gpt:    litellm_model: openai/gpt-4o    aliases:      - custom    notes: "My custom GPT-4o configuration"
  # Add a custom CLI model  my-local-llm:    provider: cli    cli_command: ollama    cli_args:      - "run"      - "llama3.2"    cli_parser: text    aliases:      - local    notes: "Local LLaMA via Ollama"
  # Override an existing model's settings  gpt-5-mini:    constraints:      temperature: 0.5  # Override default temperature

Merge behavior:

  • New models are added alongside package defaults
  • Existing models are merged (your settings override package defaults)
  • Aliases can be "stolen" from package models to your custom models

Usage Examples

Once installed in your MCP client (Claude Code or OpenCode), you can use these commands:

💬 Chat - Interactive development assistance:

Can you ask Multi chat what's the answer to life, universe and everything?

🔍 Code Review - Analyze code with specific models:

Can you multi codereview this module for code quality and maintainability using gemini-3 and codex?

🔄 Compare - Get multiple perspectives (uses default models):

Can you multi compare the best state management approach for this React app?

🎭 Debate - Deep analysis with critique:

Can you multi debate the best project code name for this project?

Enabling Allowlist

Edit ~/.claude/settings.json and add the following lines to permissions.allow to enable Claude Code to use Multi MCP without blocking for user permission:

json
{  "permissions": {    "allow": [      ...      "mcp__multi__chat",      "mcp__multi__codereview",      "mcp__multi__compare",      "mcp__multi__debate",      "mcp__multi__models"    ],  },  "env": {    "MCP_TIMEOUT": "300000",    "MCP_TOOL_TIMEOUT": "300000"  },}

Model Aliases

Use short aliases instead of full model names:

AliasModelProvider
minigpt-5.6-lunaOpenAI
nanogpt-5.6-lunaOpenAI
gptgpt-6-astraOpenAI
astragpt-6-astraOpenAI
solgpt-5.6-solOpenAI
terragpt-5.6-terraOpenAI
lunagpt-5.6-lunaOpenAI
codexgpt-5.3-codexOpenAI
fableclaude-fable-5-1Anthropic
opusclaude-opus-5Anthropic
sonnetclaude-sonnet-5Anthropic
haikuclaude-haiku-4.5Anthropic
geminigemini-3.1-pro-previewGoogle
gemini-3gemini-3.1-pro-previewGoogle
flashgemini-3.8-flashGoogle
flash-litegemini-3.5-flash-liteGoogle
azure-miniazure-gpt-5-miniAzure
bedrock-sonnetbedrock-claude-4-5-sonnetAWS

Run multi:models to see all available models and aliases.

CLI Models

Multi-MCP can execute CLI-based AI models (like Gemini CLI, Codex CLI, or Claude CLI) alongside API models. CLI models run as subprocesses and work seamlessly with all existing tools.

Benefits:

  • Use models with full tool access (file operations, shell commands)
  • Mix API and CLI models in compare and debate workflows
  • Leverage local CLIs without API overhead

Built-in CLI Models:

  • gemini-cli (alias: gem-cli) - Gemini CLI with auto-edit mode
  • codex-cli (alias: cx-cli) - Codex CLI with full-auto mode
  • claude-cli (alias: cl-cli) - Claude CLI with acceptEdits mode

Adding Custom CLI Models:

Add to ~/.multi_mcp/config.yaml (see Model Configuration):

yaml
version: "1.0"
models:  my-ollama:    provider: cli    cli_command: ollama    cli_args:      - "run"      - "codellama"    cli_parser: text  # "json", "jsonl", or "text"    aliases:      - ollama    notes: "Local CodeLlama via Ollama"

Prerequisites:

CLI models require the respective CLI tools to be installed:

bash
# Gemini CLInpm install -g @anthropic-ai/gemini-cli
# Codex CLInpm install -g @openai/codex
# Claude CLInpm install -g @anthropic-ai/claude-code

CLI Usage (Experimental)

Multi-MCP includes a standalone CLI for code review without needing an MCP client.

⚠️ Note: The CLI is experimental and under active development.

bash
# Review a directorymulti src/
# Review specific filesmulti src/server.py src/config.py
# Use a different modelmulti --model mini src/
# JSON output for CI/pipelinesmulti --json src/ > results.json
# Verbose loggingmulti -v src/
# Specify project root (for CLAUDE.md loading)multi --base-path /path/to/project src/

Why Multi-MCP?

FeatureMulti-MCPSingle-Model Tools
Parallel model execution✅❌
Multi-model consensus✅Varies
Model debates✅❌
CLI + API model support✅❌
OWASP security analysis✅Varies

Troubleshooting

"No API key found"

  • Add at least one API key to your .env file
  • Verify it's loaded: uv run python -c "from multi_mcp.settings import settings; print(settings.openai_api_key)"

Integration tests fail

  • Set RUN_E2E=1 environment variable
  • Verify API keys are valid and have sufficient credits

Debug mode:

bash
export LOG_LEVEL=DEBUG # INFO is defaultuv run python -m multi_mcp.server

Check logs in logs/server.log for detailed information.

FAQ

Q: Do I need all three AI providers? A: No, just one API key (OpenAI, Anthropic, or Google) is enough to get started.

Q: Does it truly run in parallel? A: Yes! When you use codereview, compare or debate tools, all models are executed concurrently using Python's asyncio.gather(). This means you get responses from multiple models in the time it takes for the slowest model to respond, not the sum of all response times.

Q: How many models can I run at the same time? A: There's no hard limit! You can run as many models as you want in parallel. In practice, 2-5 models work well for most use cases. All tools use your configured default models (typically 2-3), but you can specify any number of models you want.

Contributing

We welcome contributions! See CONTRIBUTING.md for:

  • Development setup
  • Code standards
  • Testing guidelines
  • Pull request process

Quick start:

bash
git clone https://github.com/YOUR_USERNAME/multi_mcp.gitcd multi_mcpuv sync --extra devmake check && make test

License

MIT License - see LICENSE file for details

Links

来源:README.md,提交 12dfd1d

工具

0
SourceWeft 尚未在沙箱中启动过该软件包,因此其工具未知。

版本历史

1
  1. v0.1.1最新Sep 16, 2026

评分

已满足适用检查项的 50%

该评分衡量此收录条目的完整程度,依据注册中心条目、端点与公开来源计算得出。它不是对服务器本身的评价,也不表示服务器安全或当前可用:可连通性是带日期的检查结果,评分也不包含安装量或用户评价。

  • 近 30 天内可连通25 分

    请保持端点能够响应 MCP 握手;SourceWeft 每 30 天探测一次。

  • 已声明认证方式10 分

    请在注册中心条目中声明凭据请求头,或保持端点能够响应探测,以便判定其认证方式。

  • 已列出工具15 分

    请让服务器在无凭据时响应 tools/list,或发布可在沙箱中无凭据启动的软件包。

  • 描述必需15 分
  • 图标10 分
  • 文档15 分
  • 许可证10 分