# 克隆仓库
git clone https://github.com/Lutra23/mcp-assistant-server.git
# 进入项目目录
cd mcp-assistant-server
# 安装依赖
npm install
cp mcp-config.json.example mcp-config.json
mcp-config.json
配置,现在只支持硅基流动api调用:{
"port": 3000,
"logLevel": "info",
"llm": {
"apiKey": "your-api-key"
}
}
# 开发模式
npm run dev
# 生产模式
npm run build
npm start
# Linux/WSL
~/.vscode-server/data/User/globalStorage/rooveterinaryinc.roo-cline/settings/cline_mcp_settings.json
# macOS
~/Library/Application Support/Code/User/globalStorage/rooveterinaryinc.roo-cline/settings/cline_mcp_settings.json
# Windows
%APPDATA%\Code\User\globalStorage\rooveterinaryinc.roo-cline\settings\cline_mcp_settings.json
{
"mcpServers": {
"assistant": {
"command": "node",
"args": ["/path/to/mcp-assistant-server/build/index.js"],
"env": {
"PORT": "3000",
"LOG_LEVEL": "info"
}
}
}
}
在 Cline 中,你可以使用以下工具:
// 分析任务
<use_mcp_tool>
<server_name>assistant</server_name>
<tool_name>analyze_task</tool_name>
<arguments>
{
"description": "获取天气信息并保存到文件",
"context": {
"location": "上海",
"format": "json"
}
}
</arguments>
</use_mcp_tool>
// 推荐工具
<use_mcp_tool>
<server_name>assistant</server_name>
<tool_name>recommend_tools</tool_name>
<arguments>
{
"taskId": "task-123",
"useHybridRecommendation": true
}
</arguments>
</use_mcp_tool>
# Linux
~/.cursor/cursor_config.json
# macOS
~/Library/Application Support/Cursor/cursor_config.json
# Windows
%APPDATA%\Cursor\cursor_config.json
{
"mcpServers": {
"assistant": {
"command": "node",
"args": ["/path/to/mcp-assistant-server/build/index.js"],
"env": {
"PORT": "3000",
"LOG_LEVEL": "info"
}
}
}
}
在 Cursor 中,你可以通过命令面板(Cmd/Ctrl + Shift + P)使用以下命令:
MCP: 分析任务
- 分析当前选中的代码或文本MCP: 推荐工具
- 获取针对当前任务的工具推荐MCP: 更新上下文
- 更新任务上下文信息也可以通过 Cursor API 在插件中使用:
import { workspace } from 'cursor';
// 分析任务
const analysis = await workspace.mcp.callTool('assistant', 'analyze_task', {
description: '当前任务描述',
context: {
// 上下文信息
}
});
// 获取工具推荐
const recommendations = await workspace.mcp.callTool('assistant', 'recommend_tools', {
taskId: 'current-task-id'
});
分析用户输入的任务描述,提取关键信息:
根据任务特点智能推荐工具:
维护任务执行过程中的上下文信息:
src/
├── controllers/ # 控制器层
│ └── LLMApiController.ts
├── core/ # 核心功能实现
│ ├── TaskAnalyzer.ts
│ ├── ToolRecommender.ts
│ └── ContextManager.ts
├── services/ # 服务层
│ ├── LLMService.ts
│ └── MCPDiscoveryService.ts
├── routes/ # 路由定义
│ └── llmApiRoutes.ts
└── types/ # 类型定义
└── interfaces.ts
详细的 API 文档请查看 API 文档。
我们欢迎所有形式的贡献,无论是新功能、文档改进还是问题反馈。详情请查看 贡献指南。
查看 CHANGELOG.md 了解详细的更新历史。
本项目采用 MIT 许可证 - 查看 LICENSE 了解详情。
感谢所有为这个项目做出贡献的开发者们!
Made with ❤️ by Lutra23
Seamless access to top MCP servers powering the future of AI integration.