GitHub Explorer MCP

GitHub Explorer MCP

site icon
2025.04.04 0
TypeScriptGitHub仓库浏览开发工具开发效率
GitHub Explorer MCP 是一个提供GitHub仓库信息的MCP服务器,包括文件内容、目录结构和其他元数据,适用于Claude Desktop、Cursor等MCP客户端。其主要功能包括获取仓库摘要、查看目录结构、访问文件内容、增强元数据、本地仓库克隆、缓存系统、进度通知、格式选项、自动完成和Web界面。适用于开发者在开发过程中快速获取和浏览GitHub仓库信息。
View on GitHub

Overview

基本能力

产品定位

GitHub Explorer MCP 是一个专门为开发者设计的工具,用于快速获取和浏览GitHub仓库的详细信息,包括文件内容、目录结构和其他元数据。

核心功能

  • Repository Summaries: 获取GitHub仓库的全面信息
  • Directory Structure: 查看仓库的完整文件结构,并提供ASCII树形可视化
  • File Content: 访问特定文件的内容
  • Metadata Enhancement: 获取星星、分叉、描述和最后更新时间等信息
  • Local Repository Cloning: 本地克隆仓库以加快处理速度和获取更完整的数据
  • Caching System: 高效缓存仓库数据以减少API调用
  • Progress Notifications: 长时间运行的操作更新
  • Format Options: 以文本或结构化JSON格式获取数据
  • Auto-Completion: 提供仓库所有者和名称的建议
  • Web Interface: 在HTTP模式下运行时的基本状态页面和信息

适用场景

  • 开发者在开发过程中需要快速浏览GitHub仓库信息
  • 需要获取仓库的目录结构和文件内容
  • 需要查看仓库的元数据,如星星、分叉等
  • 需要本地克隆仓库以进行更高效的处理

工具列表

  • github_repository_summary: 获取GitHub仓库的摘要
  • github_directory_structure: 获取GitHub仓库的树形结构
  • github_read_important_files: 获取GitHub仓库中特定文件的内容
  • git_search (Coming Soon): 在GitHub仓库中搜索内容
  • git_diff (Coming Soon): 获取两个分支或提交之间的差异

常见问题解答

  • Node.js Version Issues: 项目需要Node.js 18或更高版本,如果遇到错误,请更新Node.js版本或使用nvm。

使用教程

使用依赖

  • Node.js 18或更高版本

安装教程

使用NPM

# Install from npm
npm install @trishchuk/github-explorer-mcp -g

# Run the server (stdio mode for MCP clients)
github-explorer-mcp

# Or run in HTTP/SSE mode
github-explorer-mcp-sse

使用Docker

# Build Docker image
docker build -t github-explorer-mcp .

# Run container
docker run -p 3000:3000 github-explorer-mcp

调试方式

# Clone the repository
git clone https://github.com/x51xxx/github-explorer-mcp.git
cd github-explorer-mcp

# Install dependencies
npm install

# Build the project
npm run build

# Run the built server
npm start
# or
npm run start:sse

许可证

该项目遵循 MIT 开源许可条款。