mcpField
O
OpenDigger MCP Server

OpenDigger MCP Server

本地服务
github.com/X-lab2017数据与分析855 周前更新

关于 OpenDigger MCP Server

OpenDigger MCP Server 通过 MCP 工具和提示词提供代码仓库分析功能,可用于查看指标、比较项目,以及分析趋势和开发者活动。

主要功能

  1. 01获取单项及批量指标
  2. 02比较代码仓库
  3. 03分析指标趋势
  4. 04获取生态洞察
  5. 05生成健康度与开发者分析

适用场景

  1. 01比较不同项目的仓库指标
  2. 02通过提示词检查仓库健康状况
  3. 03跟踪贡献者随时间的增长
  4. 04分析开发者活动与贡献

MCP 相关

该 MCP 服务提供六种代码仓库分析工具和三个提示词,涵盖指标查询、仓库比较、趋势分析和健康状况分析。

配置

本地服务的配置在各客户端中通用,复制后粘贴到客户端的 MCP 配置文件即可。

暂未收录安装方式

我们还没有获取到这个服务的安装包或远程地址,请按项目 README 中的说明安装。

代码仓库

工具

还没有获取到工具列表

本地服务需要在你的电脑上运行后才能读取工具,维护者暂未提供工具列表。

详细介绍

OpenDigger MCP 服务

一个用于 OpenDigger 的模型上下文协议(MCP)服务,可通过工具和提示词提供高级仓库分析与洞察。

快速开始

# Setup
git clone https://github.com/X-lab2017/open-digger-mcp-server.git

# (Optional) Ensure you're on the master branch
git checkout master

cd open-digger-mcp-server && cd mcp-server
npm install
npm run build

# Start server
npm start

重要


别忘了配置 Cursor(更新 .cursor/mcp.json 中的路径)

预期输出:

OpenDigger MCP Server running (on stdio)...

重要


如果你使用的是 Cursor AI IDE,应该会在左下角看到 MCP 服务(open-digger-mcp)提示。你需要将其_启用_,然后即可开始使用 MCP 服务提供的工具和提示词。若要验证,请打开 Cursor Settings 并查看 MCP Servers 部分 → 你应该能看到其中列出了 open-digger-mcp。

opendigger-mcp-img

若要进一步确认服务是否正常运行,可以查看 Cursor 中的以下状态指示:

  • ✅ “open-digger-mcp”标题旁的绿色圆点
  • ✅ 服务状态中显示**“6 tools”**
  • ✅ 服务状态中显示**“3 prompts”**
  • ✅ 没有错误消息或红色指示标记

demo-mcp-opendigger

提示

有关不同 IDE 的详细安装说明和配置选项,请参阅 Installation.md。


功能

工具(共 6 个)
No.ToolDescription
1get_open_digger_metric获取单个仓库的指标
2get_open_digger_metrics_batch批量处理多个指标
3compare_repositories多仓库对比分析
4analyze_trends分析不同时间段内的增长趋势
5get_ecosystem_insights生态系统分析与洞察
6server_health系统诊断和运行状况监控(Beta)
提示词(共 3 个)
  1. repo_health_analysis - 全面的仓库健康状况报告
  2. repo_comparison - 仓库竞争分析
  3. developer_insights - 开发者活动与贡献分析
指标
  • 核心指标:openrank、stars、forks、contributors、participants、issues_new、issues_closed、pull_requests、commits、activity

  • 扩展指标:technical_fork、bus_factor、releases、inactive_contributors、maintainer_count、community_activity

  • 其他指标:change_requests、pull_requests_accepted、pull_requests_merged、issue_comments、issue_response_time、code_change_lines、developer_network


💡 使用示例

💠 仓库对比
Compare microsoft/vscode and facebook/react using the compare_repositories tool
💠 健康状况分析
Generate a health report for microsoft/vscode using the repo_health_analysis prompt
💠 趋势分析
Analyze the growth trends for contributors in microsoft/vscode over 2 years


服务状态检查

启动服务后,请验证其是否正常运行:

# In a new terminal
echo '{"jsonrpc":"2.0","id":1,"method":"tools/list","params":{}}' | node dist/index.js

预期响应应列出全部 6 个工具。


配置

环境变量(.env)
# Cache configuration (recommended)
CACHE_TTL_SECONDS=300

# Optional SSE server
SSE_PORT=3001
SSE_HOST=127.0.0.1
Cursor MCP(.cursor/mcp.json)
{
  "mcpServers": {
    "open-digger": {
      "command": "node",
      "args": ["/full/path/to/dist/index.js"],
      "cwd": "/full/path/to/project",
      "env": {
        "CACHE_TTL_SECONDS": "300"
      }
    }
  }
}

提示

将 /full/path/to/open-digger-mcp-server 替换为你的实际项目目录路径。使用 pwd 获取当前目录路径。

开发

npm run watch           # Development mode
npm run build           # Compile TypeScript
npm run clean           # Clean build files
npm run sse:test        # Test SSE server

提示

除了 Cursor,你还可以使用其他 MCP 客户端,例如 VS Code、Claude Chat 或官方的 MCP Inspector。

故障排除

常见问题

服务器未在 Cursor 中显示:

  1. 验证 .cursor/mcp.json 中的绝对路径
  2. 完全重启 Cursor(Cmd+Q / Alt+F4)
  3. 在 MCP 设置部分检查错误消息

权限错误:

chmod +x dist/index.js

构建错误:

npm run clean
npm install
npm run build

缓存问题:

# Clear npm cache
npm cache clean --force

# Rebuild
npm run clean && npm run build

贡献

  1. Fork 此仓库
  2. 创建功能分支(git checkout -b feature/amazing-feature)
  3. 提交更改(git commit -m 'Add amazing feature')
  4. 将更改推送到分支(git push origin feature/amazing-feature)
  5. 发起 Pull Request

许可证

Apache-2.0 许可证,详情请参阅 LICENSE 文件。

评论

支持 Markdown

第一次接触 MCP?

从协议是什么,到在客户端里装上第一个服务,这几条回答覆盖了大多数入门问题。

一个开放协议,规定了 AI 应用如何以统一方式连接外部工具与数据源。客户端负责与模型对话,MCP 服务负责提供工具、资源和提示模板,两者通过标准消息通信,同一个服务可以被不同客户端复用。