Back to MCP directory
publicPublicdnsLocal runtime

github-enterprise

GitHub企业版MCP服务,提供与GitHub Enterprise API集成的接口,支持仓库管理、问题跟踪、PR操作等功能,兼容多种GitHub环境。

article

README

🚀 GitHub 企业版 MCP 代理配置说明

GitHub 企业版 MCP(管理控制平面)代理是用于与 GitHub 企业版服务交互的接口。借助此代理,可在 Cursor 的 AI 聊天中直接使用 GitHub 企业版的功能,为开发者提供更便捷的操作体验。

🚀 快速开始

步骤如下

  1. 下载并安装 Node.js:请访问 Node.js 官方网站 下载并安装适合您操作系统的版本。
  2. 安装 MCP 代理依赖项
    npm install mcp-github-enterprise
    
  3. 启动 MCP 代理服务
    node index.js
    

✨ 主要特性

该代理可作为接口,实现与 GitHub 企业版服务的交互,让用户能在 Cursor 的 AI 聊天中直接使用 GitHub 企业版的各项功能。

📦 安装指南

安装 Node.js

访问 Node.js 官方网站,下载并安装适配您操作系统的版本。

安装 MCP 代理依赖项

执行以下命令:

npm install mcp-github-enterprise

启动 MCP 代理服务

运行以下命令启动服务:

node index.js

💻 使用示例

基础用法

在 Cursor 的 AI 聊天中直接调用以下函数即可实现各种 GitHub 企业版操作:

列举仓库

mcp_github_enterprise_list_repositories(owner="octocat")

获取仓库信息

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

列举_pull请求

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

管理问题

// 列举问题
mcp_github_enterprise_list_issues(owner="octocat", repo="hello-world", state="all")
// 获取问题详情
mcp_github_enterprise_get_issue(owner="octocat", repo="hello-world", issue_number=1)

// 获取问题/PR评论
mcp_github_enterprise_list_issue_comments(owner="octocat", repo="hello-world", issue_number=1)


// 创建新问题
mcp_github_enterprise_create_issue(
  owner="octocat", 
  repo="hello-world",
  title="发现一个bug",
  body="这是一个关于该bug的描述",
  labels=["bug", "重要"]
)

操作仓库内容

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

管理仓库设置

# 创建新仓库
mcp_github_enterprise_create_repository(
  name="new-project",
  description="这是一个新的项目",
  private=true,
  auto_init=true
)

# 更新仓库描述
mcp_github_enterprise_update_repository(
  owner="octocat",
  repo="hello-world",
  description="更新后的描述",
  has_issues=true
)

用户管理(仅限企业版)

这些功能专为 GitHub 企业版环境设计,需要具备管理员权限:

# 列举所有用户
mcp_github_enterprise_list_users(filter="active", per_page=100)

# 获取特定用户的详情
mcp_github_enterprise_get_user(username="octocat")

# 创建新用户(仅限企业版)
mcp_github_enterprise_create_user(
  login="newuser",
  email="newuser@example.com",
  name="新用户",
  company="ACME 公司"
)

# 更新用户信息(仅限企业版)
mcp_github_enterprise_update_user(
  username="octocat",
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