🔗 适用于 Claude Desktop 的 GitHub MCP 服务器
通过无缝 GitHub 集成增强您的 Claude Desktop!
该 MCP 服务器将 Claude Desktop 直接连接到您的 GitHub 存储库和 git 命令,让您可以通过自然对话与您的代码和存储库进行交互。
✨ 特点
🔄
git-clone
- 通过简单的请求克隆任何存储库📊
git-status
- 检查你的 git 仓库中发生的情况📋
github-list-repos
- 浏览你的 GitHub 存储库🔍
github-repo-info
- 获取任何存储库的详细信息📝
git-commit
- 提交对存储库的更改🚀
git-push
- 将你的提交推送到 GitHub🆕
github-create-repo
- 创建新的 GitHub 存储库
🚀 快速入门
克隆此 repo:
git clone https://github.com/shibdad/github-mcp-server.git cd github-mcp-server安装依赖项:
npm install使其可执行:
chmod +x start.sh index.js添加您的 GitHub 令牌(用于私人存储库和 API 访问):
echo "your-github-token" > .github_token将其连接到 Claude Desktop:
编辑 Claude 的配置文件:
macOS:
~/Library/Application Support/Claude/claude_desktop_config.json
Windows:
%APPDATA%\Claude\claude_desktop_config.json
将其添加到您的配置中:
{ "mcpServers": { "github": { "command": "/bin/sh", "args": ["-c", "/path/to/github-mcp-server/start.sh"] } } }重新启动 Claude,就可以了!
💬 尝试这些提示
连接后,向 Claude 询问以下问题:
“将 tensorflow/models 存储库克隆到我的下载文件夹”
“我的项目目录的 git 状态是什么?”
“显示我的 GitHub 存储库列表”
“获取有关 microsoft/vscode 存储库的详细信息”
“通过‘更新文档’消息提交我的更改”
“将我的提交推送到 GitHub”
“创建一个名为‘my-awesome-project’的新存储库”
🔧 要求
Node.js 16+
Git 命令行工具
克劳德桌面
GitHub 个人访问令牌(用于 API 访问)
🔒 GitHub 令牌选项
需要访问私有代码库?您可以通过以下方式添加您的代币:
在项目文件夹中创建
.github_token
文件设置
GITHUB_TOKEN
环境变量直接在 Claude 的配置中添加它:
{ "mcpServers": { "github": { "command": "/bin/sh", "args": ["-c", "/path/to/github-mcp-server/start.sh"], "env": { "GITHUB_TOKEN": "your-github-token" } } } }
🙋♂️ 贡献
发现 Bug 了吗?想添加新功能吗?欢迎提交 PR!
📜 许可证
麻省理工学院
This server cannot be installed
local-only server
The server can only run on the client's local machine because it depends on local resources.
将 Claude Desktop 连接到 GitHub 存储库,使用户能够通过自然对话执行 git 操作和 GitHub API 交互。
Related MCP Servers
- -securityFlicense-qualityEnables interaction with GitHub through the GitHub API, supporting file operations, repository management, advanced search, and issue tracking with comprehensive error handling and automatic branch creation.Last updated -1,4001
- -securityFlicense-qualityA modular command processor server that enables interaction with GitHub's REST API to fetch user details, repository information, and authenticated user data through natural language commands in Claude.Last updated -
- -securityFlicense-qualityA Multi-Claude Program for interacting with GitHub APIs through Claude Desktop, allowing users to search repositories, manage issues, pull requests, repository settings, workflows, and collaborators.Last updated -1
- -securityAlicense-qualityEnables interaction with GitHub repositories through the GitHub API, allowing file operations, repository management, issue tracking, and code search through natural language commands.Last updated -32MIT License