Best AI Code Tools

GitHub MCP server: what it is and how to connect it

Updated Oct 26, 2026 · Sources listed at the end

The GitHub MCP Server is GitHub’s official Model Context Protocol server. It lets AI tools read repositories and code, manage issues and pull requests, analyse code and automate workflows through natural language.1

Two ways to run it

  1. Remote (hosted by GitHub): point an MCP host at https://api.githubcopilot.com/mcp/. The repository’s examples show an HTTP server entry with an Authorization: Bearer header holding a personal access token.1
  2. Local: run the container image, passing your token as an environment variable:
docker run -i --rm -e GITHUB_PERSONAL_ACCESS_TOKEN ghcr.io/github/github-mcp-server

The server groups tools into toolsets; when none are specified, default toolsets are used.1

Adding it to a coding agent

In Claude Code use claude mcp add --transport http <name> <url> (guide); in Cursor add it to mcp.json (guide).23

Token hygiene

Use a token with the narrowest permissions you need. Anyone who can run your agent can act on GitHub with that token’s rights.

Footnotes

  1. GitHub, github-mcp-server repository. ↩ ↩2 ↩3

  2. Claude Code docs, MCP. ↩

  3. Cursor docs, Model Context Protocol. ↩

Tools mentioned

Sources

  1. GitHub: github-mcp-server repository
  2. Claude Code docs: Connect Claude Code to tools via MCP
  3. Cursor docs: Model Context Protocol

Related lists

Related comparisons and alternatives

Related guides