GitHub MCP Integration
Connect Claude Code to GitHub for managing issues, PRs, repos, actions, and code search without leaving the terminal.
GitHub MCP Integration
GitHub MCP Integration is an MCP server that provides a comprehensive Model Context Protocol bridge for AI assistants to interact with the full GitHub ecosystem, supporting multiple transport types (stdio, SSE, HTTP) and advanced features including OAuth authentication, webhook management, and GitHub Actions integration. This server goes beyond basic repository operations to offer deep integration with GitHub's collaborative development platform, enabling AI-driven development workflows spanning code review, issue management, CI/CD orchestration, and team coordination.
When to Use This MCP Server
Connect this server when...
- You need a full-featured GitHub MCP integration supporting multiple transport types and advanced authentication patterns
- Your development workflow requires AI interaction with GitHub Actions, webhooks, and deployment environments
- You are building plugin-style integrations that bundle GitHub access as part of a larger MCP server configuration
- You need OAuth-based GitHub authentication rather than personal access token-based access
- Your team requires AI-driven automation across repositories, organizations, and GitHub Apps
Consider alternatives when...
- You only need basic repository, issue, and PR access (the simpler unified-github-integration may suffice)
- Your code hosting is on GitLab or Bitbucket rather than GitHub
- You only need local git operations without GitHub API interaction
Quick Start
# .mcp.json configuration (stdio method) { "mcpServers": { "github": { "command": "npx", "args": ["-y", "@modelcontextprotocol/server-github"], "env": { "GITHUB_PERSONAL_ACCESS_TOKEN": "ghp_your_token" } } } } # Alternative: SSE method for hosted deployment { "mcpServers": { "github": { "type": "sse", "url": "https://mcp.github.com/sse" } } }
Connection setup (stdio):
- Generate a fine-grained PAT at github.com/settings/tokens
- Select repository access and required permissions
- Add the stdio configuration to your
.mcp.json - Restart your MCP client to connect
Connection setup (SSE/OAuth):
- Add the SSE configuration to your
.mcp.json - On first connection, complete the OAuth flow in your browser
- Authentication is cached for subsequent sessions
Example tool usage:
# Manage GitHub Actions
> Show me the status of all workflow runs in the main branch for the past week
# Review deployments
> What environments are configured for the frontend repo and what is deployed to each?
# Coordinate PRs
> Create a draft PR from feature/auth-v2 to main with a summary of all commits
Core Concepts
| Concept | Purpose | Details |
|---|---|---|
| Transport Types | Flexible connectivity | Support for stdio (local), SSE (hosted with OAuth), and HTTP (token-based) connection methods |
| GitHub Actions | CI/CD integration | Access to workflow runs, job logs, deployment statuses, and action artifact management |
| OAuth Flow | Hosted authentication | Browser-based GitHub OAuth for SSE connections without managing personal access tokens locally |
| GitHub Apps | Advanced integration | Support for GitHub App authentication enabling organization-level access with granular permissions |
| Webhooks | Event handling | Configuration and management of repository webhooks for integrating external services |
Architecture:
+------------------+ +------------------+ +------------------+
| GitHub | | GitHub MCP | | AI Assistant |
| Platform |<----->| Integration |<----->| (Claude, etc.) |
| API + Actions | HTTPS | stdio/SSE/HTTP |varied | |
| + Webhooks | +------------------+ +------------------+
+------------------+
|
v
+------------------------------------------------------+
| Repos > Actions > PRs > Deploys > Webhooks > Apps |
+------------------------------------------------------+
Configuration
| Parameter | Type | Default | Description |
|---|---|---|---|
| GITHUB_PERSONAL_ACCESS_TOKEN | string | (for stdio) | Fine-grained PAT for stdio transport authentication |
| transport | string | stdio | Connection transport: stdio (local), sse (hosted/OAuth), or http (token-based remote) |
| url | string | none | MCP endpoint URL for SSE or HTTP transport methods |
| github_app_id | string | none | GitHub App ID for app-level authentication (alternative to PAT) |
| github_app_private_key | string | none | PEM private key for GitHub App authentication |
Best Practices
-
Choose the right transport for your use case. Use stdio for local development with PAT authentication, SSE for hosted deployments with OAuth convenience, and HTTP for server-to-server integrations with token-based auth. Each transport has different security and deployment characteristics.
-
Prefer fine-grained tokens over classic PATs. Fine-grained Personal Access Tokens can be scoped to specific repositories and permission sets. This limits the MCP server's access precisely to what your workflow needs, following the principle of least privilege.
-
Use GitHub Apps for organization-level automation. When building workflows that span multiple repositories or need organization-level access, configure GitHub App authentication. Apps provide granular permissions, installation-level access, and higher API rate limits than personal tokens.
-
Monitor GitHub Actions through the MCP for CI/CD visibility. Use the Actions integration to check workflow run statuses, review job logs, and identify failing steps. This enables the AI to help debug CI/CD failures and suggest fixes based on build log analysis.
-
Separate read and write operations with transport choice. For read-heavy analytics workflows, consider a read-only PAT with stdio transport. For workflows requiring write access (PR creation, issue management), use appropriately scoped tokens and implement review steps before AI-initiated changes.
Common Issues
OAuth flow fails with SSE transport. Ensure your browser can reach mcp.github.com and is not blocking third-party cookies or pop-ups. Corporate firewalls may block the OAuth callback URL. Try the stdio transport with a PAT as an alternative if OAuth continues to fail.
GitHub App authentication returns "not installed". The GitHub App must be installed on the target repository or organization. Go to the App's settings page and install it on the repositories you want to access. Verify the App's permissions match what the MCP server requires.
Actions API returns "Resource not accessible by integration". The token or App permissions do not include Actions access. For PATs, ensure the "actions" permission is selected. For GitHub Apps, the "Actions: Read" or "Actions: Read and Write" permission must be configured in the App settings.
Reviews
No reviews yet. Be the first to review this template!
Similar Templates
Database MCP Integration
MCP server configuration for connecting Claude Code to PostgreSQL, MySQL, and MongoDB databases. Enables schema inspection, query building, and migration generation.
Elevenlabs Server
Streamline your workflow with this official, elevenlabs, text, speech. Includes structured workflows, validation checks, and reusable patterns for audio.
Browser Use Portal
Powerful mcp for server, enables, agents, control. Includes structured workflows, validation checks, and reusable patterns for browser_automation.