Token导航 LogoToken导航

MCP Server · 开发工具

GitHub Enterprise MCP

一个为GitHub Enterprise API提供MCP接口的服务器,用于轻松访问仓库信息、问题、PR等内容。

stdio官方级别未说明来源级核验工具 0
GitHub仓库管理TypeScriptCursor问题跟踪

快速开始

作者 / 组织
ddukbg
提供方
ddukbg
运行时
Docker

工具数量

0

来源目录标注

资源数量

0

来源目录标注

提示词数量

0

来源目录标注

GitHub Star

29

仓库热度

收录来源

3 个

MCP World

选型结论

GitHub Enterprise MCP 属于开发工具类 MCP Server,公开资料标注 0 个工具,通过stdio 本地进程接入,适配 Cursor,有可以直接复制的安装命令;接入前要先准备 访问 Token。

分类

开发工具

传输方式

stdio

认证方式

访问 Token

部署方式

支持远程部署

安装与配置

安装命令

docker run -p 3000:3000 \

公开命令不是通用的启动方式,拼不出可靠配置示例;请在客户端 MCP 配置里按官方文档填写 command 和 args。

上手步骤

  1. 1

    准备运行环境

    stdio 服务在本地起进程,需要先装好 Docker,再按安装命令拉取依赖。

  2. 2

    安装服务

    复制下面的安装命令执行;命令里带占位符的位置换成自己的密钥或路径。

  3. 3

    写入客户端配置

    在客户端的 MCP 配置里填启动命令和参数,保存后完全退出客户端再打开,让新配置生效。

  4. 4

    验证是否可用

    连接成功后客户端会列出 0 个工具,随便调一个只读工具确认能返回结果。

接入前确认

不要直接授予不必要的文件、网络或账号权限;先核对安装命令和配置内容。

详细介绍

GitHub企业MCP服务器

用于与GitHub Enterprise API集成的MCP(模型上下文协议)服务器。此服务器提供了一个MCP接口,可以在Cursor中从GitHub Enterprise轻松访问存储库信息、问题、PR等。

兼容性

该项目主要针对GitHub Enterprise Server环境设计,但也适用于:

  • GitHub.com
  • GitHub企业云
备注:一些特定于企业的功能(如许可证信息和企业统计数据)无法在GitHub.com或GitHub enterprise Cloud上使用。

主要特点

  • 从GitHub Enterprise实例中检索存储库列表
  • 获取详细的存储库信息
  • 列出存储库分支
  • 查看文件和目录内容
  • 管理问题并提取请求
  • 存储库管理(创建、更新、删除)
  • GitHub操作工作流管理
  • 用户管理(列出、创建、更新、删除、暂停/取消暂停用户)
  • 访问企业统计数据
  • 增强的错误处理和用户友好的响应格式

入门指南

先决条件

  • Node.js 18或更高版本
  • 访问GitHub Enterprise实例
  • 个人访问令牌(PAT)

Docker安装和设置

选项1:使用Docker运行
  1. 构建Docker镜像:
   docker build -t github-enterprise-mcp .
  1. 使用环境变量运行Docker容器:
   docker run -p 3000:3000 \
     -e GITHUB_TOKEN="your_github_token" \
     -e GITHUB_ENTERPRISE_URL="https://github.your-company.com/api/v3" \
     -e DEBUG=true \
     github-enterprise-mcp
备注:Dockerfile配置为使用 --transport http 默认情况下。如果需要更改此设置,可以覆盖该命令:
docker run -p 3000:3000 \
  -e GITHUB_TOKEN="your_github_token" \
  -e GITHUB_ENTERPRISE_URL="https://github.your-company.com/api/v3" \
  -e DEBUG=true \
  github-enterprise-mcp node dist/index.js --transport http --debug
选项2:使用Docker Compose
  1. 创建一个 .env 包含所需环境变量的项目根目录中的文件:
   GITHUB_ENTERPRISE_URL=https://github.your-company.com/api/v3
   GITHUB_TOKEN=your_github_token
   DEBUG=true
  1. 使用Docker Compose启动容器:
   docker-compose up -d
  1. 检查日志:
   docker-compose logs -f
  1. 停止容器:
   docker-compose down

安装和设置

地方发展(采用并行模式)

建议使用此方法进行自动重新编译和服务器重启的主动开发:

  1. 克隆存储库并安装所需的软件包:
   git clone https://github.com/ddukbg/github-enterprise-mcp.git
   cd github-enterprise-mcp
   npm install
  1. 运行开发服务器:
   export GITHUB_TOKEN="your_github_token"
   export GITHUB_ENTERPRISE_URL="https://github.your-company.com/api/v3"
   npm run dev

这将:

- 文件更改时自动编译TypeScript代码 - 更新编译文件时重新启动服务器 - 以HTTP模式运行服务器以进行基于URL的连接

  1. 使用URL模式连接到游标,如下所述

生产安装和设置

选项1:使用URL模式(建议用于本地开发)

这种方法是最稳定的,建议用于本地开发或测试:

  1. 克隆存储库并安装所需的软件包:
   git clone https://github.com/ddukbg/github-enterprise-mcp.git
   cd github-enterprise-mcp
   npm install
  1. 构建项目:
   npm run build
   chmod +x dist/index.js
  1. 运行服务器:
   export GITHUB_TOKEN="your_github_token"
   export GITHUB_ENTERPRISE_URL="https://github.your-company.com/api/v3"
   node dist/index.js --transport http --debug
  1. 使用URL模式连接到游标:

- 将以下内容添加到光标中 .cursor/mcp.json 文件:

   {
     "mcpServers": {
       "github-enterprise": {
         "url": "http://localhost:3000/sse"
       }
     }
   }
选项2:作为全局命令安装(npm链接)

这种方法对当地发展很有用:

# After cloning the repository
git clone https://github.com/ddukbg/github-enterprise-mcp.git
cd github-enterprise-mcp

# Install required packages
npm install

# Build
npm run build
chmod +x dist/index.js

# Link globally
npm link

# Run as a global command
export GITHUB_TOKEN="your_github_token"
export GITHUB_ENTERPRISE_URL="https://github.your-company.com/api/v3"
github-enterprise-mcp --transport=http --debug
选项3:使用npx(包发布时)

如果包被发布到公共npm注册表:

npx @ddukbg/github-enterprise-mcp --token=your_github_token --github-enterprise-url=https://github.your-company.com/api/v3

与AI工具集成

克劳德桌面

将以下内容添加到您的 claude_desktop_config.json:

{
  "mcpServers": {
    "github-enterprise": {
      "command": "npx",
      "args": ["-y", "@ddukbg/github-enterprise-mcp", "--token=YOUR_GITHUB_TOKEN", "--github-enterprise-url=YOUR_GITHUB_ENTERPRISE_URL"]
    }
  }
}

替换 YOUR_GITHUB_TOKEN 和 YOUR_GITHUB_ENTERPRISE_URL 与你的实际价值观。

光标

推荐:URL模式(最稳定)

为了在Cursor中实现最可靠的操作,建议使用URL模式:

  1. 在单独的终端窗口中启动服务器:
   cd /path/to/github-enterprise-mcp
   GITHUB_ENTERPRISE_URL="https://github.your-company.com/api/v3" GITHUB_TOKEN="your_github_token" node dist/index.js --transport http
  1. 配置Cursor的MCP设置:

- 打开光标并转到 设置 - 引导到 AI>MCP服务器 - 编辑您的 .cursor/mcp.json 文件:

   {
     "mcpServers": {
       "github-enterprise": {
         "url": "http://localhost:3000/sse"
       }
     }
   }
  1. 重新启动Cursor以应用更改
替代方案:命令模式

或者,您可以将Cursor配置为使用命令模式,尽管URL模式更可靠:

  1. 打开光标并转到 设置
  2. 引导到 AI>MCP服务器
  3. 点击 添加MCP服务器
  4. 输入以下详细信息:

- 名字:GitHub企业版 - 命令: npx - 参数: @ddukbg/github-enterprise-mcp - 环境变量: - GITHUB_ENTERPRISE_URL:您的GitHub Enterprise API URL - GITHUB_TOKEN:您的GitHub个人访问令牌

或者,您可以手动编辑您的 .cursor/mcp.json 文件包括:

{
  "mcpServers": {
    "github-enterprise": {
      "command": "npx",
      "args": [
        "@ddukbg/github-enterprise-mcp"
      ],
      "env": {
        "GITHUB_ENTERPRISE_URL": "https://github.your-company.com/api/v3",
        "GITHUB_TOKEN": "your_github_token"
      }
    }
  }
}

语言配置

此MCP服务器支持英语和韩语。您可以使用以下方式配置语言:

环境变量

# Set language to Korean
export LANGUAGE=ko

# Or in .env file
LANGUAGE=ko

命令行参数

# Set language to Korean
node dist/index.js --language ko

如果未指定,默认语言为英语。

HTTP模式下的其他选项

  • --debug:启用调试日志记录
  • --github-enterprise-url :设置GitHub Enterprise API URL
  • --token 设置 GitHub 个人访问令牌
  • --language :设置语言(en或ko,默认值:en)

可用的MCP工具

此MCP服务器提供以下工具:

工具名称描述参数所需PAT权限
list-repositories检索用户或组织的存储库列表owner:用户名/组织名称

isOrg:是否是一个组织 type:存储库类型 sort:排序标准 page:页码 perPage:每页项目数| repo | | get-repository |获取详细的存储库信息| owner:存储库所有者 repo:存储库名称| repo | | list-branches |列出存储库的分支| owner:存储库所有者 repo:存储库名称 protected_only:是否仅显示受保护的分支 page:页码 perPage:每页项目数| repo | | get-content |检索文件或目录内容| owner:存储库所有者 repo:存储库名称 path:文件/目录路径 ref:分支/提交(可选)| repo | | list-pull-requests |在存储库中列出拉取请求| owner:存储库所有者 repo:存储库名称 state:PR状态过滤器 sort:排序标准 direction:排序方向 page:页码 per_page:每页项目数| repo | | get-pull-request |获取拉取请求详细信息| owner:存储库所有者 repo:存储库名称 pull_number:拉取请求号| repo | | create-pull-request |创建新的pull请求| owner:存储库所有者 repo:存储库名称 title:PR标题 head:总行 base:基地分支 body:PR描述 draft:创建为PR草稿| repo | | merge-pull-request |合并拉取请求| owner:存储库所有者 repo:存储库名称 pull_number:拉取请求号 merge_method:合并方法 commit_title:提交标题 commit_message:提交消息| repo | | list-issues |在存储库中列出问题| owner:存储库所有者 repo:存储库名称 state:问题状态筛选器 sort:排序标准 direction:排序方向 page:页码 per_page:每页项目数| repo | | get-issue |获取问题详细信息| owner:存储库所有者 repo:存储库名称 issue_number:发行号| repo | | list-issue-comments |列出对问题或拉取请求的评论| owner:存储库所有者 repo:存储库名称 issue_number:问题/PR编号 page:页码 per_page:每页项目数| repo | | create-issue |创建新问题| owner:存储库所有者 repo:存储库名称 title:发行标题 body:发布正文内容 labels:标签名称数组 assignees:用户登录数组 milestone:里程碑ID| repo | | create-repository |创建新存储库| name:存储库名称 description:存储库描述 private:是否私人 auto_init:使用README进行初始化 gitignore_template:ad。环境 license_template:添加许可证 org:组织名称| repo | | update-repository |更新存储库设置| owner:存储库所有者 repo:存储库名称 description:新描述 private:更改隐私 default_branch:更改默认分支 has_issues:启用/禁用问题 has_projects:启用/禁用项目 has_wiki:启用/禁用wiki archived:存档/取消存档| repo | | delete-repository |删除存储库| owner:存储库所有者 repo:存储库名称 confirm:确认(必须为真)| delete_repo | | list-workflows |列出GitHub操作工作流| owner:存储库所有者 repo:存储库名称 page:页码 perPage:每页项目数| actions:read | | list-workflow-runs |列表工作流运行| owner:存储库所有者 repo:存储库名称 workflow_id:工作流ID/文件名 branch:按分支筛选 status:按状态筛选 page:页码 perPage:每页项目数| actions:read | | trigger-workflow |触发工作流| owner:存储库所有者 repo:存储库名称 workflow_id:工作流ID/文件名 ref:Git引用 inputs:工作流输入| actions:write | | get-license-info |获取GitHub Enterprise许可证信息|-| 需要site_admin(管理员)帐户 | | get-enterprise-stats |获取GitHub Enterprise系统统计信息|-| 需要site_admin(管理员)帐户 |

备注:用于企业特定的工具(get-license-info 和 get-enterprise-stats),一个用户 站点管理员 需要特权。建议使用经典个人访问令牌,因为细粒度令牌可能不支持这些企业级权限。

在游标中使用工具

一旦你设置了MCP服务器并配置了Cursor连接到它,你就可以直接在Cursor的AI聊天中使用GitHub Enterprise工具。以下是一些示例:

列出存储库

mcp_github_enterprise_list_repositories(owner="octocat")

获取存储库信息

mcp_github_enterprise_get_repository(owner="octocat", repo="hello-world")

列出拉取请求

mcp_github_enterprise_list_pull_requests(owner="octocat", repo="hello-world", state="open")

管理问题

# List issues
mcp_github_enterprise_list_issues(owner="octocat", repo="hello-world", state="all")
# Get issue details
mcp_github_enterprise_get_issue(owner="octocat", repo="hello-world", issue_number=1)

# Get issue/PR comments
mcp_github_enterprise_list_issue_comments(owner="octocat", repo="hello-world", issue_number=1)

# Create a new issue
mcp_github_enterprise_create_issue(
  owner="octocat", 
  repo="hello-world",
  title="Found a bug",
  body="Here is a description of the bug",
  labels=["bug", "important"]
)

使用存储库内容

mcp_github_enterprise_get_content(owner="octocat", repo="hello-world", path="README.md")

库管理

# Create a new repository
mcp_github_enterprise_create_repository(
  name="new-project",
  description="This is a new project",
  private=true,
  auto_init=true
)

# Update repository settings
mcp_github_enterprise_update_repository(
  owner="octocat",
  repo="hello-world",
  description="Updated description",
  has_issues=true
)

用户管理(仅限企业)

这些功能是专门为GitHub Enterprise Server环境设计的,需要管理权限:

# List all users in the GitHub Enterprise instance
mcp_github_enterprise_list_users(filter="active", per_page=100)

# Get a specific user's details
mcp_github_enterprise_get_user(username="octocat")

# Create a new user (Enterprise only)
mcp_github_enterprise_create_user(
  login="newuser",
  email="newuser@example.com",
  name="New User",
  company="ACME Inc."
)

# Update a user's information (Enterprise only)
mcp_github_enterprise_update_user(
  username="octocat",
  email="updated-email@example.com",
  location="San Francisco"
)

# Suspend a user (Enterprise only)
mcp_github_enterprise_suspend_user(
  username="octocat",
  reason="Violation of terms of service"
)

# Unsuspend a user (Enterprise only)
mcp_github_enterprise_unsuspend_user(username="octocat")

# List organizations a user belongs to
mcp_github_enterprise_list_user_orgs(username="octocat")

API改进

  • 灵活的API URL配置(支持各种环境变量和命令行参数)
  • 增强的错误处理和超时管理
  • 用户友好的响应格式和消息

贡献

欢迎投稿!请随时提交拉取请求。

许可证

国际协调委员会

工具与能力

工具数量

0

资源数量

0

提示词数量

0

能力标签

GitHub集成TypeScript本地部署MCP协议仓库管理问题跟踪Pull请求管理GitHubActions

支持客户端

Cursor

数量来自来源目录的标注,具体工具清单以官方文档为准。

典型使用场景

让助手直接读代码

把仓库、提交记录和 issue 交给模型检索,补全和重构时不用来回复制文件。

在对话里跑命令

触发构建、测试和脚本,执行结果直接回到上下文,省去切终端。

接进开发流程

把 PR、CI 状态和代码审查接进助手,减少在几个工具之间跳。

选择建议

值得选的地方

  • 只提供 0 个工具,职责集中,接入后不容易误操作。
  • 有现成的安装命令,不用自己找入口,照着跑就能起服务。
  • 3 个目录同时收录,信息可以交叉核对。

先想清楚的地方

  • stdio 方式要求本地装好 Docker,换机器要重新装一遍。
  • 需要自备访问 Token,没有凭据没法直接试。
  • 公开摘要偏短,具体能力和限制要回到仓库确认。

更适合

  • 需要在开发工具场景里让模型直接调用外部能力的人。
  • 已经在用 Cursor 的用户,接入路径最短。
  • 想先快速试一下、能接受在本地跑服务的人。

不太适合

  • 完全不想在本地装环境的人。
  • 暂时拿不到访问 Token的人。
  • 需要厂商级 SLA 和技术支持的生产环境。

同类对比

5 个同类
MCP Server工具数传输方式安装命令收录来源最后核验
GitHub Enterprise MCP

MCP World · 本页

0stdio有3 个2026-05-17
Git 838e2ec1

MCP World

12stdio有2 个2026-05-17
Markitdown MCP 2c653a5f

MCP World

1stdio有1 个2026-05-17
Context7 MCP C671e75a

MCP World

0stdio有1 个2026-05-17
Context7 831acf40

MCP World

0stdio有1 个2026-05-17

按同分类和工具数量挑出最接近的几条,字段以各自详情页为准。

常见问题

5 条

GitHub Enterprise MCP 怎么安装?

公开资料给出的安装命令是 docker run -p 3000:3000 \,运行环境为 Docker。装完后按客户端要求写进 MCP 配置,重启客户端生效。

GitHub Enterprise MCP 怎么在 Claude Desktop、Cursor 里配置?

它是stdio 本地进程,客户端配置里要写启动命令和参数,运行环境是 Docker;保存后完全退出客户端再打开,配置才会生效。

GitHub Enterprise MCP 收费吗?

本站只整理公开资料,不代收费用,也没有标注具体价格。是否收费取决于服务本身和背后的接口额度,正式使用前按官方说明确认。

GitHub Enterprise MCP 需要 API Key 吗?

公开资料标注的认证方式是访问 Token,也就是要先拿到凭据才能连上;凭据只填在自己本地的配置里,不要写进公开仓库。

GitHub Enterprise MCP 支持哪些客户端?

公开资料标注支持 Cursor;其他客户端只要能配置 MCP Server,也能用同样的命令或地址接入。

来源信息

继续浏览同类 MCP