一个 Model Context Protocol 服务器,通过 AI 驱动的 Deepseek-Reasoning (R1) 导师功能为 LLM 代理提供第二意见,包括代码审查、设计批评、写作反馈和创意头脑风暴等功能。通过 Deepseek API,让您的 LLM 代理获得专家级的第二意见和可操作的见解。
Model Context Protocol (MCP) 支持以下实体之间的通信:
# Clone the repository
git clone git@github.com:cyanheads/mentor-mcp-server.git
cd mentor-mcp-server
# Install dependencies
npm install
# Build the project
npm run build

在您的 MCP 客户端设置中添加:
{
"mcpServers": {
"mentor": {
"command": "node",
"args": ["build/index.js"],
"env": {
"DEEPSEEK_API_KEY": "your_api_key",
"DEEPSEEK_MODEL": "deepseek-reasoner",
"DEEPSEEK_MAX_TOKENS": "8192",
"DEEPSEEK_MAX_RETRIES": "3",
"DEEPSEEK_TIMEOUT": "30000"
}
}
}
}

变量 | 是否必需 | 默认值 | 描述 |
---|---|---|---|
DEEPSEEK_API_KEY | 是 | - | 您的 Deepseek API 密钥 |
DEEPSEEK_MODEL | 是 | deepseek-reasoner | Deepseek 模型名称 |
DEEPSEEK_MAX_TOKENS | 否 | 8192 | 每次请求的最大令牌数 |
DEEPSEEK_MAX_RETRIES | 否 | 3 | 重试次数 |
DEEPSEEK_TIMEOUT | 否 | 30000 | 请求超时时间(毫秒) |
<use_mcp_tool>
<server_name>mentor-mcp-server</server_name>
<tool_name>code_review</tool_name>
<arguments>
{
"file_path": "src/app.ts",
"language": "typescript"
}
</arguments>
</use_mcp_tool>

<use_mcp_tool>
<server_name>mentor-mcp-server</server_name>
<tool_name>design_critique</tool_name>
<arguments>
{
"design_document": "path/to/design.fig",
"design_type": "web UI"
}
</arguments>
</use_mcp_tool>

<use_mcp_tool>
<server_name>mentor-mcp-server</server_name>
<tool_name>writing_feedback</tool_name>
<arguments>
{
"text": "Documentation content...",
"writing_type": "documentation"
}
</arguments>
</use_mcp_tool>

<use_mcp_tool>
<server_name>mentor-mcp-server</server_name>
<tool_name>brainstorm_enhancements</tool_name>
<arguments>
{
"concept": "User authentication system"
}
</arguments>
</use_mcp_tool>

每个工具的使用方法和输出详细示例可以在 examples 目录中找到:
每个示例都包括请求格式和示例响应,展示了工具的功能和输出结构。
# Build TypeScript code
npm run build
# Start the server
npm run start
# Development with watch mode
npm run dev
# Clean build artifacts
npm run clean

src/ ├── api/ # API integration modules ├── tools/ # Tool implementations │ ├── second-opinion/ │ ├── code-review/ │ ├── design-critique/ │ ├── writing-feedback/ │ └── brainstorm-enhancements/ ├── types/ # TypeScript type definitions ├── utils/ # Utility functions ├── config.ts # Server configuration ├── index.ts # Entry point └── server.ts # Main server implementation
Apache License 2.0。有关更多信息,请参阅 LICENSE。