检索增强型思考MCP服务器 - 一个处理结构化思维并具有度量、分支和修订功能的推理工具。
git clone https://github.com/stat-guy/retrieval-augmented-thinking.git
cd retrieval-augmented-thinking
npm install -g .
测试安装是否成功:
npx mcp-server-rat-node --help
成功指示器: 如果您看到 RAT MCP Server (Node.js) running on stdio,则您的安装已完成!
添加到您的Claude Desktop配置文件中:
macOS: ~/Library/Application Support/Claude/claude_desktop_config.json
Windows: %APPDATA%/Claude/claude_desktop_config.json
{
"mcpServers": {
"retrieval-augmented-thinking": {
"command": "npx",
"args": ["mcp-server-rat-node"]
}
}
}
添加配置后,请重启Claude Desktop以加载RAT服务器。
该服务器提供了一个用于处理结构化思维的单一rat工具:
// 基本用法
{
"thought": "我需要逐步分析这个问题...",
"nextThoughtNeeded": true,
"thoughtNumber": 1,
"totalThoughts": 3
}
// 包含修订
{
"thought": "让我重新考虑之前的分析...",
"nextThoughtNeeded": false,
"thoughtNumber": 2,
"totalThoughts": 3,
"isRevision": true,
"revisesThought": 1
}
// 包含分支
{
"thought": "替代方法:如果我们考虑一下...",
"nextThoughtNeeded": true,
"thoughtNumber": 2,
"totalThoughts": 4,
"branchFromThought": 1,
"branchId": "alt-path-1"
}
thought (字符串):要处理的思想内容nextThoughtNeeded (布尔值):是否需要另一个思想来继续thoughtNumber (整数):序列中的当前思想编号totalThoughts (整数):预期的总思想数量(可调整)isRevision (布尔值):这是否修订了之前的思想revisesThought (整数):正在修订的思想编号branchFromThought (整数):分支的思想编号branchId (字符串):此分支的唯一标识符needsMoreThoughts (布尔值):如果需要,可以超过totalThoughts{
"thought_number": 1,
"total_thoughts": 3,
"metrics": {
"complexity": 0.342,
"depth": 0.521,
"quality": 0.643,
"impact": 0.289,
"confidence": 0.758
},
"analytics": {
"total_thoughts": 5,
"average_quality": 0.612,
"chain_effectiveness": 0.145
},
"next_thought_needed": true,
"visual_output": "┌─ 💭 思想 1/3 ─────────────────┐\\n│ 分析显示清晰模式... │\\n├─ 指标 ──────────────────────┤\\n│ 质量: 0.64 | 影响: 0.29... │\\n└─────────────────────────────────┘"
}
安装过程包括自动权限修复。如果您遇到问题:
npm install -g git+https://github.com/stat-guy/retrieval-augmented-thinking.git
chmod +x $(npm bin -g)/mcp-server-rat-node
在配置Claude Desktop之前,请始终验证:
npx mcp-server-rat-node --help
如果这显示 "RAT MCP Server (Node.js) running on stdio",则您可以配置Claude Desktop。
运行测试套件:
npm test
测试工具执行:
node test-tool.js
此MCP服务器根据MIT许可证发布。这意味着您可以自由地使用、修改和分发软件,但须遵守MIT许可证的条款和条件。如需更多详情,请参阅项目存储库中的LICENSE文件。