OfficialDev & code hostinglocal stdio / remote HTTP

GitHub MCP Server

Lets agents read repos and manage issues, pull requests, Actions and security alerts on GitHub.

Install

Claude Code 2.1.1 and newer

claude mcp add-json github '{"type":"http","url":"https://api.githubcopilot.com/mcp","headers":{"Authorization":"Bearer YOUR_GITHUB_PAT"}}'

Claude Code 2.1.0 and earlier

(GitHub’s guide also suggests this form if add-json returns Invalid input on Windows)

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

Codex

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

Cursor

{"mcpServers":{"github":{"url":"https://api.githubcopilot.com/mcp/","headers":{"Authorization":"Bearer YOUR_GITHUB_PAT"}}}}

Copilot (VS Code)

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

Claude Desktop

{"mcpServers":{"github":{"command":"docker","args":["run","-i","--rm","-e","GITHUB_PERSONAL_ACCESS_TOKEN","ghcr.io/github/github-mcp-server"],"env":{"GITHUB_PERSONAL_ACCESS_TOKEN":"YOUR_GITHUB_PAT"}}}}

Commands and configuration as given in the server’s documentation (Documentation). Replace placeholders such as API keys with your own values.

GitHub MCP Server is GitHub’s own server for repositories, issues, pull requests and Actions.

The GitHub MCP server lets agents read repos and manage issues, pull requests, Actions and security alerts on GitHub. GitHub maintains it under the MIT license and offers it as a hosted endpoint at api.githubcopilot.com/mcp/ or as a local Docker image or binary. It authenticates with OAuth or a personal access token, and the steps below cover Claude Code, Codex, Cursor, Copilot in VS Code and Claude Desktop.

Tools are grouped into toolsets covering repositories and code search, issues, pull requests, Actions workflow runs, code scanning and Dependabot alerts, discussions and notifications. It supports read-only and lockdown modes, and you can turn individual toolsets on or off.

Questions

Is there a hosted GitHub MCP server?
Yes, at api.githubcopilot.com/mcp/. It also runs locally as a Docker image or binary.
How does the GitHub MCP server authenticate?
It uses OAuth or a personal access token (PAT); the examples here pass a PAT as a bearer token.
Can I make the GitHub MCP server read-only?
Yes. It supports read-only and lockdown modes, and you can turn individual toolsets on or off.
Which command adds the GitHub MCP server to Claude Code?
Claude Code 2.1.1 and newer use claude mcp add-json; 2.1.0 and earlier use claude mcp add --transport http, which GitHub’s guide also suggests if add-json returns Invalid input on Windows.

Sources

Checked October 2, 2026.

Dev & code hosting

View all
Aftergradient

What are you looking for?

Search commands, errors, tools