What it does
GitHub’s own MCP server, hosted at api.githubcopilot.com, lets an assistant read and manage repositories, issues, pull requests, Actions workflows, code security alerts and more, through groups of tools (toolsets) that you can switch on or off.
These steps use a personal access token that you create in your GitHub settings and keep in the environment variable named below; give it only the repositories and permissions the work needs. A host that has registered a GitHub App can sign in with OAuth instead; GitHub’s page says which.
- Read and manage repositories, branches and files
- Create, read and update issues and pull requests
- Read GitHub Actions workflow runs
- Read code security and Dependabot alerts
The facts
- Address
https://api.githubcopilot.com/mcp/- Kind
- Remote: a server on the internet
- Transport
- Streamable HTTP
- Sign-in
- API key in
GITHUB_PERSONAL_ACCESS_TOKEN - Account
- Needs a GitHub account — sign up
How to connect
Connect from Claude Code
Set GITHUB_PERSONAL_ACCESS_TOKEN in the environment you start Claude Code from, then run this in a terminal. Keep the single quotes: Claude Code reads the variable, your key is never written down.
claude mcp add --transport http github https://api.githubcopilot.com/mcp/ --header 'Authorization: Bearer ${GITHUB_PERSONAL_ACCESS_TOKEN}'Connect from Claude.ai
Claude.ai connects from Anthropic’s cloud, so it needs a public address. Follow these steps in the app.
- Open Customize > Connectors, click "+ Add", then "Add custom connector".
- Name: github
- Remote MCP server URL: https://api.githubcopilot.com/mcp/
- Click "Continue".
- Under Authentication choose "Sign in now", then click "Continue".
- Click "Add", then "Connect" if it asks.
- On a Team or Enterprise plan an Owner adds the connector under Organization settings > Connectors, and each member then clicks Connect.
Connect from Cursor
Set GITHUB_PERSONAL_ACCESS_TOKEN in the environment you start Cursor from, then add this to ~/.cursor/mcp.json for every project, or to .cursor/mcp.json for one.
{
"mcpServers": {
"github": {
"url": "https://api.githubcopilot.com/mcp/",
"headers": {
"Authorization": "Bearer ${env:GITHUB_PERSONAL_ACCESS_TOKEN}"
}
}
}
}Connect from Codex
Set GITHUB_PERSONAL_ACCESS_TOKEN in the environment you start Codex from, then add this to ~/.codex/config.toml, or to .codex/config.toml in a trusted project.
[mcp_servers.github]
url = "https://api.githubcopilot.com/mcp/"
bearer_token_env_var = "GITHUB_PERSONAL_ACCESS_TOKEN"GitHub docsChecked on