Skip to content

Instantly share code, notes, and snippets.

@juno
Last active June 22, 2025 04:37
Show Gist options
  • Save juno/471a73f0abfe00779b87725fba8ba48b to your computer and use it in GitHub Desktop.
Save juno/471a73f0abfe00779b87725fba8ba48b to your computer and use it in GitHub Desktop.
claude-code-github-remote-mcp.md

Prerequisite

  • GitHub Personal Access Token with repository access permissions

Add GitHub Remote MCP server to Claude Code

  • Set your token in the Authorization header
  • The MCP server name should be "github"
$ GITHUB_PAT=github_pat_*** \
  claude mcp add --transport http github https://api.githubcopilot.com/mcp -H "Authorization: Bearer $GITHUB_PAT"
Added HTTP MCP server github with URL: https://api.githubcopilot.com/mcp to local config
Headers: {
  "Authorization": "Bearer github_pat_***"
}
$ claude
...
> /mcp

 ※ Tip: Use /permissions to pre-approve and pre-deny bash, edit, and MCP tools
╭────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────╮
│ Manage MCP servers                                                                                                                                             │
│                                                                                                                                                                │
│ ❯ 1. github    ✔ connected · Enter to view details                                                                                                             │
╰────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────╯
   Esc to exit


Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment