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. This project is primarily designed for GitHub Enterprise Server environments, but it also works with: - GitHub.com - GitHub Enterprise Cloud - Retrieve repository list from GitHub En
Add this skill
npx mdskills install ddukbg/github-enterprise-mcpComprehensive GitHub Enterprise MCP server with extensive tools and clear setup documentation
1[](https://mseep.ai/app/containerelic-github-enterprise-mcp)23[](https://archestra.ai/mcp-catalog/ddukbg__github-enterprise-mcp)45# GitHub Enterprise MCP Server6789An 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.1011## Compatibility1213This project is primarily designed for GitHub Enterprise Server environments, but it also works with:1415- GitHub.com16- GitHub Enterprise Cloud1718> **Note**: Some enterprise-specific features (like license information and enterprise statistics) will not work with GitHub.com or GitHub Enterprise Cloud.1920## Key Features2122- Retrieve repository list from GitHub Enterprise instances23- Get detailed repository information24- List repository branches25- View file and directory contents26- Manage issues and pull requests27- Repository management (create, update, delete)28- GitHub Actions workflows management29- User management (list, create, update, delete, suspend/unsuspend users)30- Access enterprise statistics31- Enhanced error handling and user-friendly response formatting3233## Getting Started3435### Prerequisites3637- Node.js 18 or higher38- Access to a GitHub Enterprise instance39- Personal Access Token (PAT)4041### Docker Installation and Setup4243#### Option 1: Running with Docker44451. Build the Docker image:4647 ```bash48 docker build -t github-enterprise-mcp .49 ```50512. Run the Docker container with environment variables:5253 ```bash54 docker run -p 3000:3000 \55 -e GITHUB_TOKEN="your_github_token" \56 -e GITHUB_ENTERPRISE_URL="https://github.your-company.com/api/v3" \57 -e DEBUG=true \58 github-enterprise-mcp59 ```6061> **Note**: The Dockerfile is configured to run with `--transport http` by default. If you need to change this, you can override the command:6263```bash64docker run -p 3000:3000 \65 -e GITHUB_TOKEN="your_github_token" \66 -e GITHUB_ENTERPRISE_URL="https://github.your-company.com/api/v3" \67 -e DEBUG=true \68 github-enterprise-mcp node dist/index.js --transport http --debug69```7071#### Option 2: Using Docker Compose72731. Create a `.env` file in the project root with the required environment variables:7475 ```shell76 GITHUB_ENTERPRISE_URL=https://github.your-company.com/api/v377 GITHUB_TOKEN=your_github_token78 DEBUG=true79 ```80812. Start the container with Docker Compose:8283 ```bash84 docker-compose up -d85 ```86873. Check the logs:8889 ```bash90 docker-compose logs -f91 ```92934. Stop the container:9495 ```bash96 docker-compose down97 ```9899### Installation and Setup100101#### Local Development (Using Concurrent Mode)102103This method is recommended for active development with automatic recompilation and server restarts:1041051. Clone the repository and install required packages:106107 ```bash108 git clone https://github.com/ddukbg/github-enterprise-mcp.git109 cd github-enterprise-mcp110 npm install111 ```1121132. Run the development server:114115 ```bash116 export GITHUB_TOKEN="your_github_token"117 export GITHUB_ENTERPRISE_URL="https://github.your-company.com/api/v3"118 npm run dev119 ```120121 This will:122 - Compile TypeScript code automatically when files change123 - Restart the server when compiled files are updated124 - Run the server in HTTP mode for URL-based connections1251263. Connect to Cursor using URL mode as described below127128### Installation and Setup for Production129130#### Option 1: Using URL Mode (Recommended for Local Development)131132This method is the most stable and recommended for local development or testing:1331341. Clone the repository and install required packages:135136 ```bash137 git clone https://github.com/ddukbg/github-enterprise-mcp.git138 cd github-enterprise-mcp139 npm install140 ```1411422. Build the project:143144 ```bash145 npm run build146 chmod +x dist/index.js147 ```1481493. Run the server:150151 ```bash152 export GITHUB_TOKEN="your_github_token"153 export GITHUB_ENTERPRISE_URL="https://github.your-company.com/api/v3"154 node dist/index.js --transport http --debug155 ```1561574. Connect to Cursor using URL mode:158 - Add the following to your Cursor's `.cursor/mcp.json` file:159160 ```json161 {162 "mcpServers": {163 "github-enterprise": {164 "url": "http://localhost:3000/sse"165 }166 }167 }168 ```169170#### Option 2: Install as a Global Command (npm link)171172This method is useful for local development:173174```bash175# After cloning the repository176git clone https://github.com/ddukbg/github-enterprise-mcp.git177cd github-enterprise-mcp178179# Install required packages180npm install181182# Build183npm run build184chmod +x dist/index.js185186# Link globally187npm link188189# Run as a global command190export GITHUB_TOKEN="your_github_token"191export GITHUB_ENTERPRISE_URL="https://github.your-company.com/api/v3"192github-enterprise-mcp --transport=http --debug193```194195#### Option 3: Using npx (When Package is Published)196197If the package is published to the public npm registry:198199```bash200npx @ddukbg/github-enterprise-mcp --token=your_github_token --github-enterprise-url=https://github.your-company.com/api/v3201```202203## Integration with AI Tools204205### Claude Desktop206207Add the following to your `claude_desktop_config.json`:208209```json210{211 "mcpServers": {212 "github-enterprise": {213 "command": "npx",214 "args": ["-y", "@ddukbg/github-enterprise-mcp", "--token=YOUR_GITHUB_TOKEN", "--github-enterprise-url=YOUR_GITHUB_ENTERPRISE_URL"]215 }216 }217}218```219220Replace `YOUR_GITHUB_TOKEN` and `YOUR_GITHUB_ENTERPRISE_URL` with your actual values.221222### Cursor223224#### Recommended: URL Mode (Most Stable)225226For the most reliable operation in Cursor, using URL mode is recommended:2272281. Start the server in a separate terminal window:229230 ```bash231 cd /path/to/github-enterprise-mcp232 GITHUB_ENTERPRISE_URL="https://github.your-company.com/api/v3" GITHUB_TOKEN="your_github_token" node dist/index.js --transport http233 ```2342352. Configure Cursor's MCP settings:236 - Open Cursor and go to **Settings**237 - Navigate to **AI > MCP Servers**238 - Edit your `.cursor/mcp.json` file:239240 ```json241 {242 "mcpServers": {243 "github-enterprise": {244 "url": "http://localhost:3000/sse"245 }246 }247 }248 ```2492503. Restart Cursor to apply the changes251252#### Alternative: Command Mode253254Alternatively, you can configure Cursor to use the command mode, although URL mode is more reliable:2552561. Open Cursor and go to **Settings**2572. Navigate to **AI > MCP Servers**2583. Click **Add MCP Server**2594. Enter the following details:260 - **Name**: GitHub Enterprise261 - **Command**: `npx`262 - **Arguments**: `@ddukbg/github-enterprise-mcp`263 - **Environment Variables**:264 - `GITHUB_ENTERPRISE_URL`: Your GitHub Enterprise API URL265 - `GITHUB_TOKEN`: Your GitHub personal access token266267Alternatively, you can manually edit your `.cursor/mcp.json` file to include:268269```json270{271 "mcpServers": {272 "github-enterprise": {273 "command": "npx",274 "args": [275 "@ddukbg/github-enterprise-mcp"276 ],277 "env": {278 "GITHUB_ENTERPRISE_URL": "https://github.your-company.com/api/v3",279 "GITHUB_TOKEN": "your_github_token"280 }281 }282 }283}284```285286## Language Configuration287288This MCP server supports both English and Korean languages. You can configure the language using:289290### Environment Variables291292```bash293# Set language to Korean294export LANGUAGE=ko295296# Or in .env file297LANGUAGE=ko298```299300### Command-line Arguments301302```bash303# Set language to Korean304node dist/index.js --language ko305```306307The default language is English if not specified.308309## Additional Options in HTTP Mode310311- `--debug`: Enable debug logging312- `--github-enterprise-url <URL>`: Set GitHub Enterprise API URL313- `--token <TOKEN>`: Set GitHub Personal Access Token314- `--language <LANG>`: Set language (en or ko, default: en)315316## Available MCP Tools317318This MCP server provides the following tools:319320| Tool Name | Description | Parameters | Required PAT Permissions |321|---|---|---|---|322| `list-repositories` | Retrieve repository list for a user or organization | `owner`: Username/org name<br>`isOrg`: Whether it's an organization<br>`type`: Repository type<br>`sort`: Sort criteria<br>`page`: Page number<br>`perPage`: Items per page | `repo` |323| `get-repository` | Get detailed repository information | `owner`: Repository owner<br>`repo`: Repository name | `repo` |324| `list-branches` | List branches of a repository | `owner`: Repository owner<br>`repo`: Repository name<br>`protected_only`: Whether to show only protected branches<br>`page`: Page number<br>`perPage`: Items per page | `repo` |325| `get-content` | Retrieve file or directory contents | `owner`: Repository owner<br>`repo`: Repository name<br>`path`: File/directory path<br>`ref`: Branch/commit (optional) | `repo` |326| `list-pull-requests` | List pull requests in a repository | `owner`: Repository owner<br>`repo`: Repository name<br>`state`: PR state filter<br>`sort`: Sort criteria<br>`direction`: Sort direction<br>`page`: Page number<br>`per_page`: Items per page | `repo` |327| `get-pull-request` | Get pull request details | `owner`: Repository owner<br>`repo`: Repository name<br>`pull_number`: Pull request number | `repo` |328| `create-pull-request` | Create a new pull request | `owner`: Repository owner<br>`repo`: Repository name<br>`title`: PR title<br>`head`: Head branch<br>`base`: Base branch<br>`body`: PR description<br>`draft`: Create as draft PR | `repo` |329| `merge-pull-request` | Merge a pull request | `owner`: Repository owner<br>`repo`: Repository name<br>`pull_number`: Pull request number<br>`merge_method`: Merge method<br>`commit_title`: Commit title<br>`commit_message`: Commit message | `repo` |330| `list-issues` | List issues in a repository | `owner`: Repository owner<br>`repo`: Repository name<br>`state`: Issue state filter<br>`sort`: Sort criteria<br>`direction`: Sort direction<br>`page`: Page number<br>`per_page`: Items per page | `repo` |331| `get-issue` | Get issue details | `owner`: Repository owner<br>`repo`: Repository name<br>`issue_number`: Issue number | `repo` |332| `list-issue-comments` | List comments on an issue or pull request | `owner`: Repository owner<br>`repo`: Repository name<br>`issue_number`: Issue/PR number<br>`page`: Page number<br>`per_page`: Items per page | `repo` |333| `create-issue` | Create a new issue | `owner`: Repository owner<br>`repo`: Repository name<br>`title`: Issue title<br>`body`: Issue body content<br>`labels`: Array of label names<br>`assignees`: Array of user logins<br>`milestone`: Milestone ID | `repo` |334| `create-repository` | Create a new repository | `name`: Repository name<br>`description`: Repository description<br>`private`: Whether private<br>`auto_init`: Initialize with README<br>`gitignore_template`: Add .gitignore<br>`license_template`: Add license<br>`org`: Organization name | `repo` |335| `update-repository` | Update repository settings | `owner`: Repository owner<br>`repo`: Repository name<br>`description`: New description<br>`private`: Change privacy<br>`default_branch`: Change default branch<br>`has_issues`: Enable/disable issues<br>`has_projects`: Enable/disable projects<br>`has_wiki`: Enable/disable wiki<br>`archived`: Archive/unarchive | `repo` |336| `delete-repository` | Delete a repository | `owner`: Repository owner<br>`repo`: Repository name<br>`confirm`: Confirmation (must be true) | `delete_repo` |337| `list-workflows` | List GitHub Actions workflows | `owner`: Repository owner<br>`repo`: Repository name<br>`page`: Page number<br>`perPage`: Items per page | `actions:read` |338| `list-workflow-runs` | List workflow runs | `owner`: Repository owner<br>`repo`: Repository name<br>`workflow_id`: Workflow ID/filename<br>`branch`: Filter by branch<br>`status`: Filter by status<br>`page`: Page number<br>`perPage`: Items per page | `actions:read` |339| `trigger-workflow` | Trigger a workflow | `owner`: Repository owner<br>`repo`: Repository name<br>`workflow_id`: Workflow ID/filename<br>`ref`: Git reference<br>`inputs`: Workflow inputs | `actions:write` |340| `get-license-info` | Get GitHub Enterprise license information | - | **Requires site_admin (Administrator) account** |341| `get-enterprise-stats` | Get GitHub Enterprise system statistics | - | **Requires site_admin (Administrator) account** |342343> **Note**: For Enterprise-specific tools (`get-license-info` and `get-enterprise-stats`), a user with **site administrator** privileges is required. A Classic Personal Access Token is recommended, as Fine-grained tokens may not support these Enterprise-level permissions.344345## Using the Tools in Cursor346347Once you have set up the MCP server and configured Cursor to connect to it, you can use the GitHub Enterprise tools directly in Cursor's AI chat. Here are some examples:348349### Listing Repositories350351```js352mcp_github_enterprise_list_repositories(owner="octocat")353```354355### Getting Repository Information356357```js358mcp_github_enterprise_get_repository(owner="octocat", repo="hello-world")359```360361### Listing Pull Requests362363```js364mcp_github_enterprise_list_pull_requests(owner="octocat", repo="hello-world", state="open")365```366367### Managing Issues368369```js370# List issues371mcp_github_enterprise_list_issues(owner="octocat", repo="hello-world", state="all")372# Get issue details373mcp_github_enterprise_get_issue(owner="octocat", repo="hello-world", issue_number=1)374375# Get issue/PR comments376mcp_github_enterprise_list_issue_comments(owner="octocat", repo="hello-world", issue_number=1)377378379# Create a new issue380mcp_github_enterprise_create_issue(381 owner="octocat",382 repo="hello-world",383 title="Found a bug",384 body="Here is a description of the bug",385 labels=["bug", "important"]386)387```388389### Working with Repository Content390391```js392mcp_github_enterprise_get_content(owner="octocat", repo="hello-world", path="README.md")393```394395### Repository Management396397```398# Create a new repository399mcp_github_enterprise_create_repository(400 name="new-project",401 description="This is a new project",402 private=true,403 auto_init=true404)405406# Update repository settings407mcp_github_enterprise_update_repository(408 owner="octocat",409 repo="hello-world",410 description="Updated description",411 has_issues=true412)413```414415### User Management (Enterprise Only)416417These features are specifically designed for GitHub Enterprise Server environments and require administrative permissions:418419```js420# List all users in the GitHub Enterprise instance421mcp_github_enterprise_list_users(filter="active", per_page=100)422423# Get a specific user's details424mcp_github_enterprise_get_user(username="octocat")425426# Create a new user (Enterprise only)427mcp_github_enterprise_create_user(428 login="newuser",429 email="newuser@example.com",430 name="New User",431 company="ACME Inc."432)433434# Update a user's information (Enterprise only)435mcp_github_enterprise_update_user(436 username="octocat",437 email="updated-email@example.com",438 location="San Francisco"439)440441# Suspend a user (Enterprise only)442mcp_github_enterprise_suspend_user(443 username="octocat",444 reason="Violation of terms of service"445)446447# Unsuspend a user (Enterprise only)448mcp_github_enterprise_unsuspend_user(username="octocat")449450# List organizations a user belongs to451mcp_github_enterprise_list_user_orgs(username="octocat")452```453454## API Improvements455456- Flexible API URL configuration (supports various environment variables and command-line arguments)457- Enhanced error handling and timeout management458- User-friendly response formatting and messages459460## Contributing461462Contributions are welcome! Please feel free to submit a Pull Request.463464## License465466ISC467
Full transparency — inspect the skill content before installing.