这是一个模型上下文协议(Model Context Protocol)服务器,其核心价值在于将 GitHub 代码与 Claude.ai 进行连接。借助 Pera1 服务,该服务器能够从 GitHub 仓库中精准提取代码,为 Claude 提供更优质的上下文信息,从而提升交互体验。
此服务器能使 Claude 与 GitHub 代码仓库建立连接,让你可以轻松地让 Claude 查询 GitHub 代码仓库的信息。
在你的 MCP 配置文件(~/Library/Application Support/Claude/claude_desktop_config.json)中添加以下内容:
{
"mcpServers": {
"github": {
"command": "npx",
"args": ["-y", "@kazuph/mcp-github-pera1"]
}
}
}
你可以向 Claude 提出以下基础问题:
告诉我关于GitHub仓库 https://github.com/username/repository 的实现细节。
解释https://github.com/username/repository?dir=src/components 中的组件结构。
展示https://github.com/username/repository?file=src/components/Button.tsx 中的Button组件代码。
展示https://github.com/username/repository 的文件结构(仅包含README)?mode=tree
分析https://github.com/username/repository 的develop分支情况?branch=develop
| 属性 | 详情 |
|---|---|
url |
GitHub 仓库的 URL 地址(必填) |
dir |
按目录路径过滤文件(逗号分隔) |
ext |
按文件扩展名过滤文件(逗号分隔) |
mode |
显示模式(例如,tree 仅显示目录结构和 README 文件) |
branch |
指定要获取的分支 |
file |
指定要检索的单个文件 |
本项目采用 MIT 许可证。
kazuph(联系作者)