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

The GitHub Enterprise MCP server provides a streamlined interface to access GitHub Enterprise resources like repositories, issues, and pull requests directly from Cursor. It works with GitHub Enterprise Server, GitHub.com, and GitHub Enterprise Cloud environments.

Prerequisites

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

Installation Options

Docker Installation

Using Docker

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:
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 the logs:
docker-compose logs -f
  1. Stop the container:
docker-compose down

Local Installation

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 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

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

Configuration Options

Language Configuration

Set the language to English (default) or Korean:

# Using environment variables
export LANGUAGE=ko

# Or using command-line arguments
node dist/index.js --language ko

HTTP Mode Options

node dist/index.js --debug --github-enterprise-url https://github.your-company.com/api/v3 --token your_github_token --language en

Connecting to Cursor

URL Mode (Recommended)

  1. Start the server:

    GITHUB_ENTERPRISE_URL="https://github.your-company.com/api/v3" GITHUB_TOKEN="your_github_token" node dist/index.js --transport http
    
  2. Configure Cursor by editing .cursor/mcp.json:

    {
      "mcpServers": {
        "github-enterprise": {
          "url": "http://localhost:3000/sse"
        }
      }
    }
    
  3. Restart Cursor

Command Mode

Edit your .cursor/mcp.json file:

{
  "mcpServers": {
    "github-enterprise": {
      "command": "npx",
      "args": [
        "@ddukbg/github-enterprise-mcp"
      ],
      "env": {
        "GITHUB_ENTERPRISE_URL": "https://github.your-company.com/api/v3",
        "GITHUB_TOKEN": "your_github_token"
      }
    }
  }
}

Using the MCP Tools

After setting up, you can use the following tools in Cursor's AI chat:

Repository Operations

// 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")

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

// Update repository settings
mcp_github_enterprise_update_repository(
  owner="octocat",
  repo="hello-world",
  description="Updated description",
  has_issues=true
)

Content Management

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

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)

// 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"]
)

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

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 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"
)

Workflow Operations

// 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 Operations (Requires Admin)

// Get license info
mcp_github_enterprise_get_license_info()

// Get enterprise stats
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