GitHub Enterprise MCP server

Bridges GitHub Enterprise with natural language interaction, enabling repository management, issue tracking, and code access for streamlined development workflows without leaving your assistant interface.
Back to servers
Setup instructions
Provider
ddukbg
Release date
Mar 24, 2025
Language
TypeScript
Stats
21 stars

GitHub Enterprise MCP Server provides a Model Context Protocol interface for integrating with GitHub Enterprise API, allowing easy access to repository information, issues, pull requests, and more directly from Cursor. It works with GitHub Enterprise Server, GitHub.com, and GitHub Enterprise Cloud.

Installation Options

Docker Installation

Using Docker Run

docker build -t github-enterprise-mcp .
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

To override the default transport settings:

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

Using Docker Compose

  1. Create a .env file with your configuration:
GITHUB_ENTERPRISE_URL=https://github.your-company.com/api/v3
GITHUB_TOKEN=your_github_token
DEBUG=true
  1. Start the container:
docker-compose up -d
  1. Check logs if needed:
docker-compose logs -f

Local Installation

Prerequisites

  • Node.js 18 or higher
  • Access to a GitHub Enterprise instance
  • Personal Access Token (PAT)

Development Mode

git clone https://github.com/ddukbg/github-enterprise-mcp.git
cd github-enterprise-mcp
npm install
export GITHUB_TOKEN="your_github_token"
export GITHUB_ENTERPRISE_URL="https://github.your-company.com/api/v3"
npm run dev

Production Setup (URL Mode)

git clone https://github.com/ddukbg/github-enterprise-mcp.git
cd github-enterprise-mcp
npm install
npm run build
chmod +x dist/index.js
export GITHUB_TOKEN="your_github_token"
export GITHUB_ENTERPRISE_URL="https://github.your-company.com/api/v3"
node dist/index.js --transport http --debug

Global Installation

git clone https://github.com/ddukbg/github-enterprise-mcp.git
cd github-enterprise-mcp
npm install
npm run build
chmod +x dist/index.js
npm link
export GITHUB_TOKEN="your_github_token"
export GITHUB_ENTERPRISE_URL="https://github.your-company.com/api/v3"
github-enterprise-mcp --transport=http --debug

Integration with AI Tools

Configuring with Cursor (Recommended Method)

Add the following to your .cursor/mcp.json file:

{
  "mcpServers": {
    "github-enterprise": {
      "url": "http://localhost:3000/sse"
    }
  }
}

Language Configuration

Set language preference (English or Korean) using:

# Environment variable
export LANGUAGE=ko

# Or as command-line argument
node dist/index.js --language ko

Using the MCP Tools

Once configured, you can use the following tools directly in Cursor:

Repository Management

// List repositories
mcp_github_enterprise_list_repositories(owner="octocat")

// Get repository details
mcp_github_enterprise_get_repository(owner="octocat", repo="hello-world")

// List branches
mcp_github_enterprise_list_branches(owner="octocat", repo="hello-world")

// Get file contents
mcp_github_enterprise_get_content(owner="octocat", repo="hello-world", path="README.md")

// Create a new repository
mcp_github_enterprise_create_repository(
  name="new-project",
  description="This is a new project",
  private=true,
  auto_init=true
)

Pull Request Management

// List pull requests
mcp_github_enterprise_list_pull_requests(owner="octocat", repo="hello-world", state="open")

// Get pull request details
mcp_github_enterprise_get_pull_request(owner="octocat", repo="hello-world", pull_number=1)

// Create a new pull request
mcp_github_enterprise_create_pull_request(
  owner="octocat", 
  repo="hello-world",
  title="Fix bug in login flow",
  head="bugfix-branch",
  base="main",
  body="This PR fixes the login issue"
)

// Merge a pull request
mcp_github_enterprise_merge_pull_request(
  owner="octocat",
  repo="hello-world",
  pull_number=1,
  merge_method="merge"
)

Issue Management

// List issues
mcp_github_enterprise_list_issues(owner="octocat", repo="hello-world", state="all")

// Get issue details
mcp_github_enterprise_get_issue(owner="octocat", repo="hello-world", issue_number=1)

// List issue comments
mcp_github_enterprise_list_issue_comments(owner="octocat", repo="hello-world", issue_number=1)

// Create a new issue
mcp_github_enterprise_create_issue(
  owner="octocat", 
  repo="hello-world",
  title="Found a bug",
  body="Here is a description of the bug",
  labels=["bug", "important"]
)

GitHub Actions Workflows

// List workflows
mcp_github_enterprise_list_workflows(owner="octocat", repo="hello-world")

// List workflow runs
mcp_github_enterprise_list_workflow_runs(owner="octocat", repo="hello-world", workflow_id="main.yml")

// Trigger a workflow
mcp_github_enterprise_trigger_workflow(
  owner="octocat",
  repo="hello-world",
  workflow_id="main.yml",
  ref="main"
)

Enterprise Administration (Requires site_admin)

// Get license information
mcp_github_enterprise_get_license_info()

// Get enterprise statistics
mcp_github_enterprise_get_enterprise_stats()

How to install this MCP server

For Claude Code

To add this MCP server to Claude Code, run this command in your terminal:

claude mcp add-json "github-enterprise" '{"url":"http://localhost:3000/sse"}'

See the official Claude Code MCP documentation for more details.

For Cursor

There are two ways to add an MCP server to Cursor. The most common way is to add the server globally in the ~/.cursor/mcp.json file so that it is available in all of your projects.

If you only need the server in a single project, you can add it to the project instead by creating or adding it to the .cursor/mcp.json file.

Adding an MCP server to Cursor globally

To add a global MCP server go to Cursor Settings > Tools & Integrations and click "New MCP Server".

When you click that button the ~/.cursor/mcp.json file will be opened and you can add your server like this:

{
    "mcpServers": {
        "github-enterprise": {
            "url": "http://localhost:3000/sse"
        }
    }
}

Adding an MCP server to a project

To add an MCP server to a project you can create a new .cursor/mcp.json file or add it to the existing one. This will look exactly the same as the global MCP server example above.

How to use the MCP server

Once the server is installed, you might need to head back to Settings > MCP and click the refresh button.

The Cursor agent will then be able to see the available tools the added MCP server has available and will call them when it needs to.

You can also explicitly ask the agent to use the tool by mentioning the tool name and describing what the function does.

For Claude Desktop

To add this MCP server to Claude Desktop:

1. Find your configuration file:

  • macOS: ~/Library/Application Support/Claude/claude_desktop_config.json
  • Windows: %APPDATA%\Claude\claude_desktop_config.json
  • Linux: ~/.config/Claude/claude_desktop_config.json

2. Add this to your configuration file:

{
    "mcpServers": {
        "github-enterprise": {
            "url": "http://localhost:3000/sse"
        }
    }
}

3. Restart Claude Desktop for the changes to take effect

Want to 10x your AI skills?

Get a free account and learn to code + market your apps using AI (with or without vibes!).

Nah, maybe later