
GitHub-enterprise-mcp
概览
一个MCP(模型上下文协议)服务器,用于与GitHub Enterprise API集成。该服务器提供MCP接口,方便通过光标访问GitHub Enterprise的仓库信息、问题、PR等内容。 该项目主要面向GitHub企业服务器环境,但也支持: :一些企业专用功能(如许可信息和企业统计)无法在 GitHub.com 或GitHub Enterprise Cloud上使用。 - 从 GitHub Enterprise 实例中检索仓库列表 - 获取详细仓库信息 - 列出仓库分支 - 查看文件和目录内容 - 管理问题和拉取请求 - 仓库管理(创建、更新、删除) - GitHub Actions 工作流管理 - 用户管理(列表、创建、更新、删除、暂停/解除暂停用户) - 访问企业统计数据 - 增强错误处理和用户友好的响应格式 - 节点。
概述(AI 翻译)
一个MCP(模型上下文协议)服务器,用于与GitHub Enterprise API集成。该服务器提供MCP接口,方便通过光标访问GitHub Enterprise的仓库信息、问题、PR等内容。
兼容性
该项目主要面向GitHub企业服务器环境,但也支持:
- GitHub.com
- GitHub 企业云
注意:一些企业专用功能(如许可信息和企业统计)无法在 GitHub.com 或GitHub Enterprise Cloud上使用。
主要特色
- 从 GitHub Enterprise 实例中检索仓库列表
- 获取详细的存储库信息
- 列表存储库分支
- 查看文件和目录内容
- 管理问题和拉取请求
- 存储库管理(创建、更新、删除)
- GitHub Actions 工作流程管理
- 用户管理(列表、创建、更新、删除、暂停/解除暂停用户)
- 访问企业统计
- 增强错误处理和用户友好的响应格式
开始
先决条件
- Node.js 18岁及以上
- 访问GitHub Enterprise实例
- 个人访问令牌(PAT)
Docker 安装与设置
本页由 AI 翻译,技术细节请以原文为准。
README
以下为原文 README 节选,完整内容请查看原文。
GitHub Enterprise MCP Server
An MCP (Model Context Protocol) server for integration with GitHub Enterprise API. This server provides an MCP interface to easily access repository information, issues, PRs, and more from GitHub Enterprise in Cursor.
Compatibility
This project is primarily designed for GitHub Enterprise Server environments, but it also works with:
- GitHub.com
- GitHub Enterprise Cloud
Note: Some enterprise-specific features (like license information and enterprise statistics) will not work with GitHub.com or GitHub Enterprise Cloud.
Key Features
- Retrieve repository list from GitHub Enterprise instances
- Get detailed repository information
- List repository branches
- View file and directory contents
- Manage issues and pull requests
- Repository management (create, update, delete)
- GitHub Actions workflows management
- User management (list, create, update, delete, suspend/unsuspend users)
- Access enterprise statistics
- Enhanced error handling and user-friendly response formatting
Getting Started
Prerequisites
- Node.js 18 or higher
- Access to a GitHub Enterprise instance
- Personal Access Token (PAT)
Docker Installation and Setup
Option 1: Running with Docker
-
Build the Docker image:
docker build -t github-enterprise-mcp . -
Run the Docker container with environment variables:
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
Note: The Dockerfile is configured to run with
--transport httpby default. If you need to change this, you can override the command:
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
Option 2: Using Docker Compose
-
Create a
.envfile in the project root with the required environment variables:GITHUB_ENTERPRISE_URL=https://github.your-company.com/api/v3 GITHUB_TOKEN=your_github_token DEBUG=true -
Start the container with Docker Compose:
docker-compose up -d -
Check the logs:
docker-compose logs -f -
Stop the container:
docker-compose down
Installation and Setup
Local Development (Using Concurrent Mode)
安装
npx -y @ddukbg/github-enterprise-mcp --token=YOUR_GITHUB_TOKEN --github-enterprise-url=YOUR_GITHUB_ENTERPRISE_URL配置
{
"mcpServers": {
"github-enterprise": {
"url": "http://localhost:3000/sse"
}
}
}