[FEATURE] GitHub MCP Connector for claude.ai web (OAuth-based PR Reviews)

Status Fixed / completed
Maintainer reply None cached
Activity 6 comments · opened Mar 1, 2026 · closed Mar 24, 2026

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 chat
  • actions:read — check CI status during review
  • contents: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

View original on GitHub ↗

6 Comments

haalfi · 6 months ago

Dear @claude, which one is the best matching repo for that feature request?

ThePlenkov · 6 months ago

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!

haalfi · 6 months ago

At least there is a workaround to have gh cli installed and get rid of the search:

  1. In project/user .claude folder place a file named setup-gh.sh with 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
```

  1. Reference it in same folder within settings.json to 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"
}
]
}
]
}
}
``

  1. (Optional) within Claude.md at same scope you can give clear instructions on usage, e.g.

``md
## GitHub CLI (
gh`) — restricted usage

The gh CLI is installed via a SessionStart hook (.claude/setup-gh.sh).
It requires a GITHUB_TOKEN environment 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 metadata
  • gh pr diff — read PR diffs
  • gh pr review — submit a review with comments
  • gh 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:

levino · 5 months ago

I built https://github-mcp.levinkeller.de/ and it scratches my itch. Maybe yours too?

haalfi · 5 months ago

Replaced with security issue: #38209

github-actions[bot] · 5 months ago

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.