PlugWiki
GitHub MCP Server logo

GitHub MCP Server: install, 92 tools and safe setup

Official · by GitHubRemoteLocal
Gethttps://api.githubcopilot.com/mcpgithub/github-mcp-serverDocs

Lets Claude, Cursor or Copilot in VS Code read your code, open pull requests and sort issues in your GitHub repos.

This is GitHub's official connector for AI assistants. You can ask your assistant to search your code, open and merge pull requests, sort issues or check why a build failed. It acts as you on GitHub, so start in read-only mode with an access key that reaches only the repos you need.

Good for

  • Developers who want their AI coding assistant to open pull requests, sort issues or read build logs from the chat
  • VS Code and Copilot users, who can set it up in one click and sign in with GitHub
  • Teams on GitHub Enterprise Server, who can run it on their own machine and point it at their server
  • Security engineers who want to review code scanning, Dependabot and secret scanning alerts by asking

Works in

11 supported · 1 with issues · 1 should work

Tap an app to see how to set it up and any known problems.

Install GitHub MCP

Claude Code

  1. 1

    Copy this prompt.

    Add the GitHub MCP server to Claude Code. Run this command:
    
    claude mcp add-json github '{"type":"http","url":"https://api.githubcopilot.com/mcp","headers":{"Authorization":"Bearer YOUR_GITHUB_PAT"}}'
    
    Then check that it loaded and tell me if I need to sign in or restart.
  2. 2

    Paste it into Claude Code. It shows the change and asks before running it.

Requires GitHub personal access token, Claude Code 2.1.1+.

Read-only mode: Want it to only read, never change anything? Use https://api.githubcopilot.com/mcp/readonly as the server address. If you run it on your own computer, add GITHUB_READ_ONLY=1 to its settings instead.

GitHub's guide lists the hosted server for Claude Code as PAT only (no OAuth). Run the command in your terminal, not inside a Claude Code session, then check with claude mcp list. Add --scope user to use it in every project. On Windows, if add-json returns Invalid input, use the older claude mcp add --transport http form.

From the project README. Source.

Tools

  • Searches code across GitHub to find where something is used

    Searches code across GitHub with GitHub's code search syntax.

    Try: “Find where parseToken is defined in the acme org.”

    Read · search_code

  • Reads a file or lists a folder in a repo, at any branch, tag or commit

    Reads a file or lists a directory at a branch, tag or commit.

    Try: “Open src/auth.ts in acme/web and explain the login flow.”

    Read · get_file_contents

  • Shows the full file and folder layout of a repo

    Returns a repo's file tree at a ref, optionally recursive and filtered by path.

    Try: “Show the full file tree under src/ in acme/web.”

    Read · get_repository_tree

  • Finds repos by name, topic, language or stars

    Searches repositories by name, topic, language, stars and more.

    Try: “Find Python repos about MCP servers with more than 1,000 stars.”

    Read · search_repositories

  • Lists a repo's issues, filtered by state, label or date

    Lists issues in a repo with filters for state, labels, date and custom fields.

    Try: “List open bugs in acme/web updated this week.”

    Read · list_issues

  • Reads an issue with its comments, labels and sub-issues

    Reads one issue: details, comments, sub-issues, parent issue or labels.

    Try: “Summarize issue #128 in acme/web and its comments.”

    Read · issue_read

  • Searches issues across repos in plain words

    Searches issues across repositories in natural language.

    Try: “Find open issues about rate limits in the acme org.”

    Read · search_issues

  • Opens a new issue or edits one: title, labels, assignees, status

    Creates a new issue or updates one: title, body, labels, assignees, milestone, state, type and fields.

    Try: “Open an issue in acme/web titled 'Login times out on Safari' and label it bug.”

    Write · issue_write

  • Posts a comment or emoji reaction on an issue or pull request

    Posts a comment, or an emoji reaction, on an issue or pull request.

    Try: “Comment on issue #42 in acme/web that the fix ships in v1.5.”

    Write · add_issue_comment

  • Edits a comment you posted on an issue or pull request

    Edits an existing comment on an issue or pull request.

    Try: “Edit my last comment on issue #42 to fix the version number.”

    Write · update_issue_comment

  • Adds, removes or reorders sub-issues under a parent issue

    Adds, removes or reorders sub-issues under a parent issue.

    Try: “Make issue #57 a sub-issue of #40 in acme/web.”

    Write · sub_issue_write

  • Lists a repo's pull requests, filtered by state or branch

    Lists pull requests in a repo, filterable by state, base and head branch.

    Try: “List open pull requests in acme/web.”

    Read · list_pull_requests

From the official docs

Permissions

high risk · 5 things to watch · 2 advisories

High risk

If you let it, your assistant can change or delete things in your GitHub account, and a stranger's text in a public issue can trick it into leaking private code. Turn on read-only mode and use an access key that only reaches the repos you need.

What it can do

Watch out for

  • It can change and delete code, not just read it

    Out of the box it can push files, merge pull requests and create repos, and a delete-repository tool exists. Start in read-only mode, or switch on only the tools you need. github.com

  • Text in public issues can trick it into leaking code

    Researchers showed a planted public issue steering an assistant into copying private repo data into a public pull request. Give it access only to the repos the job needs, and turn on lockdown mode. invariantlabs.ai

  • Lockdown mode helps, but it is not a guarantee

    Lockdown mode hides public-repo content written by people who can't push to that repo. GitHub calls it a best-effort filter, not a security boundary. github.com

  • Older-style tokens hide tools they can't use

    With a classic token (starting ghp_), it hides tools your token has no permission for. Fine-grained tokens don't hide them, but GitHub still blocks anything the token can't do. github.com

  • Your org admins can block or allow it

    Admins can block it in Copilot editors and control which apps and tokens get access. Its actions show in the audit log as normal GitHub activity, with no separate log for it. github.com

Security advisories

Technical details
Turning on read-onlyLocal: --read-only flag or GITHUB_READ_ONLY=1. Hosted: append /readonly to the URL (https://api.githubcopilot.com/mcp/readonly) or send X-MCP-Readonly: true. Read-only wins over --tools: write tools are skipped even if requested.
Talks toapi.github.com (GitHub REST and GraphQL API; your GHES or ghe.com host when GITHUB_HOST is set). github.com (OAuth login and device-code flow for the local server). api.githubcopilot.com (hosted server; your requests and token go to GitHub's endpoint). ghcr.io (Docker image pull)
Sign-in and keysLocal OAuth login keeps the token in memory only, nothing on disk. A PAT lives wherever you put it: the client's config file or an environment variable. Hosted OAuth tokens are held by the client (VS Code). GitHub recommends fine-grained PATs, 90-day maximum expiry, and chmod 600 on config files that contain tokens.
Scopes
  • repo

  • read:org

  • workflow

  • security_events

  • gist

  • notifications

  • read:project

  • project

  • delete_repo

  • admin:org

  • read:enterprise

  • admin:enterprise

Alternatives

Use GitHub's own connector unless you have one narrow job. It is the only official option and covers the most, while the alternatives each do one thing, like auditing security or summarizing one organization's history.

ServerOfficialRunsSign-inRead-only modeToolsGitHub stars
GitHub MCP ServerThis pageOfficialHostedLocalAccount or tokenYes9234.1K
Pare GitHub (@paretools/github)CommunityLocalgh CLI loginNot documented14140
GitHub BrainCommunityLocalAccount or tokenAlways–78
github-security-mcpCommunityLocalTokenAlways3916

What people say

People like that GitHub runs it and that it covers most of GitHub. The complaints are sign-in trouble in some apps, too many tools at once, and a recent Claude bug that stops it creating issues.

What people like

  • Official and maintained by GitHub, with a hosted endpoint so most clients need no local install
  • One server covers code, issues, PRs, Actions logs, security alerts, Projects and sub-issues
  • Users report running it from ChatGPT, Claude and Antigravity
  • Maintainers answer in the issue tracker and explain client limits openly

Common complaints

  • OAuth to the hosted server fails in clients that need Dynamic Client Registration; a PAT is the usual workaround
  • Many tools by default, which costs context tokens; people turn most of them off
  • Some developers find the gh CLI simpler and more reliable for coding agents
  • Since October 2026, Claude users report write tools (issue_write, create_pull_request) showing a form that collapses, so nothing is created

In their words

4 more quotes

Questions

Is the GitHub MCP server free?

Yes. GitHub makes it available to every GitHub user on any plan. A few tools need a matching paid feature, such as a paid Copilot license for the Copilot coding agent, and on Copilot Business or Enterprise an admin has to allow MCP servers first.

What is the GitHub MCP server URL?

https://api.githubcopilot.com/mcp/. For a connection that can only read, use https://api.githubcopilot.com/mcp/readonly instead.

Is it safe to give my AI assistant access to GitHub?

Only with limits. Out of the box it can push files, merge pull requests and create repositories, and researchers showed a planted public issue tricking an assistant into copying private code into a public pull request. Start in read-only mode and use a token that only reaches the repositories you need.

Can it delete my repositories?

It can, if you let it. A delete-repository tool exists, and it only works with a token that has permission to delete repositories. Read-only mode removes it along with every other tool that changes anything.

How do I make it read-only?

Pick the read-only option shown in the install box above. It removes every tool that can change anything, even tools you switched on by name.

Should I sign in with GitHub or use a personal access token?

Sign in with GitHub where your app supports it, such as VS Code. Elsewhere use a fine-grained personal access token limited to the repositories you need, set to expire in 90 days or less, which is what GitHub recommends.

How do I add GitHub to Claude Code or Cursor?

Use the Claude Code or Cursor tab in the install box above. In both apps, signing in with GitHub to the hosted server does not work yet, so you paste a personal access token instead.

Why can't it see my organization's private repositories?

Your token or sign-in is not allowed into that organization yet. A fine-grained token needs the org's approval and the repositories selected, a token used with SSO must be authorized for the org, and the org's policy must allow the app you signed in through. One user reports the Claude connector also needed a separate GitHub App install.

Does it work with GitHub Enterprise Server?

Only if you run it on your own machine and point it at your server's address. GitHub does not host it for Enterprise Server. Enterprise Cloud with data residency (ghe.com) can use the hosted version.

Should I use the hosted server or run it locally?

Use the hosted one unless you need GitHub Enterprise Server. It needs no install, updates itself and has a few extra tools, such as the Copilot coding agent. The local one runs on your computer and works with Enterprise Server.

Is @modelcontextprotocol/server-github the same thing?

No. That was an older reference server on npm, and GitHub says it has not been supported since April 2025. Use GitHub's own server instead.

Information

updated Nov 2, 2026

Publisher
GitHub (official)
Package
ghcr.io/github/github-mcp-server
Registry
Docker
Endpoint
https://api.githubcopilot.com/mcp
Transport
stdio, Streamable HTTP
Auth
OAuth
Version
2.0.3
License
MIT
Last commit
Oct 30, 2026
Open issues
204
Listed in
Official MCP registry, Docker MCP Catalog

Release binariesGitHub Docs: Setting up the GitHub MCP ServerGitHubDocker image (ghcr.io)Official MCP RegistryInstallation guides per clientChangelogIssuesSupport guideSecurity policy

Other GitHub MCP servers

Sources

Docs, issue trackers and discussions this page is built from. Issues, quotes and findings above link to their own source.

Show all 40
  1. Install in Claude Applications · github.com
  2. Installation guides: npm package no longer supported as of April 2025 · github.com
  3. Hosted URL works as Claude custom connector · github.com
  4. Install GitHub MCP Server in Cline · github.com
  5. Install GitHub MCP Server in OpenAI Codex · github.com
  6. Install GitHub MCP Server in Copilot CLI · github.com
  7. Install in Cursor · github.com
  8. Install GitHub MCP Server in Google Gemini CLI · github.com
  9. Install in Copilot IDEs · github.com
  10. Install GitHub MCP Server in OpenCode · github.com
  11. Local Server OAuth Login · github.com
  12. GitHub MCP Server README · github.com
  13. Releases (v2.0.3, 2026-10-21) · github.com
  14. Remote GitHub MCP Server · github.com
  15. Setting up the GitHub MCP Server · docs.github.com
  16. Install GitHub MCP Server in Windsurf · github.com
  17. Install GitHub MCP Server in Zed · github.com
  18. GitHub MCP Server README: Tools · github.com
  19. GitHub MCP Server README: default toolset · github.com
  20. PAT Scope Filtering · github.com
  21. pkg/github/actions.go (actions_run_trigger methods) · github.com
  22. Policies & Governance · github.com
  23. GitHub MCP Exploited: Accessing private repositories via MCP · invariantlabs.ai
  24. GHSA-pjp5-fpmr-3349 · github.com
  25. GHSA-w4q6-qw23-4rg7 · github.com
  26. OSV GO-2026-6118 (fixed 1.1.0) · osv.dev
  27. Claude Code OAuth DCR error report · github.com
  28. GitHub App Authentication · github.com
  29. MCP Apps: issue_write form widget collapses immediately in Claude clients · github.com
  30. HN comment by mindcrime · news.ycombinator.com
  31. Workaround: mcp_apps_disable_form_deferral · github.com
  32. HN comment by NicuCalcea · news.ycombinator.com
  33. HN comment by ravi_rupareliya · news.ycombinator.com
  34. Remote: Incompatibility with Claude (Web) Integrations · github.com
  35. Dynamic Client Registration not supported · github.com
  36. Comment by jawache on using gh CLI instead · github.com
  37. github/github-mcp-server · github.com
  38. @paretools/github README · github.com
  39. GitHub Brain README · github.com
  40. github-security-mcp README · github.com

Facts from the official MCP registry, GitHub, npm, PyPI and the Docker catalog. Updated Nov 2, 2026.