
Add the GitHub MCP server to Cursor
Add GitHub to Cursor with a one-click link, then paste a personal access token. GitHub sign-in does not work with the hosted server in Cursor.
Click GitHub's install link in Cursor, paste a personal access token, and restart Cursor. Cursor cannot sign in to GitHub's hosted server, so the token is the one thing you must make first. Cursor asks before each GitHub action by default, so keep that on. If you want browser sign-in instead of a token, the local Docker method supports it.
Good for
- Cursor users who want the agent to read repos, issues and pull requests
- Developers who want pull requests and reviews handled from the chat
- Teams who need to keep tokens out of a shared project config
- Anyone who prefers a local Docker server with browser sign-in
Add GitHub to Cursor
Cursor
- 1
Open the link and confirm in Cursor.
Add to Cursor (hosted, PAT) - 2
Sign in to GitHub when Cursor asks.
Requires GitHub personal access token, Cursor 0.48.0+.
Read-only mode: Change the server address to https://api.githubcopilot.com/mcp/readonly, or keep the normal address and add "X-MCP-Readonly": "true" under headers. For Docker, add GITHUB_READ_ONLY=1 to env.
Pick the first method unless you want it local. Cursor cannot sign in to the hosted server with GitHub, so you need a personal access token. To keep the token out of the file, set the header to "Authorization": "Bearer ${env:NAME}" and start Cursor from a terminal that has that variable (on macOS, launchctl setenv also works). It worked when the Cursor MCP settings show a green dot next to github. Then ask: "List my GitHub repositories". For errors, open the Output panel (Cmd+Shift+U or Ctrl+Shift+U) and pick MCP Logs. The Docker OAuth method is the only one with browser sign-in, and it needs port 8085 free.
From the project README. Source.
Common errors and fixes
Cursor shows the server drop right after it connects, with "Client error: terminated" (Windows)
Cause: The hosted GitHub server connects, then Cursor loses the connection about half a second later on Windows.
Fix: Cursor staff suggest adding "http.fetchAdditionalSupport": false to your user settings JSON, then fully quit and reopen Cursor. This is not yet confirmed to fix it.
cursor Source
Incompatible auth server: does not support dynamic client registration
Cause: Cursor starts GitHub sign-in before it sends your token header, and GitHub does not support that kind of sign-in.
Fix: Check that the token and the Authorization header are right. Some users fixed it by re-authorising the token.
cursor Source
GitHub rejects the request when the token comes from an environment variable
Cause: Cursor cannot see the variable at startup, so it sends the header without a token.
Fix: Start Cursor from a terminal that has the variable, or set it system-wide (macOS: launchctl setenv). Then fully restart Cursor.
cursor Source
Creating a pull request hangs and the agent keeps waiting
Cause: GitHub's server may open a pull request form first, and Cursor's agent never shows it.
Fix: Add the header X-MCP-Features: mcp_apps_disable_form_deferral to the github entry, or let the agent run gh pr create.
cursor Source
The marketplace GitHub plugin never opens a GitHub sign-in page
Cause: GitHub's sign-in server cannot register Cursor as an app, so the plugin has nothing to open.
Fix: Add the server yourself in mcp.json with a personal access token header.
cursor Source
Docker setup fails with GITHUB_PERSONAL_ACCESS_TOKEN not set
Cause: Your Docker image is older than the browser sign-in feature.
Fix: Run docker pull ghcr.io/github/github-mcp-server, then restart Cursor.
cursor Source
Permissions
High risk
In Cursor, GitHub can push code, merge pull requests and delete things if you let the agent run without asking. Keep Cursor's approval prompts on and use read-only mode unless you need to write.
What it can do
- Read your data
- Create and change things
- Delete things
- Read-only modeHow to turn it on
Watch out for
Run Everything lets it push and merge without asking
Cursor asks before each MCP call by default, but in Run Everything mode every GitHub tool call runs on its own. Use Auto-review or Allowlist, plus read-only mode. cursor.com
The token sits in plain text in mcp.json
GitHub's Cursor setup pastes the token into the file. Use Bearer ${env:NAME} instead, and keep tokens out of a project .cursor/mcp.json that gets committed. cursor.com
Auto-review is not a security boundary
Cursor says its Auto-review check can allow a call you would have blocked. Do not rely on it alone for repos that matter. cursor.com
Admins can allowlist servers and tools
Cursor Enterprise admins can approve the GitHub server by URL and limit which of its tools run automatically, under Team Settings > MCP Configuration. cursor.com
Security advisories
2 known advisories, all fixed in a newer version.
- A badly formed request could crash the server before anyone signed in.high · Fixed in 1.1.0 · GHSA-w4q6-qw23-4rg7 (CVE-2026-47427)
- On a server shared by several people with lockdown mode on, later users got the first user's lockdown checks.medium · Fixed in 1.1.2 · GHSA-pjp5-fpmr-3349 (CVE-2026-48529)
Technical details
| Turning on read-only | In Cursor's mcp.json use https://api.githubcopilot.com/mcp/readonly as the url, or add "X-MCP-Readonly": "true" under headers. Locally, add GITHUB_READ_ONLY=1 to the Docker env. |
|---|---|
| Talks to | api.githubcopilot.com |
| Sign-in and keys | The token sits in mcp.json unless you use an environment variable reference. |
Works in
Cursor works with GitHub's server, but setup needs a token and a few problems are still open.
Tap an app to see how to set it up and any known problems.
Cursor
Has issuesGitHub documents Cursor setup, but it needs a token, and Windows and pull request creation have open problems.
Known problems
- Open
On Windows the server connects, then drops half a second later with a terminated error
Workaround: Cursor staff suggest setting "http.fetchAdditionalSupport": false in user settings and quitting Cursor. Not confirmed.
Since Oct 2026 · forum.cursor.com
- Open
Creating a pull request stalls: the agent waits for a form that Cursor never shows
Workaround: Add header X-MCP-Features: mcp_apps_disable_form_deferral, or let the agent use gh pr create.
Since Oct 2026 · GitHub
- Open
The Cursor marketplace GitHub plugin never opens the GitHub sign-in page
Workaround: Add the server yourself in mcp.json with a personal access token header.
Since Sep 2026 · GitHub
- Open
Cursor tries a GitHub sign-in even though a token is set, then fails with a client registration error
Workaround: Re-authorise the token, or put a local proxy in front that returns 404 for /.well-known/oauth-* paths.
Since Mar 2026 · forum.cursor.com
- Closed
Token set as an environment variable is not picked up, so GitHub rejects the header
Workaround: Start Cursor from a terminal that has the variable, or set it system-wide (macOS: launchctl setenv).
Reported Mar 2026 · forum.cursor.com
Questions
Can I sign in with GitHub instead of using a token in Cursor?
Not with the hosted server. GitHub's guide says it needs a personal access token in Cursor. The local Docker method can open a browser sign-in instead.
Why does Cursor say "Incompatible auth server: does not support dynamic client registration"?
Cursor tried a GitHub sign-in instead of using your token, and GitHub does not support that. Check the token and header first. Some users fixed it by re-authorising the token.
Where is the GitHub config file in Cursor?
Use ~/.cursor/mcp.json to make GitHub available in every project, or .cursor/mcp.json in a project root for that project only. Both use the same format.
How do I keep my GitHub token out of mcp.json?
Set the header to Bearer ${env:NAME} and make sure Cursor can see that variable at startup. Start Cursor from that terminal, or set it system-wide (macOS: launchctl setenv). A separate env file does not work for remote servers.
How do I check that GitHub is connected in Cursor?
Fully quit and reopen Cursor, then look for a green dot next to github in the MCP settings. Try "List my GitHub repositories". For errors, open the Output panel and pick MCP Logs.
How do I make GitHub read-only in Cursor?
Use https://api.githubcopilot.com/mcp/readonly as the server address, or add the read-only header to your config. For Docker, set GITHUB_READ_ONLY=1.
Will Cursor run GitHub actions without asking me?
Not by default. Cursor asks before each tool call, but Run Everything mode runs every call automatically, including pushes and merges.
Why does creating a pull request hang in Cursor?
GitHub's server may open a pull request form, and Cursor's agent does not show it. Add the header X-MCP-Features: mcp_apps_disable_form_deferral so it creates the pull request directly.
Why does the Docker sign-in say my token is not set?
Your Docker image is older than the browser sign-in feature. Run docker pull ghcr.io/github/github-mcp-server and restart Cursor.
Does Cursor limit how many GitHub tools I can use?
Cursor's docs list no cap now. Older versions had a 40-tool limit, but Cursor now loads tool details on demand, and one user runs more than 80 tools without a warning.
Information
updated Nov 1, 2026
Release binariesGitHub Docs: Setting up the GitHub MCP ServerGitHubDocker image (ghcr.io)Official MCP RegistryInstallation guides per clientChangelogIssuesSupport guideSecurity policy
GitHub MCP ServerOfficialHosted or LocalOAuthGitHub's official MCP server. Lets an AI assistant read code, manage issues and pull requests, check Actions runs and security alerts. Hosted at api.githubcopilot.com/mcp or run locally with Docker or a Go binary.
34.1K GitHub stars
CursorHow Cursor runs MCP servers and which ones work in it.
Sources
Docs, issue trackers and discussions this page is built from.
Show all 14Hide
- Install GitHub MCP Server in Cursor · github.com
- Model Context Protocol (MCP) | Cursor Docs · cursor.com
- Remote GitHub MCP Server · github.com
- GitHub MCP connects, then fails with "Client error: terminated" (Windows) · forum.cursor.com
- Regression: github projects endpoint no longer accessible · forum.cursor.com
- GitHub MCP failing to start · forum.cursor.com
- Insiders Feedback: Disable interactive PR creation form · github.com
- GitHub MCP Server issue 3238 · github.com
- GitHub MCP Server issue 2779 · github.com
- GitHub MCP Server: server configuration · github.com
- Agent Run Modes | Cursor Docs · cursor.com
- Dynamic context discovery | Cursor · cursor.com
- Regarding the quantity limit of MCP tools · forum.cursor.com
- MCP headers config ignored when server has OAuth discovery · forum.cursor.com