Multi-Model Advisor

by YuChenSSR
Verified

local-only server

The server can only run on the client’s local machine because it depends on local resources.

Integrations

  • Uses .ENV files for configuration, allowing customization of server settings, Ollama configuration, and system prompts for each model.

  • Includes support for Mermaid diagrams to visualize the workflow of how multiple AI models contribute to the advisory system.

  • Runs as a Node.js application with the server exposing tools for listing available models and querying multiple models simultaneously.

多模型顾问

(锵锵四人行)

模型上下文协议 (MCP) 服务器可查询多个 Ollama 模型并整合它们的响应,从而针对单个问题提供不同的 AI 视角。这创建了一种“顾问委员会”模式,Claude 可以将多种观点与自身观点相结合,从而提供更全面的答案。

特征

  • 通过一个问题查询多个 Ollama 模型
  • 为每个模型分配不同的角色/人物
  • 查看系统上所有可用的 Ollama 型号
  • 为每个模型定制系统提示
  • 通过环境变量配置
  • 与 Claude for Desktop 无缝集成

先决条件

  • Node.js 16.x 或更高版本
  • Ollama 已安装并正在运行(请参阅Ollama 安装
  • Claude 桌面版(提供完整的咨询体验)

安装

通过 Smithery 安装

要通过Smithery自动为 Claude Desktop 安装 multi-ai-advisor-mcp:

npx -y @smithery/cli install @YuChenSSR/multi-ai-advisor-mcp --client claude

手动安装

  1. 克隆此存储库:
    git clone https://github.com/YuChenSSR/multi-ai-advisor-mcp.git cd multi-ai-advisor-mcp
  2. 安装依赖项:
    npm install
  3. 构建项目:
    npm run build
  4. 安装所需的 Ollama 模型:
    ollama pull gemma3:1b ollama pull llama3.2:1b ollama pull deepseek-r1:1.5b

配置

使用您所需的配置在项目根目录中创建一个.env文件:

# Server configuration SERVER_NAME=multi-model-advisor SERVER_VERSION=1.0.0 DEBUG=true # Ollama configuration OLLAMA_API_URL=http://localhost:11434 DEFAULT_MODELS=gemma3:1b,llama3.2:1b,deepseek-r1:1.5b # System prompts for each model GEMMA_SYSTEM_PROMPT=You are a creative and innovative AI assistant. Think outside the box and offer novel perspectives. LLAMA_SYSTEM_PROMPT=You are a supportive and empathetic AI assistant focused on human well-being. Provide considerate and balanced advice. DEEPSEEK_SYSTEM_PROMPT=You are a logical and analytical AI assistant. Think step-by-step and explain your reasoning clearly.

连接到 Claude 桌面版

  1. 找到您的 Claude for Desktop 配置文件:
    • MacOS: ~/Library/Application Support/Claude/claude_desktop_config.json
    • Windows: %APPDATA%\Claude\claude_desktop_config.json
  2. 编辑文件以添加多模型顾问 MCP 服务器:
{ "mcpServers": { "multi-model-advisor": { "command": "node", "args": ["/absolute/path/to/multi-ai-advisor-mcp/build/index.js"] } } }
  1. /absolute/path/to/替换为项目目录的实际路径
  2. 重启 Claude 桌面版

用法

连接到 Claude for Desktop 后,您可以通过多种方式使用多模型顾问:

列出可用模型

您可以看到系统上所有可用的模型:

Show me which Ollama models are available on my system

这将显示所有已安装的 Ollama 模型并指示哪些模型配置为默认模型。

基本用法

只需要求 Claude 使用多模型顾问:

what are the most important skills for success in today's job market, you can use gemma3:1b, llama3.2:1b, deepseek-r1:1.5b to help you

Claude 将查询所有默认模型并根据它们的不同观点提供综合响应。

工作原理

  1. MCP 服务器公开了两个工具:
    • list-available-models :显示系统上的所有 Ollama 模型
    • query-models :使用问题查询多个模型
  2. 当你向克劳德询问有关多模型顾问的问题时:
    • Claude 决定使用query-models工具
    • 服务器将您的问题发送给多个 Ollama 模型
    • 每个模型都以其视角做出回应
    • 克劳德收到所有回复并综合出一个全面的答案
  3. 每个模型可以分配不同的“角色”或作用,以鼓励不同的观点。

故障排除

Ollama连接问题

如果服务器无法连接到 Ollama:

  • 确保 Ollama 正在运行( ollama serve
  • 检查 .env 文件中的 OLLAMA_API_URL 是否正确
  • 尝试在浏览器中访问http://localhost:11434来验证 Ollama 是否响应

未找到模型

如果报告某个模型不可用:

  • 检查您是否已使用ollama pull <model-name>拉取模型
  • 使用ollama list验证确切的模型名称
  • 使用list-available-models工具查看所有可用模型

Claude 未显示 MCP 工具

如果 Claude 中没有出现这些工具:

  • 确保在更新配置后重新启动 Claude
  • 检查claude_desktop_config.json中的绝对路径是否正确
  • 查看 Claude 的日志中的错误消息

RAM 不够

部分经理的 AI 模型可能选择了较大的模型,但内存不足。您可以尝试指定较小的模型(参见基本使用方法)或升级内存。

执照

MIT 许可证

有关详细信息,请参阅此项目存储库中的 LICENSE 文件

贡献

欢迎贡献代码!欢迎提交 Pull 请求。

You must be authenticated.

A
security – no known vulnerabilities
A
license - permissive license
A
quality - confirmed to work

MCP 服务器查询多个 Ollama 模型并组合它们的响应,为单个问题提供不同的 AI 视角以获得更全面的答案。

  1. (锵锵四人行)
    1. Features
      1. Prerequisites
        1. Installation
          1. Installing via Smithery
          2. Manual Installation
        2. Configuration
          1. Connect to Claude for Desktop
            1. Usage
              1. List Available Models
              2. Basic Usage
            2. How It Works
              1. Troubleshooting
                1. Ollama Connection Issues
                2. Model Not Found
                3. Claude Not Showing MCP Tools
                4. RAM is not enough
              2. License
                1. Contributing
                  ID: cb1a1fcmqf