GitHub MCP server

The GitHub MCP server gives AI agents access to GitHub through your account: read code and commits, create and review issues and pull requests, check Actions runs and read security alerts.

Connect GitHub

Claude Code, hosted server with a personal access token

Terminal
claude mcp add --transport http github https://api.githubcopilot.com/mcp -H "Authorization: Bearer YOUR_GITHUB_PAT"

Codex, hosted server (token read from an environment variable)

Terminal
codex mcp add github --url https://api.githubcopilot.com/mcp/ --bearer-token-env-var GITHUB_PAT_TOKEN

VS Code 1.101 or later, hosted server with OAuth

Config
{"servers": {"github": {"type": "http", "url": "https://api.githubcopilot.com/mcp/"}}}

Local server in Docker, read-only

Terminal
docker run -i --rm -e GITHUB_PERSONAL_ACCESS_TOKEN=<your-token> -e GITHUB_READ_ONLY=1 ghcr.io/github/github-mcp-server

OAuth on the hosted server needs a client that has registered a GitHub App or OAuth App; any client that supports remote servers can use a personal access token instead. Add /readonly to a toolset URL on the hosted server for read-only access.

What the GitHub MCP server does

The GitHub MCP server is GitHub's own server for connecting AI agents to GitHub. Through it an agent can browse and search code in any repository you can access, read commits and branches, open, update and comment on issues, create and review pull requests, check GitHub Actions runs and their logs, and read code scanning, secret scanning and Dependabot alerts. It also covers discussions, gists, notifications, projects, labels and organization data.

GitHub's server groups its tools into toolsets, such as repos, issues, pull_requests and actions, and turns on a default set unless you choose others. A read-only mode removes every tool that can change something, and a lockdown mode hides content from public-repo authors without push access to cut the risk of prompt injection through issues and comments. The hosted server adds Copilot tools, such as assigning an issue to the Copilot coding agent, and a GitHub support docs search.

GitHub hosts the server at api.githubcopilot.com/mcp with OAuth or a personal access token, and the same Go code runs locally as a Docker image or binary, which also works with GitHub Enterprise Server. The repo had 33,312 GitHub stars on 2026-10-01.

When to use GitHub

  • You want the agent to open a pull request, then read the review comments and fix them.
  • A CI run failed and you want the agent to read the Actions log and find the cause.
  • You want to triage a backlog of issues: label, comment and close duplicates.
  • You need a summary of open Dependabot or code scanning alerts across a repo.

When to pick something else

  • Hands-off use with a broad token: the server can push code, merge and close issues with whatever rights your token has, so start in read-only mode or with a fine-grained token.
  • Reading untrusted public issues without care: text in issues and comments can carry prompt injection; lockdown mode reduces but does not remove the risk.

What GitHub needs

  • A GitHub account (OAuth) or a personal access token
  • Docker or the server binary, only for the local server

What the GitHub MCP server costs

Free and open source under MIT with no separate charge; it works through your GitHub account and GitHub's normal API rate limits.

Current prices: github.com . We do not list prices: vendors change them often, so check the publisher's own page.

Questions people ask

Is the GitHub MCP server free?

Yes. The server is open source under MIT and GitHub lists no charge for it; calls count against your account's normal GitHub API rate limits (README read 2026-10-01).

Can the GitHub MCP server write, or only read?

It can write: create branches, push files, open and merge pull requests, and edit issues, within your token's permissions. Run it with --read-only, GITHUB_READ_ONLY=1, or a /readonly URL to allow reading only.

Does the GitHub MCP server need GitHub Copilot?

No. It works in Claude, Codex, Cursor, Windsurf, Gemini CLI and other non-Copilot clients with a GitHub token. Copilot policies only govern GitHub's own Copilot editors.

  • GitLab: The GitLab MCP server gives AI agents access to a GitLab instance through your account: read and create issues and merge requests, commit files, review diffs, and check CI pipelines and jobs.