使用说明
认知轮MCP服务器
一个模型上下文协议(MCP)服务器,通过并行咨询多个最先进的语言模型并合成它们的响应,实现了人工智能推理的“群体智慧”方法。
快速开始
选项1:与npx一起使用(推荐)
# Run directly with npx (no installation needed)
npx mcp-cognition-wheel
# Or install globally
npm install -g mcp-cognition-wheel
mcp-cognition-wheel
选项2:从源代码构建
- 克隆存储库
- 安装依赖项:
pnpm install - 复制
.env.example向.env并添加您的API密钥 - 构建项目:
pnpm run build
运作原理
认知轮遵循一个三阶段的过程:
-
平行协商:同时查询三种不同的AI模型:
- 第4条作品(人物)
- 双子座-2.5-Pro(谷歌)
- O3(OpenAI)
-
匿名分析:使用代号(Alpha、Beta、Gamma)消除合成阶段的偏差
-
智能合成:随机选择一个模型作为合成器,分析所有响应并产生最终的全面答案
特性
- 并行处理:同时查询所有模型以获得更快的结果
- 减少偏差:匿名代码名可防止合成器偏向特定型号
- 网络搜索:所有型号的可选网络搜索功能
- 详细日志记录:全面的调试日志,以提高透明度和排除故障
- 稳健的错误处理:当单个模型失败时,性能会下降
安装
选项1:与npx一起使用(推荐)
# Run directly with npx (no installation needed)
npx mcp-cognition-wheel
# Or install globally
npm install -g mcp-cognition-wheel
mcp-cognition-wheel
选项2:从源代码构建
- 克隆存储库
- 安装依赖项:
pnpm install - 复制
.env.example向.env并添加您的API密钥 - 构建项目:
pnpm run build
用法
这是一个MCP服务器,旨在与兼容MCP的客户端(如Claude Desktop或其他MCP工具)一起使用。
所需的环境变量
ANTHROPIC_API_KEY:您的Anthropic API密钥GOOGLE_GENERATIVE_AI_API_KEY:您的Google AI API密钥OPENAI_API_KEY:您的OpenAI API密钥
与光标一起使用
根据以下指南 这篇dev.to文章,以下是如何与Cursor集成:
选项1:使用npx(推荐)
-
打开光标设置:
- 转到“设置”→ MCP
- 点击“添加新的MCP服务器”
-
配置服务器:
- 名字:
cognition-wheel - 命令:
npx - 参数:
["-y", "mcp-cognition-wheel"]
配置示例:
{ "cognition-wheel": { "command": "npx", "args": ["-y", "mcp-cognition-wheel"], "env": { "ANTHROPIC_API_KEY": "your_anthropic_key", "GOOGLE_GENERATIVE_AI_API_KEY": "your_google_key", "OPENAI_API_KEY": "your_openai_key" } } } - 名字:
选项2:使用本地构建
-
构建项目 (如果尚未完成):
pnpm run build -
配置服务器:
- 名字:
cognition-wheel - 命令:
node - 参数:
["/absolute/path/to/your/cognition-wheel/dist/app.js"]
配置示例:
{ "cognition-wheel": { "command": "node", "args": [ "/Users/yourname/path/to/cognition-wheel/dist/app.js" ], "env": { "ANTHROPIC_API_KEY": "your_anthropic_key", "GOOGLE_GENERATIVE_AI_API_KEY": "your_google_key", "OPENAI_API_KEY": "your_openai_key" } } } - 名字:
-
测试集成:
- 在光标中进入代理模式
- 提出一个复杂的问题,从多个人工智能角度获益
- 这
cognition_wheel工具应自动触发
工具使用
服务器提供了一个名为 cognition_wheel 具有以下参数:
context:问题的背景信息和背景question:你想回答的具体问题enable_internet_search:启用web搜索功能的布尔标志
发展
pnpm run dev:观看模式用于开发pnpm run build:构建TypeScript代码pnpm run start:使用tsx直接运行服务器
码头工人
使用Docker构建和运行:
# Build the image
docker build -t cognition-wheel .
# Run with environment variables
docker run --rm \
-e ANTHROPIC_API_KEY=your_key \
-e GOOGLE_GENERATIVE_AI_API_KEY=your_key \
-e OPENAI_API_KEY=your_key \
cognition-wheel
许可证
麻省理工学院