GitHub Enterprise MCP Server
@piyushgIITian
MCP Server for the GitHub Enterprise APIs, enabling file operations, repository management, search functionality, and more.
Overview
What is GitHub Enterprise MCP Server?
The GitHub Enterprise MCP Server is a Model Context Protocol server that wraps the GitHub API, enabling file operations, repository management, search functionality, and more. It is designed for developers using Cline (VS Code extension or Claude Desktop) who want to perform GitHub operations through natural language commands.
How to use GitHub Enterprise MCP Server?
Clone the repository, run npm install and npm run build, then configure the MCP settings in Cline or Claude Desktop by adding a mcpServers entry with the path to dist/index.js, a GitHub Personal Access Token, and the GitHub API URL (for GitHub.com use https://api.github.com; for Enterprise use your instance URL). Restart Cline to apply changes. After setup, ask Cline to perform GitHub operations like searching repositories, creating files, or managing issues.
Key features of GitHub Enterprise MCP Server
- Automatic branch creation when creating or updating files
- Comprehensive error handling with clear messages
- Git history preservation without force pushing
- Batch operations for single-file and multi-file pushes
- Advanced search for code, issues/PRs, and users
Use cases of GitHub Enterprise MCP Server
- Create and update files in repositories directly from chat
- Search for repositories, code, issues, and users
- Manage issues: create, update, list, and comment
- Create pull requests and fork repositories
- Create new branches and repositories
FAQ from GitHub Enterprise MCP Server
What are the prerequisites for using the server?
Node.js must be installed, you need a GitHub Personal Access Token with appropriate permissions (e.g., repo scope for private repos), and Cline must be installed.
How do I configure the server for GitHub Enterprise vs github.com?
Set the GITHUB_API_URL environment variable to https://api.github.com for GitHub.com, or to your Enterprise instance URL (e.g., https://github.yourdomain.com/api/v3).
What environment variables are required?
You must set GITHUB_PERSONAL_ACCESS_TOKEN and GITHUB_API_URL. Optionally, GITHUB_API_VERSION can be set to specify the GitHub API version (e.g., 2022-11-28).
How does the server authenticate with GitHub?
Authentication is done via a GitHub Personal Access Token passed as the GITHUB_PERSONAL_ACCESS_TOKEN environment variable.
What transport does the server use?
The server runs as a child process via the node command with stdio transport, configured in the MCP settings.