GitHub MCP Server for Cursor: Setup & Config
GitHub MCP Server connects Cursor to repository content, issues, pull requests, and platform workflows.
What you can do with GitHub in Cursor
Give agents GitHub-native repository context and issue, review, workflow, and security operations.
- Explore repositories, files, and commit history through an assistant.
- Review security findings and Dependabot alerts.
- Coordinate discussions, notifications, and team project work.
Before you start: GitHub in Cursor
- Docker installed and running for local container execution
- An MCP-compatible host
- GitHub authentication and appropriate account permissions
The command uses the README's local PAT-based Docker example. The remote URL uses HTTP and supports OAuth where the host implements it, or PAT authentication. Grant only the permissions required for your tasks.
GitHub Cursor configuration
Choose Cursor configuration scope
For GitHub MCP Server, open Project: .cursor/mcp.json User: ~/.cursor/mcp.json. Merge into mcpServers at project or user scope.
Add GitHub MCP Server to Cursor
Use the github-mcp-server entry below in mcpServers. Keep GitHub MCP Server's documented stdio connection fields and your other Cursor entries.
Check GitHub MCP Server in Cursor
GitHub MCP Server: Enable in Cursor’s MCP settings; inspect tools.
Config file · Project: .cursor/mcp.json
User: ~/.cursor/mcp.json
{
"mcpServers": {
"github-mcp-server": {
"command": "docker",
"args": [
"run",
"-i",
"--rm",
"-e",
"GITHUB_PERSONAL_ACCESS_TOKEN",
"ghcr.io/github/github-mcp-server"
],
"env": {
"GITHUB_PERSONAL_ACCESS_TOKEN": "<your GitHub personal access token with appropriate permissions>"
}
}
}
}Troubleshooting GitHub in Cursor
- Cursor must find docker and a running Docker engine for GitHub MCP Server. Enable the project/user entry in MCP settings and inspect its tools.
- Review GITHUB_PERSONAL_ACCESS_TOKEN for GitHub MCP Server before sharing project .cursor/mcp.json; project scope travels with the repository.
- GitHub MCP Server uses stdio here: Cursor must keep the configured process running; protocol output belongs on stdout and diagnostics on stderr.
- Known limitation: OAuth support and configuration vary by MCP host.
- Known limitation: GitHub Enterprise Server cannot use the hosted remote service.
- Known limitation: Individual tool names are not stated in the supplied README excerpt.
- General Cursor troubleshooting lives in the /clients/cursor guide.
GitHub MCP Server — details. Cursor guide