cursor mcpindependent directory
GitHub logo

Servers / GitHub

Install GitHub MCP in Cursor

GitHub · Remote HTTP · OAuth or PAT

Direct answer

Install GitHub's official MCP in Cursor by pointing mcpServers.github.url at https://api.githubcopilot.com/mcp/. Save that in ~/.cursor/mcp.json (or .cursor/mcp.json for one repo), reload Cursor, and finish the OAuth prompt. If OAuth is not available, add an Authorization Bearer header with a GitHub PAT instead.

ProviderGitHub
Classificationofficial
TransportRemote HTTP
AuthOAuth or PAT

Cursor mcp.json

Paste this into ~/.cursor/mcp.json (global) or.cursor/mcp.json (this repo). Merge it with servers you already have. Primer: how Cursor loads MCP.

{
  "mcpServers": {
    "github": {
      "url": "https://api.githubcopilot.com/mcp/"
    }
  }
}

MCP endpoint: https://api.githubcopilot.com/mcp/. Source: github/github-mcp-server.

What it is

The GitHub MCP is GitHub's own server. Cursor can already run git locally. This server is for the GitHub product: PRs, issues, checks, and code search against github.com, without you pasting issue text into the chat.

The problem it solves

Without it, the agent reviews diffs it can see on disk and then asks you to open the PR in a browser. With it, it can list review comments, open the PR, and match failing checks to files.

Install steps

  1. Add the hosted URL. Put the github server in mcp.json with url https://api.githubcopilot.com/mcp/. That is the URL GitHub documents for Cursor.
  2. Authenticate. Reload Cursor and complete OAuth when it asks. To use a PAT instead, add headers.Authorization as Bearer YOUR_GITHUB_PAT. Scope the token to the repos the agent should touch.
  3. Confirm tools. Under Tools & MCP the github server should list issue and pull-request tools. Ask Cursor to list open PRs in this repo as a smoke test.

A prompt that uses it

List open pull requests for this repo, summarize review comments on the oldest one, and draft a reply that addresses the failing checks.

If it will not connect

A 401 usually means the PAT is missing, expired, or missing repo scope. OAuth can fail if popups are blocked. The URL must keep the trailing slash GitHub publishes: https://api.githubcopilot.com/mcp/

FAQ

What is the official GitHub MCP URL?

https://api.githubcopilot.com/mcp/ as documented in github/github-mcp-server for Cursor.

Can I run GitHub MCP locally instead?

Yes, via Docker or the published binary, with GITHUB_PERSONAL_ACCESS_TOKEN. This directory leads with the hosted URL.

Will this let the agent merge pull requests?

If the token or OAuth grant allows it, yes. Use a least-privilege PAT if you do not want writes.

Is this the same as Cursor's GitHub sign-in?

No. Signing into GitHub for sync is separate from the MCP server tools.