GitHub MCP Server: Poor authentication UX - 2 hours to fail
Resolved 💬 3 comments Opened Jan 19, 2026 by SHAI-LE Closed Mar 11, 2026
Summary
Spent 2 hours trying to configure the GitHub MCP server with Claude Code, ultimately unsuccessfully. The experience was frustrating and should be significantly improved.
Environment
- Windows 10/11
- Claude Code CLI
- GitHub CLI (
gh) already authenticated and working gh auth statusshows: Logged in as SHAI-LE with scopes: gist, read:org, repo, workflow
Expected Behavior
GitHub MCP server should either:
- Automatically use existing
ghCLI authentication (ideal) - Have clear, documented setup steps that work first time
Actual Experience
Problem 1: No integration with existing gh auth
ghCLI was already authenticated with full repo permissions- MCP server ignored this and required separate PAT configuration
- Users shouldn't need to manage two separate auth mechanisms for the same service
Problem 2: Unclear config file location
- Documentation unclear on where MCP settings should live
- Multiple potential locations:
~/.claude/settings.json,%APPDATA%/Claude/, etc. - No way to verify which config file is being read
- No command like
claude config showto see active MCP configuration
Problem 3: Unhelpful error messages
- First error:
Authentication Failed: Requires authentication- doesn't say WHERE to configure - After adding PAT:
Authentication Failed: Bad credentials- doesn't say what's wrong with credentials - No guidance on token format expected (
ghp_vsgho_vsgithub_pat_)
Problem 4: OAuth token incompatibility
gh auth logincreatesgho_OAuth tokens- MCP server apparently requires
ghp_PAT tokens - This incompatibility is not documented anywhere
- Error message doesn't indicate this is the issue
Problem 5: No config validation
- After configuring PAT in config file, no way to test if config was read
- No feedback on whether MCP server loaded successfully
- Restart required but no confirmation it picked up new config
Steps Taken (all failed)
- Verified
ghCLI authenticated - Added PAT to config file as documented
- Restarted Claude Code
- Still got auth errors
- Generated new PAT with correct scopes
- Updated config, restarted
- Still failing with "Bad credentials"
Suggestions for Improvement
- Use existing gh auth: MCP server should read from
gh authtoken store (keyring) by default
- Clear config location: Single, documented location with
claude mcp configcommand to view/edit
- Config validation:
claude mcp test githubcommand to verify authentication works
- Better errors:
- "Token not found. Add GITHUB_PERSONAL_ACCESS_TOKEN to ~/.claude/mcp.json"
- "Token format invalid. Expected ghp_ PAT, got gho_ OAuth token"
- Setup wizard:
claude mcp setup githubthat walks through auth interactively
Impact
- 2 hours wasted on what should be 2-minute setup
- User gave up and cannot use GitHub MCP integration
- Poor first impression of Claude Code MCP ecosystem
---
Reported from Claude Code session.
This issue has 3 comments on GitHub. Read the full discussion on GitHub ↗