Back to MCP directory
publicPublicdnsLocal runtime

github-mcp-server-usi

GitHub MCP Server是一个基于Model Context Protocol的服务器,提供与GitHub API的无缝集成,支持开发者构建自动化工作流和AI驱动的工具应用。

article

README

🚀 GitHub 管理控制平面(MCP)

GitHub 管理控制平面(MCP)提供了一系列操作接口,用于管理仓库的拉取请求、问题、内容等,同时支持代码和问题的搜索功能,还能获取相关库和许可证信息。

🚀 快速开始

本项目提供了多种操作接口,涵盖拉取请求、问题、仓库内容管理、资源搜索等功能,以下为您详细介绍各操作的使用方法。

✨ 主要特性

  • 支持拉取请求的创建与获取。
  • 可创建和获取仓库问题。
  • 能获取不同分支、提交、标签下的仓库内容。
  • 提供代码和问题的搜索功能。
  • 可获取 GitHub MCP 库及 MIT 许可证内容。

📚 详细文档

操作方法

拉取请求

  • 创建拉取请求

    • 接口:[POST /repos/{owner}/{repo}/pulls]( 创建一个新的拉取请求。
    • 参数: | 参数 | 详情 | |------|------| | owner | 仓库所有者(字符串,必需) | | repo | 仓库名称(字符串,必需) | | head | 新分支的头指针(字符串,必需) | | base | 基础分支名称(字符串,必需) | | title | 拉取请求标题(字符串,必需) | | body | 拉取请求正文(字符串,可选) |
  • 获取拉取请求

    • 接口:[GET /repos/{owner}/{repo}/pulls/{pull_number}]( 获取指定编号的拉取请求。
    • 参数: | 参数 | 详情 | |------|------| | owner | 仓库所有者(字符串,必需) | | repo | 仓库名称(字符串,必需) | | pull_number | 拉取请求编号(字符串,必需) |

问题

  • 创建问题

    • 接口:[POST /repos/{owner}/{repo}/issues]( 创建一个新的问题。
    • 参数: | 参数 | 详情 | |------|------| | owner | 仓库所有者(字符串,必需) | | repo | 仓库名称(字符串,必需) | | title | 问题标题(字符串,必需) | | body | 问题正文(字符串,可选) |
  • 获取问题

    • 接口:[GET /repos/{owner}/{repo}/issues/{issue_number}]( 获取指定编号的问题。
    • 参数: | 参数 | 详情 | |------|------| | owner | 仓库所有者(字符串,必需) | | repo | 仓库名称(字符串,必需) | | issue_number | 问题编号(字符串,必需) |

仓库内容

  • 获取仓库内容

    • 接口:[GET /repos/{owner}/{repo}/contents{/path*}]( 获取指定路径的仓库内容。
    • 参数: | 参数 | 详情 | |------|------| | owner | 仓库所有者(字符串,必需) | | repo | 仓库名称(字符串,必需) | | path | 文件或目录路径(字符串,可选) |
  • 获取特定分支的仓库内容

    • 接口:[GET /repos/{owner}/{repo}/refs/heads/{branch}/contents{/path*}]( 获取指定分支上指定路径的仓库内容。
    • 参数: | 参数 | 详情 | |------|------| | owner | 仓库所有者(字符串,必需) | | repo | 仓库名称(字符串,必需) | | branch | 分支名称(字符串,必需) | | path | 文件或目录路径(字符串,可选) |
  • 获取特定提交的仓库内容

    • 接口:[GET /repos/{owner}/{repo}/sha/{sha}/contents{/path*}]( 获取指定提交上指定路径的仓库内容。
    • 参数: | 参数 | 详情 | |------|------| | owner | 仓库所有者(字符串,必需) | | repo | 仓库名称(字符串,必需) | | sha | 提交哈希值(字符串,必需) | | path | 文件或目录路径(字符串,可选) |
  • 获取特定标签的仓库内容

    • 接口:[GET /repos/{owner}/{repo}/refs/tags/{tag}/contents{/path*}]( 获取指定标签上指定路径的仓库内容。
    • 参数: | 参数 | 详情 | |------|------| | owner | 仓库所有者(字符串,必需) | | repo | 仓库名称(字符串,必需) | | tag | 标签名称(字符串,必需) | | path | 文件或目录路径(字符串,可选) |

资源

代码搜索

  • 搜索代码
    • 接口:[GET /search/code]( 搜索仓库中的代码。
    • 参数: | 参数 | 详情 | |------|------| | q | 查询条件(字符串,必需) | | sort | 排序方式(字符串,可选) | | order | 排序顺序(字符串,可选) |

问题搜索

  • 搜索问题
    • 接口:[GET /search/issues]( 搜索仓库中的问题。
    • 参数: | 参数 | 详情 | |------|------| | q | 查询条件(字符串,必需) | | sort | 排序方式(字符串,可选) | | order | 排序顺序(字符串,可选) |

库的使用

  • GitHub MCP 库
    • 接口:[GET /]( 获取 GitHub MCP 库。
    • 参数:无

许可证

  • MIT 许可证
    • 接口:[GET /LICENSE]( 获取 MIT 许可证内容。

📄 许可证

本项目采用 MIT 许可证。您可以通过接口 [GET /LICENSE]( 获取 MIT 许可证内容。

help

Runtime guide

cloud

Hosted runtime

Hosted servers run from a provider-managed environment. You usually connect the MCP client to the hosted endpoint or follow the provider's authorization flow, without keeping a local process alive

  1. Open provider connection page
  2. Authorize or copy endpoint
  3. Connect from your MCP client
terminal

Local runtime / other methods

Local servers run on your own machine or infrastructure. You normally copy the server_config into your MCP client, install the required package, and provide env variables from env_schema when needed

  1. Copy server_config
  2. Install required package
  3. Fill env variables and restart client