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.
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: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
docker-compose down
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
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
node dist/index.js --debug --github-enterprise-url https://github.your-company.com/api/v3 --token your_github_token --language en
Start the server:
GITHUB_ENTERPRISE_URL="https://github.your-company.com/api/v3" GITHUB_TOKEN="your_github_token" node dist/index.js --transport http
Configure Cursor by editing .cursor/mcp.json
:
{
"mcpServers": {
"github-enterprise": {
"url": "http://localhost:3000/sse"
}
}
}
Restart Cursor
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"
}
}
}
}
After setting up, you can use the following tools in Cursor's AI chat:
// 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
)
// Get file content
mcp_github_enterprise_get_content(owner="octocat", repo="hello-world", path="README.md")
// 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)
// 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"
)
// 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 info
mcp_github_enterprise_get_license_info()
// Get enterprise stats
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