Github Enterprise

Github Enterprise

🚀 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",
  • 0 关注
  • 0 收藏,8 浏览
  • system 提出于 2025-09-27 06:21

相似服务问题