PlugWiki
GitHub MCP Server logo

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. 1

    Open the link and confirm in Cursor.

    Add to Cursor (hosted, PAT)
  2. 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

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

Technical details
Turning on read-onlyIn 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 toapi.githubcopilot.com
Sign-in and keysThe 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.

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

More on this

Sources

Docs, issue trackers and discussions this page is built from.

Show all 14
  1. Install GitHub MCP Server in Cursor · github.com
  2. Model Context Protocol (MCP) | Cursor Docs · cursor.com
  3. Remote GitHub MCP Server · github.com
  4. GitHub MCP connects, then fails with "Client error: terminated" (Windows) · forum.cursor.com
  5. Regression: github projects endpoint no longer accessible · forum.cursor.com
  6. GitHub MCP failing to start · forum.cursor.com
  7. Insiders Feedback: Disable interactive PR creation form · github.com
  8. GitHub MCP Server issue 3238 · github.com
  9. GitHub MCP Server issue 2779 · github.com
  10. GitHub MCP Server: server configuration · github.com
  11. Agent Run Modes | Cursor Docs · cursor.com
  12. Dynamic context discovery | Cursor · cursor.com
  13. Regarding the quantity limit of MCP tools · forum.cursor.com
  14. MCP headers config ignored when server has OAuth discovery · forum.cursor.com

Updated Nov 1, 2026.