← Reference Library

GitHub MCP Server Setup

How Claude Code connects to GitHub via the Model Context Protocol — auth flow, what gets unlocked, and how it fits into your daily workflow.

💻 Claude Code CLI
Your terminal AI agent — reads files, runs commands, calls tools
Version: 2.1.72  ·  User scope (all projects)
MCP protocol (HTTP transport)
🌎 GitHub MCP Server
api.githubcopilot.com/mcp  ·  GitHub's official remote server
Registered as: github  ·  Status: ✓ Connected
✓ Connected
Bearer token (gh auth token)
🔒 GitHub API
Authenticated as: gilesparnell  ·  Protocol: HTTPS
Token scopes: gist · read:org · repo
repo scope
📦 gilesparnell/Claude
Your AI workspace repo
Skills, CLAUDE.md, docs
📦 Other Repos
allconvos-main + any
repo you have access to

What You Can Do Once Connected

CategoryExample prompt in Claude Code
IssuesList open issues in gilesparnell/Claude
PRsCreate a PR for this branch targeting main
FilesShow me the contents of global/CLAUDE.md in my Claude repo
SearchSearch for any file referencing Twilio across my repos
ActionsWhat was the result of the last workflow run?
CommitsWhat changed in the last 5 commits on main?

How It Was Set Up

# 1. Get your token from gh CLI gh auth token # 2. Register the GitHub MCP server (user scope = all projects) claude mcp add-json github '{"type":"http","url":"https://api.githubcopilot.com/mcp","headers":{"Authorization":"Bearer <token>"}}' --scope user # 3. Verify claude mcp list claude mcp get github # 4. Inside a Claude Code session /mcp

MCP Server Scopes

ScopeWhere config livesVisible to
local (default).mcp.json in projectYou only, current project
project.mcp.json (committed)Everyone on the project
user ✓~/.claude/ user configYou, across all projects

✓ This is the scope used for the GitHub server — register once, available everywhere.