GitHub MCP Server
Provides comprehensive GitHub integration with 73 tools across 12 categories for managing repositories, branches, files, pull requests, issues, workflows, releases, users, organizations, search, gists, and notifications via the GitHub REST API.
Allows managing GitHub Actions workflows including listing, triggering, monitoring, canceling, and re-running 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 MCP Serverlist open issues in owner/repo"
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
MCP server for GitHub operations — 73 tools for repos, PRs, issues, actions, releases, search, and more.
A comprehensive Model Context Protocol (MCP) server that exposes the full GitHub REST API as AI-ready tools. Connect your AI assistant (Cursor, Claude Desktop, or any MCP client) to manage GitHub through natural language.
Author: Pawan Gunjkar (pawangunjkar@gmail.com)
📥 Install
Option 1: PyPI / uvx (Recommended)
No clone required — install and run directly:
uvx pawangunjkar-github-mcpCursor / Claude Desktop — add to .cursor/mcp.json or claude_desktop_config.json:
{
"mcpServers": {
"github": {
"command": "uvx",
"args": ["pawangunjkar-github-mcp"],
"env": {
"GITHUB_TOKEN": "ghp_your-token-here",
"GITHUB_PROTOCOL": "ssh"
}
}
}
}Option 2: Smithery
npx -y @smithery/cli install github-mcp --client cursorOr browse smithery.ai and search for github-mcp.
Option 3: Clone from GitHub
git clone https://github.com/Pawangunjkar/github-mcp.git
cd github-mcp
uv sync
uv run server.pySee PUBLISHING.md for PyPI, Smithery, and directory submission steps.
Related MCP server: @cloud9-labs/mcp-github
✨ Features
🔌 73 tools across 12 categories — full GitHub API coverage
🔐 PAT authentication — Personal Access Token with Bearer auth
🔄 SSH + HTTPS — supports both clone/push protocols
📄 Auto-pagination — transparently handles paginated API responses
⚡ Rate limit aware — tracks and warns on low rate limits
💾 Credential caching — auto-connect from env vars or cached credentials
🏢 GitHub Enterprise — configurable API URL for GHE servers
🎯 Zero configuration — just set env vars and run
🚀 Quick Start
Prerequisites
Python 3.10+
uv package manager
GitHub account with a Personal Access Token
1. Clone & Install
cd github-mcp
uv sync2. Configure Credentials
Option A: Environment Variables (Recommended)
cp .env.example .env
# Set your GitHub PAT
GITHUB_TOKEN=ghp_your-personal-access-token
GITHUB_PROTOCOL=ssh # or 'https'Option B: Connect via chat
github_connect(token="ghp_xxxxxxxxxxxx", protocol="ssh")3. Generate a Personal Access Token
Go to GitHub → Settings → Developer settings → Personal access tokens
Click "Generate new token" (classic)
Select scopes:
repo,workflow,read:org,gist,notifications,delete_repoClick Generate and copy the token
4. Run the Server
# For Cursor / Claude Desktop (stdio transport)
uv run server.py
# For testing with MCP Inspector
uv run mcp dev server.py🛠️ Tool Reference (73 Tools)
Category 1: Connection & Authentication (4 tools)
Tool | Description |
| Connect with Personal Access Token |
| Disconnect current session |
| Show connection status, user info, rate limits |
| Save credentials to disk cache |
Category 2: Repository Management (10 tools)
Tool | Description |
| List repos for authenticated user or any user/org |
| Get detailed repo info (stars, forks, languages) |
| Create a new repository |
| Delete a repository permanently |
| Fork a repository |
| Update repo settings (description, visibility) |
| Get repo topics/tags |
| Set repo topics/tags |
| Get language breakdown |
| List repo contributors |
Category 3: Branch & Tag Management (8 tools)
Tool | Description |
| List all branches |
| Get branch details and protection status |
| Create a new branch from a ref |
| Delete a branch |
| Set branch protection rules |
| List all tags |
| Create a lightweight or annotated tag |
| Compare two branches (ahead/behind, diff) |
Category 4: File & Content Operations (6 tools)
Tool | Description |
| Get file content (auto-decodes base64) |
| Create a new file via commit |
| Update a file via commit |
| Delete a file via commit |
| Get directory tree listing |
| Get SSH or HTTPS clone URL |
Category 5: Pull Requests (10 tools)
Tool | Description |
| List pull requests (open, closed, all) |
| Get PR details (diff stats, reviews, status) |
| Create a new pull request |
| Update PR title, body, base branch |
| Merge a PR (merge, squash, or rebase) |
| Close a PR without merging |
| List files changed in a PR |
| List reviews on a PR |
| Request reviewers for a PR |
| Add a comment on a PR |
Category 6: Issues (8 tools)
Tool | Description |
| List issues with filters (state, labels, assignee) |
| Get issue details |
| Create a new issue |
| Update issue title, body, labels, assignees |
| Close an issue |
| Add a comment on an issue |
| List comments on an issue |
| Add labels to an issue/PR |
Category 7: Actions & Workflows (7 tools)
Tool | Description |
| List all workflows in a repo |
| Trigger a workflow dispatch event |
| List workflow runs |
| Get details of a specific run |
| Get workflow run logs |
| Cancel a running workflow |
| Re-run a workflow |
Category 8: Releases (5 tools)
Tool | Description |
| List all releases |
| Get release details and assets |
| Create a release (with auto-generated notes) |
| Delete a release |
| Get the latest release |
Category 9: Users & Organizations (5 tools)
Tool | Description |
| Get user profile info |
| List repos for a specific user |
| Get organization info |
| List repos for an organization |
| List organization members |
Category 10: Search (4 tools)
Tool | Description |
| Search repositories (with qualifiers) |
| Search code across GitHub |
| Search issues and PRs |
| Search users and organizations |
Category 11: Gists (4 tools)
Tool | Description |
| List gists |
| Create a new gist |
| Get gist content and details |
| Delete a gist |
Category 12: Webhooks & Notifications (2 tools)
Tool | Description |
| List unread notifications |
| Mark notifications as read |
🔗 SSH vs HTTPS Support
The server supports both protocols. Set your preference via:
Environment variable:
GITHUB_PROTOCOL=ssh(orhttps)Connection parameter:
github_connect(token="...", protocol="ssh")
Feature | SSH | HTTPS |
Clone URL |
|
|
Auth | SSH key on machine | PAT or credential helper |
Default | ✅ Preferred | Fallback |
Tools like github_create_repo, github_fork_repo, and github_get_clone_url return URLs in both formats.
⚙️ Configuration
Environment Variables
Variable | Required | Default | Description |
| Yes | — | Personal Access Token |
| No |
| API URL (change for GitHub Enterprise) |
| No |
| Preferred clone protocol ( |
| No |
| Request timeout in seconds |
| No |
| Credential cache directory |
Cursor Integration
Add to .cursor/mcp.json:
{
"mcpServers": {
"github": {
"command": "uvx",
"args": ["pawangunjkar-github-mcp"],
"env": {
"GITHUB_TOKEN": "ghp_your-token-here",
"GITHUB_PROTOCOL": "ssh"
}
}
}
}Alternative (from source):
{
"mcpServers": {
"github": {
"command": "uv",
"args": ["run", "--directory", "/path/to/github-mcp", "server.py"],
"env": {
"GITHUB_TOKEN": "ghp_your-token-here",
"GITHUB_PROTOCOL": "ssh"
}
}
}
}Claude Desktop Integration
Add to claude_desktop_config.json:
{
"mcpServers": {
"github": {
"command": "uvx",
"args": ["pawangunjkar-github-mcp"],
"env": {
"GITHUB_TOKEN": "ghp_your-token-here",
"GITHUB_PROTOCOL": "ssh"
}
}
}
}💡 Example Usage
Repository Management
"List all my repos sorted by recent activity"
→ github_list_repos(sort="updated")
"Show me the details of the linux-ssh-mcp repo"
→ github_get_repo(owner="Pawangunjkar", repo="linux-ssh-mcp")
"Fork the fastapi repo to my account"
→ github_fork_repo(owner="tiangolo", repo="fastapi")Pull Requests & Code Review
"Create a PR from feature-branch to main"
→ github_create_pr(owner="me", repo="my-app", title="Add login feature", head="feature-branch", base="main")
"Show me the files changed in PR #42"
→ github_list_pr_files(owner="me", repo="my-app", pr_number=42)
"Merge PR #42 with squash"
→ github_merge_pr(owner="me", repo="my-app", pr_number=42, merge_method="squash")GitHub Actions
"Trigger the deploy workflow on main branch"
→ github_trigger_workflow(owner="me", repo="my-app", workflow_id="deploy.yml", ref="main")
"Show recent workflow runs"
→ github_list_workflow_runs(owner="me", repo="my-app")
"Cancel the running workflow"
→ github_cancel_workflow_run(owner="me", repo="my-app", run_id=12345)Search
"Find popular Python MCP servers on GitHub"
→ github_search_repos(query="mcp server language:python stars:>10")
"Search for FastMCP usage in code"
→ github_search_code(query="FastMCP language:python")📁 Project Structure
github-mcp/
├── server.py # Main MCP server — 73 tool definitions
├── github_client.py # GitHub REST API client (HTTP, auth, pagination)
├── credential_store.py # Credential caching (env vars, memory, file)
├── pyproject.toml # Project metadata & dependencies
├── .env.example # Example environment variables
├── .gitignore # Python gitignore
├── LICENSE # MIT license
└── README.md # This file🔒 Security Notes
PAT tokens are stored in
~/.github-mcp-cache/credentials.jsonwith restrictive file permissions (600)Never commit
.envfiles or tokens to version controlUse fine-grained tokens when possible for minimum required access
The server tracks rate limits and warns when running low
📄 License
MIT License — see LICENSE for details.
Maintenance
Resources
Unclaimed servers have limited discoverability.
Looking for Admin?
If you are the server author, to access and configure the admin panel.
Related MCP Servers
- AlicenseBqualityAmaintenanceMCP server that exposes GitHub operations as tools for AI agents, enabling code search, issue management, and PR review.12MIT
- AlicenseBqualityDmaintenanceMCP (Model Context Protocol) server for GitHub API integration. This server provides comprehensive tools for interacting with GitHub repositories, issues, pull requests, branches, and code search through a unified interface.157MIT
- Alicense-qualityDmaintenanceAn MCP server that provides tools for interacting with the GitHub API, enabling AI assistants to query repositories, pull requests, issues, commits, users, and more.570ISC
- Alicense-qualityBmaintenanceAn MCP server that enables GitHub API operations such as managing repositories, issues, and pull requests through natural language.570ISC
Related MCP Connectors
An MCP server that gives your AI access to the source code and docs of all public github repos
Markdown-first MCP server for Notion API with 8 composite tools and 39 actions.
A MCP server built for developers enabling Git based project management with project and personal…
Latest Blog Posts
- Who's Calling? MCP Hosts Are an Identity Blind Spot (And the Spec Knows It)By Om-Shree-0709 on .mcpAgent IdentityOAuth 2.1
- Your AI Chatbot Just Exposed Your CEO's Salary to an InternBy Om-Shree-0709 on .Agent IdentityMCP SecurityOAuth Delegation
- Why MCP Servers Need Execution Sandboxing (And Why Your Current Stack Isn't Enough)By Om-Shree-0709 on .Agentic AiPrompt InjectionWebAssembly
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/Pawangunjkar/github-mcp'
If you have feedback or need assistance with the MCP directory API, please join our Discord server