Skip to content

Instantly share code, notes, and snippets.

@monperrus
Created May 5, 2026 20:30
Show Gist options
  • Select an option

  • Save monperrus/838e2d005d931a4575ef18bd65146701 to your computer and use it in GitHub Desktop.

Select an option

Save monperrus/838e2d005d931a4575ef18bd65146701 to your computer and use it in GitHub Desktop.
Claude.ai GitHub MCP Connector with Write Access

Claude.ai GitHub MCP Connector with Write Access

Problem

The built-in GitHub MCP connector in Claude.ai is read-only. It can read files and repositories (including private ones), but cannot perform any write operations such as:

  • Creating branches
  • Pushing or editing files
  • Creating pull requests

This is because Anthropic registered the GitHub OAuth App with read-only scopes. No matter how many times you disconnect and reconnect the GitHub integration in Claude.ai settings, the OAuth flow never requests write permissions — they were never included in the app's configuration.

Attempting to create a branch via the MCP returns:

403 Resource not accessible by integration

Solution: Register Your Own GitHub OAuth App and Connect It as a Custom MCP

You can bypass Anthropic's read-only OAuth app by registering your own GitHub OAuth App and connecting it to Claude.ai as a custom MCP server pointing at https://api.githubcopilot.com/mcp.

Steps

  1. Go to https://github.com/settings/developersNew OAuth App
  2. Fill in:
    • Application name: e.g. My Claude MCP
    • Homepage URL: https://claude.ai
    • Authorization callback URL: https://claude.ai
  3. In Claude.ai → Settings → Integrations → Add custom MCP server, enter:
    • URL: https://api.githubcopilot.com/mcp
    • OAuth App: use the Client ID and Client Secret from your newly created GitHub OAuth App
  4. During the OAuth flow, approve repo scope (read + write) for your app
  5. Claude.ai will now have full read+write access to your repositories via the GitHub MCP

Why This Works

https://api.githubcopilot.com/mcp is the official GitHub MCP endpoint. The built-in Claude.ai connector already uses it, but with a restrictive OAuth app. By registering your own OAuth app with repo scope and pointing Claude.ai's custom MCP at the same endpoint, you get full write access.

Proper Fix

Anthropic should update their built-in GitHub OAuth App registration to request repo scope by default, so users don't have to go through this workaround. Feedback can be submitted via the thumbs-down button in any Claude.ai conversation.

References

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