Skip to main content
Glama
alsonwangkhem

GitHub MCP Server

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

嗨!这是我的第一个GitHub MCP 服务器,它允许像Claude这样的MCP 兼容LLM 与我的 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

Related MCP server: GitHub MCP Server

测试方法

您可以通过两种方式测试您的 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 的“选择集成”选项下拉菜单中选择合适的提示

Install Server
F
license - not found
B
quality
D
maintenance

Maintenance

Maintainers
Response time
Release cycle
Releases (12mo)
Commit activity

Resources

Unclaimed servers have limited discoverability.

Looking for Admin?

If you are the server author, to access and configure the admin panel.

Related MCP Servers

  • F
    license
    B
    quality
    D
    maintenance
    An MCP server that enables Claude and other compatible LLMs to interact with the GitHub API, supporting features like creating issues, retrieving repository information, listing issues, and searching repositories.
    4
  • A
    license
    A
    quality
    C
    maintenance
    Python MCP server for GitHub operations, providing native tool integration with Claude Code and other MCP clients. It enables managing issues, pull requests, CI status, milestones, and batch operations via natural language.
    15
    MIT
  • F
    license
    -
    quality
    D
    maintenance
    A working MCP server that connects to the real GitHub API, enabling users to manage repositories, issues, pull requests, and more through natural language in Claude Desktop.

View all related MCP servers

Related MCP Connectors

  • An MCP server that gives your AI access to the source code and docs of all public github repos

  • Hosted MCP server connecting claude.ai, ChatGPT and other AI apps to your own computer

  • Driflyte MCP server which lets AI assistants query topic-specific knowledge from web and GitHub.

View all MCP Connectors

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/alsonwangkhem/github-mcp-2'

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