Skip to main content
Glama

🔗 适用于 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 存储库

Related MCP server: GitHub MCP Server

🚀 快速入门

  1. 克隆此 repo:

    git clone https://github.com/shibdad/github-mcp-server.git cd github-mcp-server
  2. 安装依赖项:

    npm install
  3. 使其可执行:

    chmod +x start.sh index.js
  4. 添加您的 GitHub 令牌(用于私人存储库和 API 访问):

    echo "your-github-token" > .github_token
  5. 将其连接到 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"] } } }
  6. 重新启动 Claude,就可以了!

💬 尝试这些提示

连接后,向 Claude 询问以下问题:

  • “将 tensorflow/models 存储库克隆到我的下载文件夹”

  • “我的项目目录的 git 状态是什么?”

  • “显示我的 GitHub 存储库列表”

  • “获取有关 microsoft/vscode 存储库的详细信息”

  • “通过‘更新文档’消息提交我的更改”

  • “将我的提交推送到 GitHub”

  • “创建一个名为‘my-awesome-project’的新存储库”

🔧 要求

  • Node.js 16+

  • Git 命令行工具

  • 克劳德桌面

  • GitHub 个人访问令牌(用于 API 访问)

🔒 GitHub 令牌选项

需要访问私有代码库?您可以通过以下方式添加您的代币:

  1. 在项目文件夹中创建.github_token文件

  2. 设置GITHUB_TOKEN环境变量

  3. 直接在 Claude 的配置中添加它:

    { "mcpServers": { "github": { "command": "/bin/sh", "args": ["-c", "/path/to/github-mcp-server/start.sh"], "env": { "GITHUB_TOKEN": "your-github-token" } } } }

🙋‍♂️ 贡献

发现 Bug 了吗?想添加新功能吗?欢迎提交 PR!

📜 许可证

麻省理工学院

-
security - not tested
A
license - permissive license
-
quality - not tested

Latest Blog Posts

MCP directory API

We provide all the information about MCP servers via our MCP API.

curl -X GET 'https://glama.ai/api/mcp/v1/servers/shibdad/github-mcp-server'

If you have feedback or need assistance with the MCP directory API, please join our Discord server