SuperAPI AI Directory

github-enterprise-mcp

GitHub Enterprise API integration.

Open website

About this tool

github-enterprise-mcp is an MCP (Model Context Protocol) server project developed by ddukbg on GitHub, used for integration with the GitHub Enterprise API. Through the MCP interface, it allows users to conveniently access repository information, issues, Pull Requests (PRs), and other content in GitHub Enterprise within AI tools such as Cursor.

Main purpose: This project is mainly aimed at the GitHub Enterprise Server environment, and is also suitable for GitHub Enterprise Cloud. Note that some enterprise-exclusive features (such as license information and enterprise statistics) are unavailable on GitHub.com or GitHub Enterprise Cloud.

Main capabilities:

  • Retrieve repository lists from a GitHub Enterprise instance
  • Get repository details
  • List repository branches
  • View file and directory contents
  • Manage issues and Pull Requests
  • Repository management (create, update, delete)
  • GitHub Actions workflow management
  • User management (list, create, update, delete, suspend/resume users)
  • Access enterprise statistics
  • Enhanced error handling and user-friendly response formatting

Usage: Prerequisites: Node.js 18 or higher, an accessible GitHub Enterprise instance, a personal access token (PAT).

Docker installation and setup:

  • 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 by default to run with --transport http; if you need to change this, you can override the command.
  • Create a .env file in the project root directory containing 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
  • View logs: docker-compose logs -f
  • Stop the container: docker-compose down

Development environment installation and setup:

  • Clone the repository and install dependencies: git clone https://github.com/ddukbg/github-enterprise-mcp.git cd github-enterprise-mcp npm install
  • Run the development server: export GITHUB_TOKEN="your_github_token" export GITHUB_ENTERPRISE_URL="https://github.your-company.com/api/v3" npm run dev This command will: automatically compile the TypeScript code when files change, restart the server when compiled files are updated, and run the server in HTTP mode to support URL-based connections.
  • Connect to Cursor using URL mode as described below.

Production environment installation and setup:

  • Build the project: npm run build, then chmod +x dist/index.js
  • Run the server: export GITHUB_TOKEN="your_github_token" export GITHUB_ENTERPRISE_URL="https://github.your-company.com/api/v3" node dist/index.js --transport http --debug
  • Connect to Cursor using URL mode: add the following to Cursor's .cursor/mcp.json file: { "mcpServers": { "github-enterprise": { "url": "http://localhost:3000/sse" } } }

Local development method: If the package has been published to the public npm registry, the npx method can also be used.

Integration with AI tools:

  • Add the relevant configuration in claude_desktop_config.json, replacing YOUR_GITHUB_TOKEN and YOUR_GITHUB_ENTERPRISE_URL with actual values.
  • In Cursor, it is recommended to use URL mode for the most reliable operation: Start the server in a separate terminal window: 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 Configure Cursor's MCP settings: open Cursor and go to Settings, navigate to AI > MCP Servers, edit the .cursor/mcp.json file: { "mcpServers": { "github-enterprise": { "url": "http://localhost:3000/sse" } } } Restart Cursor to apply the changes.
  • Alternatively, you can also configure Cursor to use command mode (URL mode is more reliable): click Add MCP Server and enter the following information: Name: GitHub Enterprise Command: npx Arguments: @ddukbg/github-enterprise-mcp Environment Variables: GITHUB_ENTERPRISE_URL: your GitHub Enterprise API URL GITHUB_TOKEN: your GitHub personal access token You can also manually edit the .cursor/mcp.json file for configuration.

Language configuration: This MCP server supports two languages, English and Korean, configurable via environment variables or command-line arguments. When not specified, the default language is English.

Additional options for HTTP mode:

  • --debug: enable debug logging
  • --github-enterprise-url <URL>: set the GitHub Enterprise API URL
  • --token <TOKEN>: set the GitHub personal access token
  • --language <LANG>: set the language (en or ko, default: en)

Available MCP tools: This MCP server provides the tools listed above. 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, because Fine-grained tokens may not support these enterprise-level permissions.

Using tools in Cursor: After setting up the MCP server and configuring the Cursor connection, you can use GitHub Enterprise tools directly in Cursor's AI chat, for example: list repositories, get repository information, list Pull Requests, manage issues, handle repository contents, repository management, user management (Enterprise only). These features are designed specifically for GitHub Enterprise Server environments and require administrator privileges.

API improvements:

  • Flexible API URL configuration (supports multiple environment variables and command-line arguments)
  • Enhanced error handling and timeout management
  • User-friendly response formats and messages