GitHub MCP Server

The most comprehensive GitHub MCP server - Full GitHub workflow automation with Actions monitoring, advanced PR management, intelligent code search, and complete file management. Built for AI-powered development teams.
๐ New here? See the Quick Start Guide
๐ AI-Optimized for Token Efficiency
This server is designed with AI agents in mind:
Response Formats
| Format | Use Case | Token Savings |
|---|
compact | Discovery, lists, status checks | 80-97% smaller |
json | Full details when needed | Full response |
markdown | Human-readable display | Formatted text |
Real-World Savings
| Resource | Full JSON | Compact | Savings |
|---|
| Commit | ~3,000 chars | ~100 chars | 97% |
| Issue | ~2,500 chars | ~150 chars | 94% |
| Repository | ~4,000 chars | ~200 chars | 95% |
| PR Overview | ~20,000 chars | ~1,800 chars | 91% (GraphQL) |
Smart Usage
// Default: Use compact for most operations
const issues = await callMCPTool("github_list_issues", {
owner: "user", repo: "repo",
limit: 10,
response_format: "compact" // 94% smaller!
});
// Use json only when you need every field
const fullIssue = await callMCPTool("github_get_issue", {
owner: "user", repo: "repo",
issue_number: 42,
response_format: "json"
});
Combined with our code-first architecture (98% token reduction), you get the most efficient GitHub MCP server available.
๐ Documentation:
โจ What's New
๐ Latest: v2.5.6 - AI Optimization & Token Efficiency (December 18, 2025)
- ๐ฆ Compact Format Rollout - 26 tools now support
response_format: "compact" (80-97% token savings!)
- ๐ง ETag Cache Fix - Fixed critical bug where cache returned empty data on 304 responses
- ๐ AI-Agnostic Guide -
CLAUDE.md renamed to MCP_GUIDE.md with instructions for Claude, Cursor, Windsurf, Copilot, Cline
- ๐ Security Tool Docs - Added permission requirements for Dependabot, Code Scanning, Secret Scanning tools
- ๐ GraphQL Optimization - PR overview via GraphQL is 91% smaller than REST equivalent
- โ
320 tests passing - Full CI validation
v2.5.5 - MCP Registry Ready (December 17, 2025)
- ๐ Removed admin-only tools (delete_repository, transfer_repository)
- โ Added delete tools (delete_release, delete_gist)
- ๐ง Fixed return data for create_branch, create_file, create_pull_request
- โ
Test coverage expanded to 320 tests
Previous: v2.5.1 - Architecture Refactor & Performance (December 9, 2025)
- ๐๏ธ Modular Architecture -
github_mcp.py split into modular package structure
- โก Connection Pooling - 97% latency reduction (4000ms โ 108ms for subsequent calls)
- ๐ง DictโModel Conversion -
callMCPTool now works seamlessly with plain JavaScript objects
- ๐ Multiline Code Support - Fixed truncation issues, full JSON protocol support
- โ
Live Integration Tests - 15/15 passing, 320 total tests
- ๐ฆ 21 Tool Modules - Clean organization: tools/, models/, utils/, auth/
Previous: v2.5.0 - Phase 2 Full Send (December 4, 2025)
MAJOR RELEASE: 47 new tools added (62 โ 109 total tools)! Comprehensive GitHub API coverage.
New in v2.5.0:
- ๐ GitHub Actions Expansion (12 tools) - Complete workflow management: get/trigger workflows, manage runs/jobs, artifacts
- ๐ Security Suite (13 tools) - Dependabot, Code Scanning, Secret Scanning, Security Advisories
- ๐ Projects (9 tools) - Classic project boards: list/create/update projects, manage columns
- ๐ฌ Discussions (7 tools) - Community discussions: list/get discussions, categories, comments, create/update discussions, add comments (GraphQL)
- ๐ Notifications (6 tools) - User notifications: list/manage threads, subscriptions
- ๐ฅ Collaborators & Teams (3 tools) - Repository access management
Previous: v2.4.0 - Phase 1 Tool Expansion (December 4, 2025)
15 new tools added (48 โ 62 total tools)!
New in v2.4.0:
- ๐ฏ Issue Comments -
github_add_issue_comment for commenting on issues
- ๐ Gists - Full CRUD operations:
github_list_gists, github_get_gist, github_create_gist, github_update_gist
- ๐ท๏ธ Labels - Complete label management:
github_list_labels, github_create_label, github_delete_label
- โญ Stargazers - Star/unstar repositories:
github_list_stargazers, github_star_repository, github_unstar_repository
- ๐ค User Context - Enhanced user operations:
github_get_authenticated_user, github_list_user_repos, github_list_org_repos, github_search_users
- โ
Restored -
github_get_user_info back in TypeScript definitions
Previous: v2.3.1 - Code-First Mode Enforced by Default (January 26, 2025)
- ๐ฏ Default Enforcement - Code-first mode now defaults to
true (was false)
- ๐ Zero Configuration - New users get 98% token reduction automatically
- โ
Documentation Alignment - Code now matches documentation claims
- ๐ง Architectural Integrity - True reference implementation of code-first MCP
Previous: v2.3.0 - Architecture Formalization (January 26, 2025)
Single-Tool Architecture Formalized: The intended design from day one - one tool, 98% token reduction!
New in v2.3.0:
- ๐ฏ Architecture Clarification - Single-tool design formalized (always the intended architecture)
- ๐ ๏ธ CLI Utilities - Development diagnostics moved to CLI (
github-mcp-cli)
- ๐ Testing Excellence - 320 tests, 63% coverage (up from 181 tests, 55%)
- โ
33 New Tests - Comprehensive coverage of auth, utilities, and tool operations
- ๐ Documentation Updates - Clear architecture documentation and CLI usage
v2.2.0 - Enterprise Ready (November 20, 2025)
GitHub App Authentication: 3x rate limits (15,000 vs 5,000 requests/hour) with fine-grained permissions!
New in v2.2.0:
- ๐ GitHub App Authentication - Enterprise-grade auth with installation-based access
- โก 3x Rate Limits - 15,000 requests/hour vs 5,000 with PAT
- ๐ Dual Authentication - Automatic App โ PAT fallback
- ๐ 19 Auth Fixes - Consistent authentication across all tools
- โ
100% Backward Compatible - Existing PAT users unaffected
v2.1.0 - Enhanced Tool Discovery (November 19, 2025)
Zero Failed Tool Calls: Intelligent tool discovery eliminates discovery issues while maintaining 98% token efficiency!
New in v2.1.0:
๐ Tool Discovery Functions
- listAvailableTools() - Discover all tools on-demand
- searchTools(query) - Find relevant tools by keyword
- getToolInfo(name) - Get complete schemas with examples
- Discovery in code - No extra tokens loaded into Claude's context!
Benefits:
- โ
Zero failed tool calls from discovery issues
- โ
Professional first-time user experience
- โ
Maintains 98% token reduction
- โ
Complete type information for all tools
๐ v2.0.0 - Revolutionary Code-First Architecture (November 18, 2025)
The Game Changer: 98% token reduction (70,000 โ 800 tokens)!
New Architecture:
- Single
execute_code tool exposed to Claude
- Write TypeScript code calling 112 tools on-demand
- 95% faster initialization (45s โ 2s)
- 98% cost reduction ($1.05 โ $0.01 per workflow)
Total Tools: 1 tool exposed to MCP clients (execute_code) ๐
Internal Tools: 61 GitHub tools available via execute_code
Token Efficiency: 98% reduction vs traditional MCP
๐ฆ Recently Shipped
v1.5.0 (Nov 6, 2025) - Infrastructure Upgrade
- Repository-rooted operations & chunk reading
- GraphQL optimization (80% faster PR queries)
View Full Changelog
Workspace Configuration
The workspace tools (workspace_grep, workspace_str_replace, workspace_read_file) enable powerful local file operations on YOUR projects.
What are Workspace Tools?
These tools allow Claude to:
- ๐ Search your codebase efficiently (
workspace_grep)
- โ๏ธ Edit files with surgical precision (
workspace_str_replace)
- ๐ Read file chunks without loading entire files (
workspace_read_file)
Setting Your Workspace Root
Method 1: Claude Desktop Configuration
Edit your Claude Desktop config file (location varies by OS):
macOS:
{
"mcpServers": {
"github-mcp": {
"command": "python3",
"args": ["-m", "github_mcp"],
"env": {
"GITHUB_TOKEN": "ghp_...",
"MCP_WORKSPACE_ROOT": "/Users/yourname/projects/my-app"
}
}
}
}
Windows:
{
"mcpServers": {
"github-mcp": {
"command": "python",
"args": ["-m", "github_mcp"],
"env": {
"GITHUB_TOKEN": "ghp_...",
"MCP_WORKSPACE_ROOT": "C:\\Users\\yourname\\projects\\my-app"
}
}
}
}
Linux:
{
"mcpServers": {
"github-mcp": {
"command": "python3",
"args": ["-m", "github_mcp"],
"env": {
"GITHUB_TOKEN": "ghp_...",
"MCP_WORKSPACE_ROOT": "/home/yourname/projects/my-app"
}
}
}
}
Method 2: Environment Variable