智码师

@cyanheads/mentor-mcp-server
1 Stars 728 次浏览 cyanheads 更新于 2026-08-23

通过Deepseek API为大型语言模型代理提供人工智能驱动的代码审查、设计评论、写作反馈和头脑风暴指导,从而在各种开发和战略规划任务中提升输出效果。

MCP 服务配置

复制以下 JSON 到 OPClaw 或其他 MCP 客户端的配置文件中即可使用

{
  "mcpServers": {
    "mentor": {
      "args": [
        "build/index.js"
      ],
      "command": "node",
      "env": {
        "DEEPSEEK_API_KEY": "your_api_key",
        "DEEPSEEK_MAX_RETRIES": "3",
        "DEEPSEEK_MAX_TOKENS": "8192",
        "DEEPSEEK_MODEL": "deepseek-reasoner",
        "DEEPSEEK_TIMEOUT": "30000"
      }
    }
  }
}

该服务需要配置环境变量:DEEPSEEK_API_KEY、DEEPSEEK_MAX_RETRIES、DEEPSEEK_MAX_TOKENS、DEEPSEEK_MODEL、DEEPSEEK_TIMEOUT

可用工具 (5 个)

该服务在 MCP 协议中暴露的工具,AI 可按需调用

second_opinion 1 个参数 需填 1 项

Provides a second opinion on a user's request by analyzing it with an LLM and listing critical considerations.

必填参数:user_request

code_review 3 个参数

Provides a code review for a given file or code snippet, focusing on potential bugs, style issues, performance bottlenecks, and security vulnerabilities.

该工具无需必填参数,直接调用即可

design_critique 2 个参数 需填 2 项

Offers a critique of a design document, UI/UX mockup, or architectural diagram, focusing on usability, aesthetics, consistency, accessibility, and potential design flaws.

必填参数:design_document、design_type

writing_feedback 2 个参数 需填 2 项

Provides feedback on a piece of writing, such as an essay, article, or technical documentation, focusing on clarity, grammar, style, structure, and overall effectiveness.

必填参数:text、writing_type

brainstorm_enhancements 1 个参数 需填 1 项

Generates creative ideas for improving a given concept, product, or feature, focusing on innovation, feasibility, and user value.

必填参数:concept

服务介绍

mentor-mcp-server

TypeScript
Model Context Protocol
Version
License
Status
GitHub

一个 Model Context Protocol 服务器,通过 AI 驱动的 Deepseek-Reasoning (R1) 导师功能为 LLM 代理提供第二意见,包括代码审查、设计批评、写作反馈和创意头脑风暴等功能。通过 Deepseek API,让您的 LLM 代理获得专家级的第二意见和可操作的见解。

Model Context Protocol

Model Context Protocol (MCP) 支持以下实体之间的通信:

  • 客户端:Claude Desktop、IDEs 和其他兼容 MCP 的客户端
  • 服务器:用于任务管理和自动化的工具和资源
  • LLM 代理:利用服务器能力的 AI 模型

目录

特性

代码分析

  • 全面的代码审查
  • 错误检测与预防
  • 代码风格和最佳实践评估
  • 性能优化建议
  • 安全漏洞评估

设计与架构

  • UI/UX 设计批评
  • 架构图分析
  • 设计模式推荐
  • 可访问性评估
  • 一致性检查

内容增强

  • 写作反馈与改进
  • 语法和风格分析
  • 文档审查
  • 内容清晰度评估
  • 结构性建议

战略规划

  • 功能增强头脑风暴
  • 方法上的第二意见
  • 创新建议
  • 可行性分析
  • 用户价值评估

安装

# 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


相关 MCP 服务