Special offer. See more information about Outbyte and uninstall instructions. Please review EULA and Privacy policy.

Use GitHub’s hosted MCP server in Cursor unless your organization requires the server to run locally. Add https://api.githubcopilot.com/mcp/ to Cursor’s MCP configuration, authenticate it with a GitHub Personal Access Token (PAT), restart Cursor, and verify the GitHub tools in chat. Cursor also supports a Docker-based local deployment when you need local execution and can maintain the additional runtime.

What you need before connecting GitHub MCP

  • A current Cursor installation. GitHub’s guide identifies Cursor 0.48.0 or newer for Streamable HTTP, but that minimum can change; check the current GitHub and Cursor documentation if your version is older.
  • A GitHub PAT with only the repository and action permissions you intend to expose.
  • Permission to edit Cursor’s JSON MCP configuration.
  • Network access to GitHub’s hosted endpoint if you choose the remote setup.

GitHub’s Cursor-specific instructions currently describe PAT authentication for this hosted server. Cursor supports OAuth for some MCP servers, but that general capability does not mean this GitHub integration uses OAuth.

Recommended setup: GitHub’s hosted MCP server

1. Choose the configuration scope

Use ~/.cursor/mcp.json when GitHub tools should be available in every Cursor project for your user account. Use .cursor/mcp.json inside a repository when the configuration should apply only to that project. A project file is easier to keep separate from unrelated work, while a global file avoids repeating setup across projects.

2. Add the server entry

Create or edit the selected file so the GitHub server is nested under mcpServers:

Special offer. See more information about Outbyte and uninstall instructions. Please review EULA and Privacy policy.
{
  "mcpServers": {
    "github": {
      "url": "https://api.githubcopilot.com/mcp/",
      "headers": {
        "Authorization": "Bearer YOUR_GITHUB_PAT"
      }
    }
  }
}

Replace YOUR_GITHUB_PAT with your token. Keep the surrounding JSON valid: use double quotes, preserve commas between properties, and do not add comments. If the file already contains other MCP servers, add the github object alongside them rather than replacing the whole mcpServers object.

3. Protect the token

Do not commit a real PAT to a shared repository or paste it into an issue, screenshot, prompt, or chat transcript. For a project-level file, review whether your source-control rules would include .cursor/mcp.json; keep secrets out of tracked configuration whenever possible. If a token is exposed, revoke it in GitHub and issue a replacement with narrower permissions.

4. Save and restart Cursor

Save the file, fully restart Cursor, then open its MCP tools settings. Confirm that the github server is connected and that GitHub tools appear in chat. A practical first check is the request: “List my GitHub repositories.” The response should come from the connected GitHub account rather than from a generic web search.

How to choose PAT permissions

Grant the smallest set of permissions that supports the work you actually want the agent to perform. Read-only repository discovery needs less access than creating issues, opening pull requests, pushing commits, or changing workflow files. Organization policies can further restrict what a token can do. If a tool reports that it cannot access a repository or perform an action, inspect the token’s repository selection and permissions before changing Cursor’s configuration.

Special offer. See more information about Outbyte and uninstall instructions. Please review EULA and Privacy policy.

Hosted versus local GitHub MCP

The hosted endpoint is GitHub’s simplest documented route. A local deployment runs the official GitHub MCP Server through Docker, which gives you control over where the process runs but adds installation and maintenance work.

Decision point Hosted server Local Docker server
Setup effort Edit Cursor JSON, add PAT, restart Cursor Install and run Docker Desktop, configure the official server, then connect it to Cursor
Runtime dependency Network access to GitHub’s endpoint Docker Desktop and a running local server
Operational control GitHub hosts the MCP endpoint You control the machine and server process
Authentication choices GitHub’s Cursor guide specifies PAT use GitHub documents PAT authentication and OAuth-based login in supported conditions
Best fit Most individual developers and teams allowed to use the hosted service Organizations that require local execution or want local process control

The sources do not establish a feature-for-feature superiority claim between the two deployments. Decide based on policy, network boundaries, token handling, and who will operate Docker.

Local deployment considerations

If you choose local hosting, install Docker Desktop and keep it running before starting the official GitHub MCP Server configuration described by GitHub. Use the server’s documented authentication method for your environment, then point Cursor at the local MCP process using the transport and JSON shape specified in the current GitHub and Cursor instructions. Local hosting is not “set and forget”: Docker updates, image availability, process restarts, and local firewall rules become part of your maintenance routine.

Verify the connection safely

  1. Open Cursor’s MCP settings and check the server status.
  2. Confirm the server name is exactly github and the endpoint has the trailing slash shown in GitHub’s example.
  3. Ask Cursor to list repositories you can access.
  4. Try a read-only task first, such as summarizing a known issue or listing open pull requests.
  5. Only after read operations work, test a write operation that you explicitly intend to authorize.

Review the tool confirmation prompts before allowing changes. MCP servers can access external services and, depending on the exposed tools and token permissions, execute actions on your behalf.

Special offer. See more information about Outbyte and uninstall instructions. Please review EULA and Privacy policy.

Troubleshooting GitHub MCP in Cursor

The server does not appear

  • Restart Cursor after saving the file.
  • Check that you edited the intended path: ~/.cursor/mcp.json for global scope or .cursor/mcp.json in the target project.
  • Validate the JSON for missing commas, mismatched braces, smart quotes, or comments.
  • Open MCP settings and inspect the connection status.

Authentication fails

  • Replace the placeholder with a current PAT and keep the exact Bearer prefix.
  • Check that the token is allowed to access the requested repositories and organization resources.
  • Revoke a possibly exposed token and create a replacement rather than continuing to troubleshoot with a compromised secret.

A repository or action is unavailable

The MCP connection can be healthy while the token lacks permission for one repository or operation. Review repository selection, organization approval requirements, and the specific permission needed for that action. Test with a repository you know the token can read.

The remote endpoint cannot connect

Check corporate firewall, proxy, VPN, and outbound HTTPS rules. If your network blocks the hosted endpoint, ask an administrator whether it can be allow-listed or evaluate the local Docker option.

Docker deployment fails

Confirm Docker Desktop is installed, running, and able to pull the official image. Check the server logs for authentication and port errors, then verify that Cursor is configured for the transport exposed by your local process. A stopped Docker daemon will make an otherwise correct Cursor configuration appear offline.

Older Cursor version

GitHub’s guide identifies Cursor 0.48.0+ for Streamable HTTP. Because version requirements can change, upgrade Cursor or verify the current minimum in the live installation instructions before diagnosing a configuration that uses an older build.

Special offer. See more information about Outbyte and uninstall instructions. Please review EULA and Privacy policy.
Independent reader supportYour contribution helps us test, update, and keep practical guides available for everyone.Support on Ko-Fi

Operational and security checklist

  • Use a separate token for automation instead of a personal, all-purpose credential.
  • Limit repository access and write permissions.
  • Keep project configuration free of plaintext secrets where your team can see it.
  • Review every tool approval, especially commands that create, merge, delete, or publish.
  • Rotate or revoke tokens when a team member leaves, a machine is lost, or a secret is exposed.
  • Document whether your team permits GitHub-hosted MCP or requires local execution.

Or skip the browser setup

If your separate goal is generating clean website screenshots for documentation, previews, or agent workflows, ScreenshotNeo provides a one-request API and an MCP server. It is not a replacement for GitHub MCP; it removes the browser-capture plumbing from screenshot jobs.

cURL:

curl -G "https://api.screenshotneo.com/v1/shot" -d access_key=YOUR_API_KEY --data-urlencode url=https://stripe.com -o shot.webp

Python:

import requests
r = requests.get("https://api.screenshotneo.com/v1/shot", params={"access_key": "YOUR_API_KEY", "url": "https://stripe.com"}, timeout=90)
open("shot.webp", "wb").write(r.content)

Node.js:

const q = new URLSearchParams({ access_key: 'YOUR_API_KEY', url: 'https://stripe.com' });
const res = await fetch(`https://api.screenshotneo.com/v1/shot?${q}`);

Before capture, ScreenshotNeo accepts cookie or consent banners and removes more than 60 known consent platforms, newsletter popups, and chat widgets; each cleanup step can be disabled. Bot checks, CAPTCHAs, blank pages, timeouts, failed loads, and cache hits are not billed, and response headers identify the page verdict and billing status. Its MCP server exposes take_screenshot, get_page_info, and capture_pdf to Claude, Cursor, and other MCP clients.

Every plan includes features such as full-page lazy-image loading, CSS-selector element capture, device presets, custom viewport and retina scale, PDF controls, custom CSS and JavaScript, click-before-capture, waits, request blocking, headers, cookies, user agent, timezone, geolocation, transparent backgrounds, resizing, configurable-TTL caching, signed links, asynchronous webhooks, bulk capture of up to 100 URLs per call, usage API, and OpenAPI support. The free plan includes 1,000 screenshots per month with no card; paid plans start at $5 for 3,000. See the ScreenshotNeo documentation for parameters and response details, then sign up free.

Frequently Asked Questions

Can I use Cursor’s OAuth support with GitHub MCP?

Not by assumption. GitHub’s Cursor-specific guide currently instructs users to authenticate the hosted server with a PAT; Cursor’s general OAuth capability varies by server.

Special offer. See more information about Outbyte and uninstall instructions. Please review EULA and Privacy policy.

Should the GitHub MCP configuration be committed to a repository?

Treat a project configuration as potentially shareable and keep real credentials out of it. Commit only a secret-free configuration if your team’s policy allows it.

Which deployment is better for a regulated network?

There is no universal answer. Compare your organization’s rules for hosted endpoints, outbound traffic, token custody, Docker operation, and local audit requirements.

Product prices and availability are accurate as of the date/time indicated and are subject to change. Any price and availability information displayed on Amazon at the time of purchase will apply.