Pod to App: Cursor
How to install the GitHub MCP server in Cursor
By Sophie Filer · Updated 10 Nov 2026 · Steps checked against GitHub's own docs on 10 Nov 2026
The short answer
Add a github entry to ~/.cursor/mcp.json with GitHub's hosted URL and your personal access token, save, then restart Cursor. Cursor needs the token for this server: GitHub's browser sign-in does not work here yet.
{
"mcpServers": {
"github": {
"url": "https://api.githubcopilot.com/mcp/",
"headers": {
"Authorization": "Bearer YOUR_GITHUB_PAT"
}
}
}
}- Cursor
- 0.48.0 or newer
- Sign-in
- Personal access token only
- File
- ~/.cursor/mcp.json
- Price
- Free, no Copilot plan needed
Before you start
- Cursor 0.48.0 or newer. Older builds cannot talk to a remote server over HTTP, which is how this one connects.
- A fine-grained personal access token from GitHub's token page, limited to the repositories Cursor should reach.
- Docker Desktop, only if you would rather run the server on your own machine.
Install it step by step
- Step 1: Create the token and copy it somewhere safe; GitHub shows it only once.
- Step 2: Open
~/.cursor/mcp.jsonin any editor (create it if it is missing), or use the one-click install button in GitHub's Cursor install guide, which writes the same entry for you. - Step 3: Paste the block at the top of this page. If the file already lists other servers, add
githubinside the samemcpServersobject rather than starting a second one. - Step 4: Put your token in place of
YOUR_GITHUB_PAT. After a one-click install, do this in Cursor Settings, Tools & Integrations, MCP tools: click the pencil next to github. - Step 5: Save, then quit Cursor completely and open it again. Closing the window is not enough.
- Step 6: Back in Tools & Integrations, github should have a green dot. Open a chat in Agent mode and ask: "Show me the open issues labelled bug in this repository."
All projects or just this one
| File | Applies to | Use it when |
|---|---|---|
~/.cursor/mcp.json | Every project you open in Cursor | You want GitHub tools everywhere |
.cursor/mcp.json in the project root | Only that project | The token should only work for one repo, or the team shares the setup |
On Windows, ~ is your user folder, so the global file is %USERPROFILE%\.cursor\mcp.json.
Fewer tools, or read-only
Cursor's agent works better with a short tool list. The hosted server reads two extra headers: one to pick toolsets and one to block every tool that writes. This entry gives Cursor only repository, issue and pull request tools, and lets it look but not touch:
{
"mcpServers": {
"github": {
"url": "https://api.githubcopilot.com/mcp/",
"headers": {
"Authorization": "Bearer YOUR_GITHUB_PAT",
"X-MCP-Toolsets": "repos,issues,pull_requests",
"X-MCP-Readonly": "true"
}
}
}
}Without the toolsets header you get the defaults: context, repos, issues, pull_requests and users. Toolsets such as actions or code_security have to be asked for by name; GitHub lists them all in its remote server docs.
The local Docker version
Running the image yourself is the one way to skip the token in Cursor: on first use it opens a GitHub sign-in in your browser and keeps the result in memory only. It needs Docker Desktop running whenever Cursor is open.
{
"mcpServers": {
"github": {
"command": "docker",
"args": ["run", "-i", "--rm", "-p", "127.0.0.1:8085:8085", "-e", "GITHUB_OAUTH_CALLBACK_PORT", "ghcr.io/github/github-mcp-server"],
"env": { "GITHUB_OAUTH_CALLBACK_PORT": "8085" }
}
}
}If it does not work
| What you see | What to do |
|---|---|
| No green dot next to github | Check your Cursor version is 0.48.0 or later, then quit and reopen Cursor fully. |
| Red dot or an auth error | The token is missing, expired or lacks access to that repository. Make sure the header reads Bearer then the token. |
| Cursor ignores the file | The JSON is broken, often a missing comma between two servers, or the top key is not exactly mcpServers. |
| Green dot, but the agent never uses GitHub | Use Agent mode, not Ask, and name the repository in your request. |
| Docker version fails to start | Start Docker Desktop. If the image will not download, run docker logout ghcr.io and try again. |
MCP Shelf take
Is GitHub worth adding to Cursor?
Cursor already has your code on disk, so this server is not about reading files. It is about the GitHub side of the work: pulling an issue's full thread into the chat before you start, checking review comments on your pull request, and opening the pull request when you are done, without leaving the editor. The one real chore is the token, because Cursor cannot use GitHub's browser sign-in for the hosted server. Make a fine-grained one per project, keep it out of committed files, and start read-only.
Sophie Filer
Questions
Can Cursor use the GitHub MCP server without a personal access token?
Not with the hosted server: GitHub says it needs a token in Cursor for now. The local Docker version can sign you in through your browser instead, at the cost of keeping Docker running.
Where is mcp.json in Cursor?
The global file is ~/.cursor/mcp.json (on Windows, %USERPROFILE%\.cursor\mcp.json). A project can have its own .cursor/mcp.json in its root folder, which applies only there.
Is the GitHub MCP server free in Cursor?
Yes. It is open source under the MIT licence, the hosted server costs nothing, and you do not need a Copilot subscription.
Why does Cursor show the GitHub server but not use it?
Tools are used by the agent, so switch the chat to Agent mode. Naming the repository and the thing you want ("the open pull requests in owner/repo") also helps the agent reach for GitHub instead of searching your files.
Sources: the steps on this page are written in our own words from GitHub's own install docs, install-cursor.md, remote-server.md, the README. If they disagree with this page, the project's docs win; please tell us from the server page.
