Provides tools for managing GitHub repositories, branches, issues, pull requests, collaborators, releases, gists, and searching repositories.
Enables listing, triggering, and inspecting GitHub Actions workflow runs.
Click on "Install Server".
Wait a few minutes for the server to deploy. Once ready, it will show a "Started" state.
In the chat, type
@followed by the MCP server name and your instructions, e.g., "@github-mcplist my recent pull requests"
That's it! The server will respond to your query, and you can continue using it as needed.
Here is a step-by-step guide with screenshots.
🐙 GitHub MCP Server
👁 License: MIT
👁 Python 3.10+
👁 MCP
👁 Tools
A Model Context Protocol (MCP) server that wraps the GitHub CLI (gh) to provide 39 tools across 12 categories — manage repos, branches, issues, PRs, workflows, collaborators, and more, directly from Claude Desktop or Claude Code.
🚀 Features
Repository Management — Create, clone, list, view, and delete repos
Git Operations — Add, commit, push, pull, init + push in one command
Branch Management — Create, list, switch, and delete branches
Forking — Fork repos and sync forks with upstream
Issues — Create, list, and comment on issues
Pull Requests — Create, list, comment, merge, review, and diff PRs
Collaborators — List and add collaborators to repos
File Operations — Read and create/update files via the GitHub API
Workflows — List, trigger, and inspect GitHub Actions workflow runs
Releases — Create and list releases
Gists — Create gists from content
Search — Search repositories across GitHub
Security — Path sandboxing, input validation, read-only mode, audit logging
Remote Access — SSE transport with OAuth 2.0 authentication via ngrok tunnel
Related MCP server: Git MCP
📦 Prerequisites
1. Install GitHub CLI
# macOS
brew install gh
# Ubuntu/Debian
sudo apt install gh
# Windows
winget install GitHub.cli2. Authenticate
gh auth login
gh auth status # Verify you're logged in3. Python 3.10+
python --version # Must be 3.10 or higher🔧 Installation
# Clone the repository
git clone https://github.com/prateekaryann/github-mcp.git
cd github-mcp
# Create virtual environment
python -m venv venv
source venv/bin/activate # Windows: venv\Scripts\activate
# Install dependencies
pip install -r requirements.txt🔌 Usage — Local (stdio)
This is the simplest setup. Claude Desktop or Claude Code launches the server as a subprocess.
Claude Desktop
Add to your claude_desktop_config.json:
OS | Config path |
macOS |
|
Windows |
|
Linux |
|
{
"mcpServers": {
"github": {
"command": "python",
"args": ["/path/to/github-mcp/server.py"],
"cwd": "/path/to/github-mcp"
}
}
}Restart Claude Desktop after adding the configuration.
Claude Code
claude mcp add github -- python /path/to/github-mcp/server.py🌐 Usage — Remote (SSE + OAuth)
For remote access, the server runs an SSE endpoint with OAuth 2.0 authentication, exposed via an ngrok tunnel.
Step 1: Start an ngrok tunnel
ngrok http 8080
# Note the HTTPS forwarding URL, e.g. https://abc123.ngrok-free.appOr use the included helper scripts:
# Linux/macOS
./tunnel.sh
# Windows (PowerShell)
.\tunnel.ps1Step 2: Start the server in SSE mode
export MCP_TRANSPORT=sse
export MCP_PORT=8080
export MCP_SERVER_URL=https://abc123.ngrok-free.app # Your ngrok URL
python server.pyStep 3: Connect from Claude Desktop
{
"mcpServers": {
"github-remote": {
"url": "https://abc123.ngrok-free.app/sse"
}
}
}The OAuth flow will prompt you to authorize when you first connect.
🛠️ Tools Reference
Auth (3)
Tool | Description |
| Check GitHub CLI authentication status |
| Get currently authenticated username |
| Switch between GitHub accounts |
Repos (5)
Tool | Description |
| Create a new GitHub repository |
| List repositories for a user/org |
| View repository details |
| Clone a repository locally |
| Delete a repository (requires |
Git (4)
Tool | Description |
| Get status of a local repository |
| Add, commit, and push in one command |
| Initialize local dir, create GitHub repo, and push |
| Pull latest changes from remote |
Branches (4)
Tool | Description |
| Create a new branch |
| List branches in a repository |
| Switch to a different branch |
| Delete a branch |
Forks (2)
Tool | Description |
| Fork a repository |
| Sync a fork with its upstream repository |
Issues (3)
Tool | Description |
| Create a new issue |
| List repository issues |
| Add a comment to an issue |
Pull Requests (6)
Tool | Description |
| Create a pull request |
| List pull requests |
| Add a comment to a PR |
| Merge a pull request |
| Submit a review on a PR |
| View the diff of a pull request |
Collaborators (2)
Tool | Description |
| List collaborators on a repository |
| Add a collaborator to a repository |
File Operations (2)
Tool | Description |
| Get the contents of a file from a repository |
| Create or update a file in a repository |
Gists (1)
Tool | Description |
| Create a GitHub gist |
Workflows (4)
Tool | Description |
| List GitHub Actions workflows for a repo |
| Trigger a workflow dispatch event |
| List recent workflow runs |
| View details of a specific workflow run |
Search (1)
Tool | Description |
| Search GitHub repositories |
Releases (2)
Tool | Description |
| Create a new GitHub release |
| List releases for a repository |
🔒 Security
Path Sandboxing
All local file operations are restricted to the WORK_DIR directory (default: ~/projects). Any path outside this directory is rejected, preventing unauthorized filesystem access.
Input Validation
Repository names, usernames, branch names, and file paths are validated against strict regex patterns to prevent injection attacks.
Read-Only Mode
Set READ_ONLY=true to restrict the server to safe, non-destructive operations only (list, view, search). All write operations will be blocked.
Audit Logging
Every tool invocation is logged with parameters to mcp_audit.log (configurable via LOG_FILE), providing a full audit trail of all operations.
OAuth 2.0 (Remote Mode)
When running in SSE mode, the server requires OAuth 2.0 authentication with configurable scopes (read, write). Client registration and token revocation are supported.
Dangerous Operation Confirmation
Destructive operations like delete_repo require an explicit confirm=True parameter to prevent accidental data loss.
⚙️ Configuration
Variable | Description | Default |
| Base directory for git operations (path sandbox root) |
|
| Block all write operations when |
|
| Path to the audit log file |
|
| Transport mode: |
|
| Port for SSE server |
|
| Public URL for OAuth issuer (ngrok URL) |
|
🏗️ Architecture
github-mcp/
├── server.py # Main MCP server — all 39 tools
├── oauth_provider.py # In-memory OAuth 2.0 provider (SSE mode)
├── requirements.txt # mcp[cli], uvicorn, starlette
├── tunnel.sh # ngrok tunnel helper (Linux/macOS)
├── tunnel.ps1 # ngrok tunnel helper (Windows)
├── README.md
├── LICENSE
└── .claude/
└── CLAUDE.md # Claude Code project instructions📝 License
MIT License — See LICENSE for details.
👤 Author
Prateek Aryan — @prateekaryann
Built for seamless GitHub integration with Claude.
This server cannot be installed
Maintenance
Resources
Unclaimed servers have limited discoverability.
Looking for Admin?
If you are the server author, to access and configure the admin panel.
Latest Blog Posts
MCP directory API
We provide all the information about MCP servers via our MCP API.
curl -X GET 'https://glama.ai/api/mcp/v1/servers/prateekaryann/github-mcp'
If you have feedback or need assistance with the MCP directory API, please join our Discord server
