[FEATURE] GitHub MCP Connector for claude.ai web (OAuth-based PR Reviews)
Preflight Checklist
- [x] I have searched existing requests and this feature hasn't been requested yet
- [x] This is a single feature request (not multiple features)
Problem Statement
Problem
Claude Code CLI has full GitHub OAuth integration — read, write, push, PR comments — via gh auth. But claude.ai web has no GitHub connector, despite MCP infrastructure already being in place (Gmail, Google Calendar, etc.).
This forces developers to either:
- Paste fine-grained PATs into chat (token in conversation history, security concern)
- Switch to Claude Code CLI just to post PR review comments
- Copy-paste review output manually from claude.ai to GitHub
There is no way to use delegated OAuth for GitHub in claude.ai web today.
Why This Matters
PR review is one of the highest-value developer workflows for LLMs. The current claude.ai web experience is excellent for analyzing diffs (paste + discuss), but the last mile — posting the review back to GitHub — requires leaving the product or compromising on security.
Claude Code CLI solves this, but many developers prefer the web UI for review work (better rendering, file uploads, project context, persistent chat history).
Proposed Solution
Add a GitHub MCP connector to the claude.ai integrations catalog, using GitHub's OAuth App or GitHub App flow — same auth delegation pattern as the existing Gmail/Calendar connectors.
Minimum viable scopes
| Scope | Use case |
|---|---|
| pull_requests:read | Fetch PR diffs, metadata, existing comments |
| pull_requests:write | Post review comments, approve/request changes |
| issues:read | Context from linked issues |
| contents:read | Read repo files for review context |
Scoped per-repo (fine-grained), not org-wide.
Optional follow-up scopes
issues:write— create/update issues from chatactions:read— check CI status during reviewcontents:write— commit suggestions directly
Alternative Solutions
Paste fine-grained PATs into chat. But the agents flags this as clear security problem, too!
Priority
High - Significant impact on productivity
Feature Category
MCP server integration
Use Case Example
_No response_
Additional Context
Context
- MCP connector infrastructure already exists in claude.ai (Gmail, Google Calendar ship today)
- Claude Code CLI already implements GitHub OAuth via
gh auth— the integration pattern is proven - GitHub supports fine-grained PATs and GitHub Apps with granular repo-level permissions
- Competitors (Cursor, Copilot) have native GitHub integration in their web/IDE surfaces
6 Comments
Dear @claude, which one is the best matching repo for that feature request?
I agree - this is embarassing to have Github connector enabled and see how Claude is struggling to connect to Github searching for gh cli every time!
At least there is a workaround to have gh cli installed and get rid of the search:
.claudefolder place a file namedsetup-gh.shwith content```bash
#!/bin/bash
set -e
# Install GitHub CLI if not present (Linux containers only — skips on macOS/Windows)
if ! command -v gh &>/dev/null; then
if [ "$(uname -s)" = "Linux" ]; then
echo "Installing GitHub CLI..."
curl -fsSL https://cli.github.com/packages/githubcli-archive-keyring.gpg \
| dd of=/usr/share/keyrings/githubcli-archive-keyring.gpg 2>/dev/null
echo "deb [arch=$(dpkg --print-architecture) signed-by=/usr/share/keyrings/githubcli-archive-keyring.gpg] https://cli.github.com/packages stable main" \
| tee /etc/apt/sources.list.d/github-cli.list >/dev/null
apt-get update -qq && apt-get install -y -qq gh >/dev/null 2>&1
echo "GitHub CLI installed."
else
echo "Skipping gh install (not Linux). Install manually: https://cli.github.com"
fi
fi
# Authenticate if GITHUB_TOKEN is set and gh is not already authenticated
if [ -n "$GITHUB_TOKEN" ] && ! gh auth status &>/dev/null; then
echo "$GITHUB_TOKEN" | gh auth login --with-token
echo "GitHub CLI authenticated."
fi
```
settings.jsonto run the script at session start:``
json
``{
"$schema": "https://json.schemastore.org/claude-code-settings.json",
"hooks": {
"SessionStart": [
{
"matcher": "",
"hooks": [
{
"type": "command",
"command": ".claude/setup-gh.sh"
}
]
}
]
}
}
``
mdgh`) — restricted usage## GitHub CLI (
The
ghCLI is installed via a SessionStart hook (.claude/setup-gh.sh).It requires a
GITHUB_TOKENenvironment variable with PR read/write scope.> Environment note: These restrictions exist primarily for web/iOS sessions
> (Code on Mobile, claude.ai) where Claude operates with less interactive
> oversight. In the VS Code extension on your local machine, every tool call
> requires your explicit approval, so the guardrails are enforced interactively.
> The rules below apply to both environments for consistency.
Allowed operations (only when the user explicitly asks):
gh pr view— read PR metadatagh pr diff— read PR diffsgh pr review— submit a review with commentsgh api— post review comments on specific lines```
Working example: https://github.com/haalfi/remote-store
Struggling gone, but still gh token must be pasted :wink:
I built https://github-mcp.levinkeller.de/ and it scratches my itch. Maybe yours too?
Replaced with security issue: #38209
This issue has been automatically locked since it was closed and has not had any activity for 7 days. If you're experiencing a similar issue, please file a new issue and reference this one if it's relevant.