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.
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
.env
file with your configuration:GITHUB_ENTERPRISE_URL=https://github.your-company.com/api/v3
GITHUB_TOKEN=your_github_token
DEBUG=true
docker-compose up -d
docker-compose logs -f
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
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
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
Add the following to your .cursor/mcp.json
file:
{
"mcpServers": {
"github-enterprise": {
"url": "http://localhost:3000/sse"
}
}
}
Set language preference (English or Korean) using:
# Environment variable
export LANGUAGE=ko
# Or as command-line argument
node dist/index.js --language ko
Once configured, you can use the following tools directly in Cursor:
// 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
)
// 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"
)
// 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"]
)
// 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"
)
// Get license information
mcp_github_enterprise_get_license_info()
// Get enterprise statistics
mcp_github_enterprise_get_enterprise_stats()
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.
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.
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"
}
}
}
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.
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.
To add this MCP server to Claude Desktop:
1. Find your configuration file:
~/Library/Application Support/Claude/claude_desktop_config.json
%APPDATA%\Claude\claude_desktop_config.json
~/.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