How-to

How to Add MCP GitHub to Claude Code (Step-by-Step)

Step 1 — Create token

Use least-privilege scope (repo/read:org depending on workflow).

Step 2 — Add MCP config

{
  "mcpServers": {
    "github": {
      "command": "npx",
      "args": ["-y", "@modelcontextprotocol/server-github"],
      "env": {"GITHUB_PERSONAL_ACCESS_TOKEN": ""}
    }
  }
}

Step 3 — Restart and verify

Common failures