GitHub API服务器

GitHub MCP服务器是一个用于GitHub API的中间件服务,支持文件操作、仓库管理、搜索功能等。

  • by melythemev
  • TypeScript
  • 本地部署
  • 3 星标
  • 更新于
在 GitHub 查看 melythemev/nexya2a

使用说明

GitHub MCP服务器

弃用通知:
该项目的开发已转移到 github/github mcp服务器.


概述

用于GitHub API的MCP服务器,实现文件操作、存储库管理、搜索功能等。


建筑

flowchart TD
    User[User/Client] -->|API Request| MCPServer[MCP Server]
    MCPServer -->|GitHub API| GitHub[GitHub]
    MCPServer -->|File Ops| FileSystem[(File System)]
    MCPServer -->|Service: nexy-cron| NexyCron[nexy-cron Service]
    MCPServer -->|Service: SocialNexy| SocialNexy[SocialNexy Service]

特性

  • 自动创建分支:根据需要创建分支。
  • 全面的错误处理:清除常见问题的错误消息。
  • Git历史保存:维护正确的Git历史记录。
  • 批量操作:支持单文件和多文件操作。
  • 高级搜索:搜索代码、问题/PR和用户。

服务

  • 尼克戎:代币分析、钱包统计、趋势代币等。
  • SocialNexy:社会情绪、热门话题和影响者数据。

工具

graph TD
    subgraph File & Repo
        create_or_update_file
        push_files
        get_file_contents
        create_repository
        fork_repository
        create_branch
        list_commits
    end
    subgraph Search
        search_repositories
        search_code
        search_issues
        search_users
    end
    subgraph Issues & PRs
        create_issue
        update_issue
        add_issue_comment
        create_pull_request
        get_pull_request
        list_pull_requests
        create_pull_request_review
        merge_pull_request
        get_pull_request_files
        get_pull_request_status
        get_pull_request_comments
        get_pull_request_reviews
        update_pull_request_branch
        get_issue
        list_issues
    end
  • 在中查看工具及其参数的完整列表 工具部分.

设置

个人访问令牌

  1. 创建GitHub个人访问令牌 拥有适当的权限。
  2. 将其添加到您的环境或配置中。

使用Claude Desktop

码头工人

{
  "mcpServers": {
    "github": {
      "command": "docker",
      "args": [
        "run",
        "-i",
        "--rm",
        "-e",
        "GITHUB_PERSONAL_ACCESS_TOKEN",
        "mcp/github"
      ],
      "env": {
        "GITHUB_PERSONAL_ACCESS_TOKEN": "<YOUR_TOKEN>"
      }
    }
  }
}

NPX

{
  "mcpServers": {
    "github": {
      "command": "npx",
      "args": [
        "-y",
        "@modelcontextprotocol/server-github"
      ],
      "env": {
        "GITHUB_PERSONAL_ACCESS_TOKEN": "<YOUR_TOKEN>"
      }
    }
  }
}

构建

docker build -t mcp/github -f src/github/Dockerfile .

许可证

MIT许可证。看 许可证 了解详情。


图表

高级体系结构

flowchart TD
    User[User/Client] -->|API Request| MCPServer[MCP Server]
    MCPServer -->|GitHub API| GitHub[GitHub]
    MCPServer -->|File Ops| FileSystem[(File System)]
    MCPServer -->|Service: nexy-cron| NexyCron[nexy-cron Service]
    MCPServer -->|Service: SocialNexy| SocialNexy[SocialNexy Service]

工具/命令概述

graph TD
    subgraph File & Repo
        create_or_update_file
        push_files
        get_file_contents
        create_repository
        fork_repository
        create_branch
        list_commits
    end
    subgraph Search
        search_repositories
        search_code
        search_issues
        search_users
    end
    subgraph Issues & PRs
        create_issue
        update_issue
        add_issue_comment
        create_pull_request
        get_pull_request
        list_pull_requests
        create_pull_request_review
        merge_pull_request
        get_pull_request_files
        get_pull_request_status
        get_pull_request_comments
        get_pull_request_reviews
        update_pull_request_branch
        get_issue
        list_issues
    end

有关更多详细信息,请参阅完整文档或代码库。