GitHub MCP Server

Integrations

  • Enables interaction with the GitHub API, providing tools for creating issues, retrieving repository information, listing repository issues, and searching repositories.

GitHub MCP(模型上下文协议)服务器

您好!这是一个 GitHub MCP 服务器,旨在使兼容 MCP 的 LLM(例如 Claude)能够与我的 MCP 服务器通信并与 GitHub API 交互。

要求

  • TypeScript(编程语言)
  • Octokit(用于向 GitHub 发出 API 请求)
  • 模型上下文协议 SDK

在本地设置项目

  1. 克隆存储库
  2. 运行npm install
  3. 添加.env文件,查看.env.example文件中提供的示例
  4. 要将 TypeScript 文件构建为 Javascript,请运行npx tsc
  5. 要最终运行项目,请运行node build/index.js

测试方法

您可以通过两种方式测试您的 MCP 服务器:

  • MCP检查员
  • 克劳德桌面

使用 MCP 检查器进行测试

  1. 只需在终端中运行npx @modelcontextprotocol/inspector node build/index.js
  2. 转到http://localhost:5173
  3. 您现在可以看到MCP 检查器并进行测试。

使用 Claude Desktop 进行测试

  1. 这里下载并安装 Claude Desktop
  2. 转到文件>设置...>开发人员>编辑配置
  3. 它应该打开 claude_desktop_config.json 文件的位置。
  4. 在代码编辑器中打开该文件并添加以下内容:
    { "mcpServers": { "gh": { "command": "node", "args": ["absolute\\path\\to\\your\\index.js\\file"], "env": { "GITHUB_TOKEN": "your-github-personal-access-token" } } } }
  5. 退出并重新打开 Claude 桌面

功能

MCP主要支持两个功能:

  • 工具(4)
    • create-issue :在 GitHub 存储库中创建新问题
    • get-repo-info :获取有关特定 GitHub 存储库的信息
    • list-issues :列出 GitHub 存储库中的问题
    • search-repos :搜索 GitHub 存储库
  • 提示(5)
    • create-issue-description :为 GitHub 问题生成描述
    • create-pull-request-description :为 GitHub 拉取请求生成描述
    • search-repos-prompt :生成用于搜索 GitHub 存储库的查询
    • create-issue-prompt :生成用于创建 GitHub 问题的参数
    • enhance-github-response :格式化并增强原始 GitHub API 响应数据

您可以编写自己的提示,也可以从 Claude 桌面版 MCP 的“选择集成”选项下拉菜单中选择合适的提示

-
security - not tested
F
license - not found
-
quality - not tested

hybrid server

The server is able to function both locally and remotely, depending on the configuration or use case.

MCP 服务器使 Claude 和其他兼容的 LLM 能够与 GitHub API 交互,支持创建问题、检索存储库信息、列出问题和搜索存储库等功能。

  1. Requirements
    1. Setup the project locally
    2. Ways to test
    3. Test using MCP inspector
    4. Test using Claude Desktop
    5. Functionalities

Related MCP Servers

  • A
    security
    A
    license
    A
    quality
    MCP Server for the GitHub API, enabling file operations, repository management, search functionality, and more.
    Last updated -
    17
    36,796
    43,046
    JavaScript
    MIT License
  • A
    security
    F
    license
    A
    quality
    MCP Server for the GitHub API, providing features for file operations, repository management, and advanced search, with automatic branch creation and comprehensive error handling.
    Last updated -
    18
    4
    1
    TypeScript
  • -
    security
    A
    license
    -
    quality
    An MCP server that enables clients to extract LLM-friendly prompts from documentation in GitHub repositories or hosted websites.
    Last updated -
    Python
    Apache 2.0
  • -
    security
    -
    license
    -
    quality
    An MCP server that allows Claude and other MCP-compatible LLMs to interact with the GitHub API, supporting features like creating issues, getting repository information, listing issues, and searching repositories.
    Last updated -
    TypeScript

View all related MCP servers

ID: 4mcur07f57