GitHub MCP Server + Cursor IDE Setup Guide (2026)
Add the GitHub MCP server to Cursor IDE in 2026. Read repos, create PRs, search issues — all from AI chat. Copy-paste config for Mac, Windows & Linux.
GitHub MCP Server: Cursor IDE Setup Guide (2026)
The GitHub MCP server gives Cursor IDE direct access to your repositories — so your AI can browse issues, read PRs, search code, and even create commits without you ever leaving your editor.
What You Can Do
Prerequisites
repo scopeStep 1: Create a GitHub Personal Access Token
1. Go to github.com/settings/tokens
2. Click Generate new token (classic)
3. Name it "Cursor MCP"
4. Check the repo scope (required for private repos)
5. Click Generate token and copy it immediately
Step 2: Configure Cursor IDE
Open Cursor → Settings (Cmd/Ctrl + ,) → Search "MCP" → Edit MCP Settings
{
"mcpServers": {
"github": {
"command": "npx",
"args": ["-y", "@modelcontextprotocol/server-github"],
"env": {
"GITHUB_PERSONAL_ACCESS_TOKEN": "ghp_your_token_here"
}
}
}
}
Step 3: Restart and Test
Restart Cursor, open the AI chat (Cmd/Ctrl + L), and try:
> "List the open issues in my main repository"
You should see real GitHub issues returned instantly.
Power User Prompts
"Create a GitHub issue: Bug - login fails on mobile Safari"
"Show me all PRs waiting for my review"
"What files changed in the last merged PR?"
"Find all TODO comments across the codebase"
"Summarize the changes in PR #42"
For Organization Repos
If your repos live under a GitHub org, make sure your token has read:org scope as well:
{
"mcpServers": {
"github": {
"command": "npx",
"args": ["-y", "@modelcontextprotocol/server-github"],
"env": {
"GITHUB_PERSONAL_ACCESS_TOKEN": "ghp_your_token_here",
"GITHUB_ORG": "your-org-name"
}
}
}
}
Troubleshooting
401 Unauthorized — Your token has expired or doesn't have the right scopes. Regenerate it.
Can't see private repos — Make sure the repo scope is checked, not just public_repo.
Rate limits — GitHub's API allows 5,000 requests/hour with a token. You're unlikely to hit this in normal use.