Skip to main content
Glama

GitHub MCP Server

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

🚀 快速入门

  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

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 交互。

  1. ✨ 特点
    1. 🚀 快速入门
      1. 💬 尝试这些提示
        1. 🔧 要求
          1. 🔒 GitHub 令牌选项
            1. 🙋‍♂️ 贡献
              1. 📜 许可证

                Related MCP Servers

                • A
                  security
                  A
                  license
                  A
                  quality
                  A Model Context Protocol server that connects GitHub code to Claude.ai. This server utilizes the Pera1 service to extract code from GitHub repositories and provide better context to Claude.
                  Last updated -
                  1
                  31
                  1
                  JavaScript
                  MIT License
                  • Apple
                • A
                  security
                  A
                  license
                  A
                  quality
                  Enables AI assistants to interact with GitHub through the PyGithub library, providing tools for managing issues, repositories, pull requests, and other GitHub operations with intelligent parameter handling and error management.
                  Last updated -
                  19
                  Python
                  MIT License
                • -
                  security
                  F
                  license
                  -
                  quality
                  A 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 -
                  Python
                • -
                  security
                  F
                  license
                  -
                  quality
                  A 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
                  Python
                  • Linux
                  • Apple

                View all related MCP servers

                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