GitHub Mapper 是一款基于 Model Context Protocol (MCP) 的服务器,它提供了强大的工具,可用于映射和分析 GitHub 仓库。用户能通过设置 GitHub 个人访问令牌,轻松检索指定仓库的详细信息,包括仓库结构和摘要统计信息,为开发者管理和了解仓库提供便利。
GitHub Mapper 能让你轻松映射和分析 GitHub 仓库。按照以下步骤,快速开启使用之旅:
npx -y @smithery/cli install github-mapper-mcp-server --client claude
通过 Smithery 可自动为 Claude Desktop 安装 GitHub Mapper:
npx -y @smithery/cli install github-mapper-mcp-server --client claude
git clone https://github.com/your-username/github-mapper-mcp-server.git
cd github-mapper-mcp-server
npm install
npm run build
npm start
set-github-token设置 GitHub 个人访问令牌进行身份验证。
示例,在 IDE 或 Claude Desktop 中:
请将 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 设置为-github-token
map-github-repo映射 GitHub 仓库结构并提供摘要信息。
示例:
请映射-github-repo https://github.com/dazeb/MCP-Github-Mapper
{
"name": "your-app-name",
"version": "1.0.0",
"description": "Your app description here",
"main": "index.js",
"scripts": {
"start": "node index.js"
},
"dependencies": {
"github-mapper": "^1.2.3"
}
}
GitHub Mapper 分析结果示例:
{
"仓库名称": "your-repository-name",
"星标数": 123,
"分支数量": 45,
"语言": "JavaScript",
"主要依赖项": ["express", "react"]
}
.
├── README.md
├── package.json
├── index.js
└── src/
├── components/
│ └── App.jsx
└── services/
└── api.js
如果遇到问题,请检查以下常见错误:
⚠️ 重要提示
- 若未设置令牌,请确保已运行
set-github-token命令。- 若提示无效 URL,请确认仓库 URL 正确无误。
欢迎为 GitHub Mapper 提交问题和拉取请求!请在 GitHub 仓库 中查看贡献指南。
此项目受 MIT License 保护。