mcp-github-server
Provides tools for comprehensive GitHub interaction including repository management, issue tracking, pull request operations, code search, CI/CD actions, and more.
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., "@mcp-github-serverlist 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.
mcp-github-server
A production-grade Model Context Protocol (MCP) server that gives LLMs deep access to GitHub repositories, issues, pull requests, actions, code search, and more.
Features
18 tools for comprehensive GitHub interaction
Dynamic resources for repos, issues, PRs, and files
4 prompt templates for PR review, issue triage, code review, and repo summaries
GitHub App + Personal Access Token authentication
Redis caching with in-memory fallback
Rate limit handling with exponential backoff and jitter
Full Zod validation on all inputs
Docker support for containerized deployment
Quick Start
Prerequisites
Node.js 20+
A GitHub Personal Access Token or GitHub App credentials
Installation
npm installConfiguration
Copy the example environment file and fill in your credentials:
cp .env.example .envRequired:
GITHUB_TOKEN=ghp_your_personal_access_tokenOr for GitHub App authentication:
GITHUB_APP_ID=12345
GITHUB_APP_PRIVATE_KEY="-----BEGIN RSA PRIVATE KEY-----\n..."
GITHUB_APP_INSTALLATION_ID=67890Running
# Development
npm run dev
# Production
npm run build
npm startDocker
# Build and run with Redis
docker compose up -d
# Or build manually
docker build -t mcp-github-server .
docker run -e GITHUB_TOKEN=ghp_xxx mcp-github-serverMCP Client Configuration
Add to your MCP client configuration (e.g., Claude Desktop):
{
"mcpServers": {
"github": {
"command": "node",
"args": ["/path/to/mcp-github-server/dist/index.js"],
"env": {
"GITHUB_TOKEN": "ghp_your_token"
}
}
}
}Tools
Repository Tools
Tool | Description |
| Search GitHub repositories with language, topic, and star filters |
| Get detailed repository information including stats and metadata |
| Get contributor stats, commit activity, and code frequency |
File Tools
Tool | Description |
| Read file content from a repository (auto-decodes base64) |
| List directory contents with type sorting |
| Search code across repos with language/file/path filters |
Issue Tools
Tool | Description |
| List/filter issues with pagination (excludes PRs) |
| Create new issues with labels, assignees, and milestones |
| Get detailed issue info with comments |
Pull Request Tools
Tool | Description |
| List PRs with state/branch filtering |
| Get PR details with diff, files, and reviews |
| Submit PR reviews (approve, request changes, comment) |
| Merge PRs with merge/squash/rebase strategies |
Branch Tools
Tool | Description |
| Create branches from ref, branch, or SHA |
| Compare branches with commit and file diffs |
Other Tools
Tool | Description |
| Get CI/CD workflow run status with optional job details |
| Create, update, delete, and list repository labels |
| Get commit log with author/path/date filtering |
Resources
Dynamic resource templates available via MCP resource protocol:
github://repos/{owner}/{repo}- Repository detailsgithub://repos/{owner}/{repo}/readme- Repository READMEgithub://repos/{owner}/{repo}/languages- Language breakdowngithub://repos/{owner}/{repo}/topics- Repository topicsgithub://repos/{owner}/{repo}/issues- Open issues listgithub://repos/{owner}/{repo}/issues/{number}- Issue detailsgithub://repos/{owner}/{repo}/pulls- Open PRs listgithub://repos/{owner}/{repo}/pulls/{number}- PR detailsgithub://repos/{owner}/{repo}/contents/{path}- File contentgithub://repos/{owner}/{repo}/tree/{path}- Directory listing
Prompts
Prompt | Description |
| Structured PR review with security/performance/architecture focus |
| Single or batch issue triage with priority classification |
| File/directory code review with depth levels |
| Comprehensive repository health and activity summary |
Configuration Reference
Variable | Default | Description |
| - | Personal access token |
| - | GitHub App ID |
| - | GitHub App private key |
| - | GitHub App installation ID |
| - | Redis connection URL (optional) |
|
| Redis key prefix |
|
| Default cache TTL |
|
| Max retries on rate limit |
|
| Base delay for exponential backoff |
|
| Logging level |
|
| Server name |
|
| Server version |
Development
# Install dependencies
npm install
# Run tests
npm test
# Run tests with coverage
npm run test:coverage
# Type check
npm run typecheck
# Lint
npm run lint
# Format
npm run formatArchitecture
src/
index.ts - Entry point, stdio transport setup
server.ts - MCP server with handler registration
config.ts - Environment-based configuration
types.ts - Shared TypeScript types and Zod schemas
schema_utils.ts - Zod-to-JSON-Schema converter
tools/ - 18 tool implementations with Zod validation
resources/ - Dynamic resource resolution (repos, issues, PRs, files)
prompts/ - 4 prompt templates for common workflows
github/
client.ts - Octokit wrapper with caching and retry
auth.ts - Token and GitHub App authentication
rate_limiter.ts - Exponential backoff with jitter
errors.ts - Typed GitHub error hierarchy
cache/
index.ts - Cache interface and in-memory implementation
redis_cache.ts - Redis-backed cache with TTLLicense
MIT
This server cannot be installed
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/sheeryn123/mcp-github-server'
If you have feedback or need assistance with the MCP directory API, please join our Discord server