docs/installation-guides/install-cursor.md
Uses GitHub's hosted server at https://api.githubcopilot.com/mcp/. Requires Cursor v0.48.0+ for Streamable HTTP support. While Cursor supports OAuth for some MCP servers, the GitHub server currently requires a Personal Access Token.
~/.cursor/mcp.json and enter the code block belowYOUR_GITHUB_PAT with your actual GitHub Personal Access Token{
"mcpServers": {
"github": {
"url": "https://api.githubcopilot.com/mcp/",
"headers": {
"Authorization": "Bearer YOUR_GITHUB_PAT"
}
}
}
}
The local GitHub MCP server runs via Docker and requires Docker Desktop to be installed and running.
~/.cursor/mcp.json and enter the code block belowYOUR_GITHUB_PAT with your actual GitHub Personal Access Token{
"mcpServers": {
"github": {
"command": "docker",
"args": [
"run",
"-i",
"--rm",
"-e",
"GITHUB_PERSONAL_ACCESS_TOKEN",
"ghcr.io/github/github-mcp-server"
],
"env": {
"GITHUB_PERSONAL_ACCESS_TOKEN": "YOUR_GITHUB_PAT"
}
}
}
}
Important: The npm package
@modelcontextprotocol/server-githubis no longer supported as of April 2025. Use the official Docker imageghcr.io/github/github-mcp-serverinstead.
~/.cursor/mcp.json.cursor/mcp.json in project rootdocker logout ghcr.io then retryghcr.io/github/github-mcp-server (official and supported)@modelcontextprotocol/server-github (deprecated as of April 2025 - no longer functional)mcpServers key