返回市场
多模型交叉验证MCP服务器

多模型交叉验证MCP服务器

作者:lior-ps13 星标更新:2025-05-22

项目介绍

MseeP.ai 安全评估徽章

多LLM交叉验证MCP服务器

smithery 徽章 这是一个模型控制协议(MCP)服务器,允许同时交叉验证来自多个LLM提供商的响应。此服务器与Claude Desktop集成作为MCP服务器,提供统一的接口来查询不同的LLM API。

功能

  • 并行查询多个LLM提供商
  • 目前支持:
    • OpenAI(ChatGPT)
    • Anthropic(Claude)
    • Perplexity AI
    • Google(Gemini)
  • 异步并行处理以加快响应速度
  • 与Claude Desktop轻松集成

预备条件

  • Python 3.8或更高版本
  • 您想要使用的LLM提供商的API密钥
  • uv包管理器(通过pip install uv安装)

安装

通过Smithery安装

要通过Smithery自动安装Multi LLM Cross-Check Server用于Claude Desktop:

npx -y @smithery/cli install @lior-ps/multi-llm-cross-check-mcp-server --client claude

手动安装

  1. 克隆此仓库:
git clone https://github.com/lior-ps/multi-llm-cross-check-mcp-server.git
cd multi-llm-cross-check-mcp-server
  1. 初始化uv环境并安装需求:
uv venv
uv pip install -r requirements.txt
  1. 在Claude Desktop中配置: 在您的Claude Desktop配置目录中创建一个名为claude_desktop_config.json的文件,内容如下:

    {
      "mcp_servers": [
        {
          "command": "uv",
          "args": [
            "--directory",
            "/multi-llm-cross-check-mcp-server",
            "run",
            "main.py"
          ],
          "env": {
            "OPENAI_API_KEY": "your_openai_key",  // 从https://platform.openai.com/api-keys获取
            "ANTHROPIC_API_KEY": "your_anthropic_key",  // 从https://console.anthropic.com/account/keys获取
            "PERPLEXITY_API_KEY": "your_perplexity_key",  // 从https://www.perplexity.ai/settings/api获取
            "GEMINI_API_KEY": "your_gemini_key"  // 从https://makersuite.google.com/app/apikey获取
          }
        }
      ]
    }
    

    注意事项:

    1. 您只需添加您想要使用的LLM提供商的API密钥。服务器会跳过未配置API密钥的提供商。
    2. 您可能需要在命令字段中放置uv可执行文件的完整路径。您可以通过在MacOS/Linux上运行which uv或在Windows上运行where uv来获取它。

使用MCP服务器

一旦配置完成:

  1. 当您打开Claude Desktop时,服务器将自动启动
  2. 您可以在对话中使用cross_check工具,请求“与其他LLM交叉检查”
  3. 提供提示,它将返回所有已配置LLM提供商的响应

API响应格式

服务器返回一个字典,其中包含每个LLM提供商的响应:

{
    "ChatGPT": { ... },
    "Claude": { ... },
    "Perplexity": { ... },
    "Gemini": { ... }
}

错误处理

  • 如果未提供特定LLM的API密钥,则该提供商将被跳过
  • API错误被捕获并在响应中返回
  • 每个LLM的响应是独立的,因此一个提供商的错误不会影响其他提供商

已在MseeP验证

贡献

欢迎贡献!请随时提交Pull Request。

许可证

本项目采用MIT许可证 - 详情见LICENSE文件。