GitHub-MCP
Provides tools for interacting with GitHub, including managing repositories, Actions workflows/runs/logs/secrets, releases and assets, branch protection, webhooks, Pages, deploy keys, repository deletion, and calling arbitrary GitHub REST endpoints via gh_api.
This server does not currently have a deployable release on Glama. Follow the repository's setup instructions to install and configure it for your MCP client, including any required credentials and local dependencies.
GitHub-MCP
A self-hosted GitHub connector for Claude (any MCP client) with real OAuth sign-in and optional full control
over your GitHub account: repos, Actions runs and logs, releases and assets, branch protection, webhooks, Pages,
Actions secrets, and a generic REST escape hatch (gh_api) that can call any endpoint.
No personal access token to leak. You sign in with GitHub (OAuth App). Your GitHub token is never stored: it only exists inside AES-256-GCM encrypted access/refresh tokens that Claude holds.
No database. Tokens, auth codes and client ids are sealed, stateless blobs. Runs fine on Render's free tier.
Locked to you. Only GitHub logins in
ALLOWED_GITHUB_USERScan finish a login.Hardened OAuth 2.1: PKCE (S256) required, consent page, cookie-bound state, single-use codes, refresh token rotation with reuse detection,
/revoke, rate limiting, redirect URIs limited toclaude.ai/claude.com.
Full control is the default (
FULL_CONTROL=true): every repo your token can reach, writes and deletes with no confirmation. Anyone who can sign in as an allowed user, or hold a valid token, has that power. SetFULL_CONTROL=falseto turn onALLOWED_REPOS,READ_ONLYand confirmation-gated destructive actions.
Setup (about 10 minutes)
Fork or clone this repo and deploy it as a Node web service (a
render.yamlblueprint is included).Create a GitHub OAuth App: GitHub -> Settings -> Developer settings -> OAuth Apps -> New.
Homepage URL:
https://YOUR-SERVICE.onrender.comAuthorization callback URL:
https://YOUR-SERVICE.onrender.com/github/callbackGenerate a client secret.
Set environment variables on the service (see
.env.example):GITHUB_CLIENT_ID,GITHUB_CLIENT_SECRET,ALLOWED_GITHUB_USERS. With the includedrender.yamlblueprint, Render also generatesENCRYPTION_KEYfor you and the server reads its own URL fromRENDER_EXTERNAL_URL, so you do not setPUBLIC_URL. On other hosts setPUBLIC_URLandENCRYPTION_KEY(openssl rand -base64 32) yourself. The default Render URL ishttps://github-mcp.onrender.com. If Render gives you a different URL, update the OAuth App's callback URL to match.Add the connector in Claude: Settings -> Connectors -> Add custom connector ->
https://YOUR-SERVICE.onrender.com/mcp. Claude registers itself, shows a consent page, sends you through the GitHub login, and you are connected. Works on web, desktop and mobile.
Organization repos: an OAuth App needs the organization's approval (GitHub -> your org -> Settings -> Third-party access). Without it the org's private repos stay invisible.
Related MCP server: remote-mcp-oauth-github
How the login works
Claude --register--> /register (stateless client id, redirect host must be claude.ai/claude.com)
Claude --browser---> /authorize (consent page, PKCE S256 required, cookie nonce)
/authorize/approve --> github.com/login/oauth/authorize
GitHub --browser---> /github/callback (checks the login against ALLOWED_GITHUB_USERS)
Claude --code------> /token (verifies PKCE, returns sealed access + refresh tokens)
Claude --Bearer----> /mcp (token unsealed per request, your GitHub token used for that call)Access tokens last 1 hour, refresh tokens 30 days and rotate on every use. Revoke a token with POST /revoke.
To log everyone out at once, change ENCRYPTION_KEY or revoke the app at
GitHub -> Settings -> Applications.
Tools
Area | Tools |
Account |
|
Actions |
|
Releases |
|
Admin |
|
Anything else |
|
Every write is logged to stdout (visible in your host's logs). Tokens are never logged.
Run locally
npm install
cp .env.example .env # fill it in; use http://localhost:3000 as PUBLIC_URL and the callback URL
export $(grep -v '^#' .env | grep . | xargs) && ALLOW_LOCALHOST_REDIRECTS=true npm start
npm test # end-to-end OAuth tests against a mock GitHubFor quick local hacking without OAuth, AUTH_MODE=static uses one GITHUB_TOKEN and a secret URL
/mcp/<MCP_SECRET>. Do not use static mode for a public deployment.
Security
See SECURITY.md for the threat model and how to report a problem.
License
MIT
This server cannot be deployed
Maintenance
Related MCP Connectors
Access the GitHub API, enabling file operations, repository management, search functionality, and…
Operate GitHub from your AI assistant: repos, PRs, issues, Actions. Previews and read-only mode.
GitHub Copilot MCP: code, repo, PR, workflow tools for AI assistants.
Connect AI assistants to GitHub - manage repos, issues, PRs, and workflows through natural language.
Related MCP Servers
- FlicenseNot gradedqualityDmaintenanceEnables browsing GitHub profile, repositories, issues, and pull requests directly in Claude conversation through OAuth authentication.-
- AlicenseNot gradedqualityDmaintenanceEnables Claude to authenticate with GitHub OAuth and access tools for user information, calculations, and GitHub repositories.5MIT
- FlicenseAqualityDmaintenanceConnects Claude to GitHub, enabling listing repositories, browsing open pull requests, and inspecting PR diffs for code review.4-
- FlicenseNot gradedqualityBmaintenanceEnables claude.ai to connect to GitHub MCP using OAuth, providing full toolset for repository, issue, PR, Actions, and gist operations.-