article
README
🚀 使用“思考”工具的MCP服务器
本项目是官方实现Anthropic的“think”工具的MCP服务器,通过结构化思考显著提升Claude的推理能力。
🚀 快速开始
快速安装
用于Claude Desktop
npx -y @smithery/cli@latest install @PhillipRt/think-mcp-server --client claude --config "{}"
用于Cursor
npx -y @smithery/cli@latest install @PhillipRt/think-mcp-server --client cursor --config "{}"
手动安装
如果您更愿意本地运行服务器,可按以下步骤操作:
-
克隆仓库:
git clone https://github.com/PhillipRt/think-mcp-server.git cd think-mcp-server -
安装依赖项:
npm install -
构建并运行:
npm run build npm start -
手动配置Claude Desktop:
- 找到或创建配置文件:
- macOS:
~/Library/Application Support/Claude/claude_desktop_config.json - Windows:
%APPDATA%\Claude\claude_desktop_config.json
- macOS:
- 添加您的服务器配置:
{ "mcpServers": { "think-tool": { "command": "node", "args": ["path/to/think-mcp-server/dist/server.js"] } } } - 找到或创建配置文件:
✨ 主要特性
什么是“思考”工具?
此MCP服务器实现了Anthropic在工程博客文章中引入的“think”工具。该工具为Claude提供了一个专用空间,用于执行结构化推理,在解决复杂问题时提高表现。
已验证的性能提升
Anthropic的研究展示了使用“思考”工具的显著改进:
- 54%的提升:在复杂的客户支持任务中。
- 明显更好的遵循:详细政策和指南。
- 增强的一致性:多次试验相同的任务。
- 改善的表现:软件工程基准测试。
- 最小的实现开销:与其他增强技术相比。
“思考”工具在其他方法表现不佳的情况下表现出色:
- 优于扩展思考:对于需要复杂工具链的情况。
- 比基线提示更有效:对于政策繁重的场景。
- 特别强大:当与优化提示配对时。
🔧 技术细节
工作原理
“思考”工具实现了Anthropic工程博客中描述的相同功能。此服务器通过WebSocket协议运行,Claude可以通过发送JSON格式的消息与其交互。
消息结构
所有消息都必须是有效的JSON对象,并包含command字段指定操作类型。
示例请求
{
"command": "think",
"prompt": "如何优化我的网站的性能?"
}
示例响应
{
"command": "think",
"id": 1,
"result": {
"step-by-step": ["分析当前网站架构", "识别瓶颈", "建议优化措施"]
}
}
📄 许可证
本项目采用MIT License。
微信扫一扫