{"slug": "github-mcp-server-for-claude-code-direct-repo-pr-and-ci-access-in-3-minutes", "title": "GitHub MCP Server for Claude Code: Direct Repo, PR, and CI Access in 3 Minutes", "summary": "GitHub's official remote MCP server can be connected to Claude Code in about three minutes, giving the agent direct access to repositories, issues, pull requests, commits, CI status, and code search over HTTP. Setup requires a GitHub personal access token passed via an Authorization: Bearer header to the endpoint at api.githubcopilot.com/mcp/, with a self-hosted Docker image available as an alternative.", "body_md": "A CI run fails, and you’re back to being the messenger: check which job failed, copy the details into Claude Code, then go fetch the issue it relates to and the PR that touched that file. Every piece of context has to pass through your clipboard.\n\nThe **GitHub MCP server** cuts that out. It gives Claude Code direct access to your repositories — issues, pull requests, commits, CI status, and code search. GitHub maintains an official remote server, so there’s nothing to build or run locally: you authenticate once with a personal access token and Claude Code talks to it over HTTP. Setup takes about 3 minutes, including creating the token.\n\nConnect the official remote server with one command, once you have a token (see Step 1 below if you don’t have one yet):\n\n```\nclaude mcp add --transport http github https://api.githubcopilot.com/mcp/ --header \"Authorization: Bearer YOUR_GITHUB_PAT\"\n```\n\nRestart Claude Code, then run `/mcp` to confirm it shows as connected. Total time: about 3 minutes, including creating the token.\n\nOnce you have a token, skip the manual steps below and hand the rest to the agent:\n\n```\nYou have access to the `claude mcp` CLI in this project. Do the following and report back — do not tell me it's done unless step 3 actually confirms it:\n\n1. Run `claude mcp list` to see what's already configured.\n2. Add the GitHub MCP server: `claude mcp add --transport http github https://api.githubcopilot.com/mcp/ --header \"Authorization: Bearer [MY GITHUB PAT]\"` (I'll paste my actual token in place of the bracket).\n3. Run `claude mcp list` again and confirm github shows as Connected.\n4. Prove it works: list the open issues in this repository using the GitHub MCP tools. If step 3 or 4 fails, tell me the exact error and the most likely cause (bad token, missing scope, wrong URL) instead of reporting success.\n```\n\nThis works because Claude Code can run its own `claude mcp` commands and then immediately call the newly connected server — so it proves real repo access instead of just confirming a config entry exists.\n\n| Requirement | Why You Need It | Time | \n|---|---|---|\n| Claude Code installed | Provides the `claude mcp` command used to register the server | 0 min | \n| A GitHub personal access token (PAT) | Authenticates every request — the remote server has no browser-based OAuth login yet | ~2 min | \n| Repo access on that token | The token needs to actually see the repos you want Claude Code to work with | included above | \n\nPrefer to do it by hand instead of delegating to the agent? Here’s the manual version.\n\n~2 min\n\nIn GitHub, go to Settings → Developer settings → Personal access tokens → Fine-grained tokens, and generate one scoped to the specific repositories you want Claude Code to access (avoid granting it every repo on your account unless you actually need that).\n\n~1 min\n\nNote the trailing slash on the URL — leaving it off is a common source of connection errors:\n\n```\nclaude mcp add --transport http github https://api.githubcopilot.com/mcp/ --header \"Authorization: Bearer YOUR_GITHUB_PAT\"\n```\n\nIf you’d rather not send requests to GitHub’s hosted endpoint, GitHub also publishes an official Docker image you can run locally:\n\n```\nclaude mcp add github -e GITHUB_PERSONAL_ACCESS_TOKEN=YOUR_GITHUB_PAT \\\n  -- docker run -i --rm -e GITHUB_PERSONAL_ACCESS_TOKEN ghcr.io/github/github-mcp-server\n```\n\nThe remote version above is faster to set up and updates automatically, so it’s the better default unless you have a specific reason to self-host.\n\nRun `claude` to start a fresh session. Newly added servers need a restart (or the `/mcp` panel refresh) before Claude Code can see their tools.\n\nIssues, pull requests, and CI status, read straight from GitHub.\n\n| Piece | What It Does | \n|---|---|\n| Remote HTTP endpoint | GitHub-hosted server at `api.githubcopilot.com/mcp/` — no local process, always up to date | \n| `Authorization: Bearer` header | Passes your PAT with every request — this is what scopes what Claude Code can actually see and do | \n| Fine-grained token scope | Limits access to specific repos instead of your whole account — the safer default | \n| Local Docker alternative | Same tools, but self-hosted — useful if you can’t send traffic to GitHub’s hosted endpoint | \n\n```\nclaude mcp list\n```\n\n✔ github    Connected\n\n! github    Needs authentication\n\n✘ github    Failed to connect\n\nA “Connected” status only confirms the handshake, not that the token can actually see your repos. Confirm real access with an in-session prompt:\n\n```\nUsing the GitHub MCP tools, list the 5 most recently updated issues in [owner/repo].\n```\n\nIf it comes back with real issue titles instead of an auth or permissions error, the token and scope are both working.\n\n`/mcp` without the final `/` is a frequent cause of connection failures on the remote endpoint.`.mcp.json`.` claude mcp list`.\nNot yet for GitHub’s remote server — unlike some other MCP servers, it currently requires a personal access token rather than a one-click OAuth login inside Claude Code.\n\nRemote is the better default — it’s faster to set up, needs no local process, and updates automatically. Use Docker only if you specifically can’t send traffic to GitHub’s hosted endpoint.\n\nRead and search code, open and comment on issues and pull requests, check CI/workflow status, and browse commit history — scoped to whatever your token can access.\n\nUsually a missing, expired, or incorrectly scoped token. Regenerate it in GitHub settings and re-run the `claude mcp add` command with the new value.\n\nYes — `claude mcp remove github` deletes it from the config.\n\n`claude mcp` command reference\n*Originally published at [quickpromptco.com](https://quickpromptco.com/github-mcp-server-claude-code-setup-guide/), where the guide is kept up to date.*", "url": "https://wpnews.pro/news/github-mcp-server-for-claude-code-direct-repo-pr-and-ci-access-in-3-minutes", "canonical_source": "https://dev.to/juholee/github-mcp-server-for-claude-code-direct-repo-pr-and-ci-access-in-3-minutes-1m50", "published_at": "2026-10-01 12:02:23+00:00", "updated_at": "2026-10-01 12:14:21.502474+00:00", "lang": "en", "topics": ["ai-agents", "agent-protocols", "developer-tools", "ai-tools"], "entities": ["GitHub", "Claude Code", "Anthropic", "GitHub Copilot"], "also_reported_by": [], "alternates": {"html": "https://wpnews.pro/news/github-mcp-server-for-claude-code-direct-repo-pr-and-ci-access-in-3-minutes", "markdown": "https://wpnews.pro/news/github-mcp-server-for-claude-code-direct-repo-pr-and-ci-access-in-3-minutes.md", "text": "https://wpnews.pro/news/github-mcp-server-for-claude-code-direct-repo-pr-and-ci-access-in-3-minutes.txt", "jsonld": "https://wpnews.pro/news/github-mcp-server-for-claude-code-direct-repo-pr-and-ci-access-in-3-minutes.jsonld"}}