Skip to main content
Glama

github-mcp

用于 GitHub REST API 的 MCP 服务器 —— 涵盖全部 44 个 API 类别的 1,112 个工具。

通过代码生成器从 GitHub 的 OpenAPI 规范 自动生成,该生成器可生成带有 Zod 验证的类型化工具定义。

安装

npm install github-rest-mcp

或从 GitHub Packages 安装:

npm install @eyalm321/github-mcp

配置

设置您的 GitHub 个人访问令牌:

export GITHUB_TOKEN=ghp_your_token_here

类别过滤

默认情况下,所有 1,112 个工具都会被注册。若要仅启用特定类别:

export GITHUB_MCP_CATEGORIES=repos,issues,pulls,actions

Claude Desktop

添加到您的 claude_desktop_config.json 中:

{
  "mcpServers": {
    "github": {
      "command": "npx",
      "args": ["-y", "github-rest-mcp"],
      "env": {
        "GITHUB_TOKEN": "ghp_your_token_here",
        "GITHUB_MCP_CATEGORIES": "repos,issues,pulls,actions,users,orgs,git,search"
      }
    }
  }
}

API 类别

类别

工具数

类别

工具数

actions

184

activity

32

agent-tasks

5

apps

37

billing

10

campaigns

5

checks

12

classroom

6

code-scanning

21

code-security

20

codes-of-conduct

2

codespaces

48

copilot

25

credentials

1

dependabot

22

dependency-graph

3

emojis

1

enterprise-team-memberships

6

enterprise-team-organizations

6

enterprise-teams

5

gists

20

git

13

gitignore

2

hosted-compute

6

interactions

9

issues

55

licenses

3

markdown

2

meta

5

migrations

22

oidc

8

orgs

108

packages

27

private-registries

6

projects

26

pulls

27

rate-limit

1

reactions

15

repos

201

search

7

secret-scanning

9

security-advisories

10

teams

32

users

47

工具命名

工具遵循 github_{category}_{action} 的模式,源自 GitHub 的操作 ID:

  • github_repos_get — 获取仓库

  • github_issues_create — 创建议题

  • github_pulls_list — 列出拉取请求

  • github_actions_list_workflow_runs — 列出工作流运行

开发

# Install dependencies
npm install

# Regenerate tools from OpenAPI spec
npm run generate

# Build
npm run build

# Run tests
npm test

# Start the server
npm start

重新生成工具

src/tools/ 中的工具文件是从 GitHub 的 OpenAPI 规范自动生成的。如需更新:

# Delete cached spec to force re-download
rm -f api-description.json

# Regenerate
npm run generate

许可证

MIT

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

Resources

Unclaimed servers have limited discoverability.

Looking for Admin?

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

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

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