GitHub MCP Server
Provides tools for managing GitHub repositories, including issue and pull request operations, CI/CD status checks, milestone management, and batch operations for labels and project linking.
Click on "Deploy 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 Server check CI status for main branch"
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
Python MCP (Model Context Protocol) server for GitHub operations, providing native tool integration with Claude Code and other MCP clients.
Features
16 GitHub Tools: Issues, PRs, CI status, milestones, and batch operations
Native MCP Integration: Works seamlessly with Claude Code
Structured Responses: Type-safe, well-formatted tool outputs
Batch Operations: Parallel execution for bulk operations
Environment-Based Config: Configure default repository via environment variables
Related MCP server: GitHub MCP Server
Installation
From PyPI
pip install github-mcp-server
# or with uv
uvx github-mcp-serverFrom Source
git clone https://github.com/rriesco/github-mcp-server.git
cd github-mcp-server
uv syncConfiguration
Environment Variables
Variable | Required | Description |
| Yes | GitHub Personal Access Token with |
| No | Default repository owner for all operations |
| No | Default repository name for all operations |
Claude Code Configuration
Add to your MCP configuration (~/.config/claude-code/mcp-config.json):
{
"mcpServers": {
"github-manager": {
"type": "stdio",
"command": "uvx",
"args": ["github-mcp-server"],
"env": {
"GITHUB_TOKEN": "${GITHUB_TOKEN}",
"GITHUB_OWNER": "your-username",
"GITHUB_REPO": "your-repo"
}
}
}
}Getting a GitHub Token
Click "Generate new token (classic)"
Select scope:
repo(full repository access)Copy the generated token
Available Tools
Issue Operations
Tool | Description |
| Create one or more issues (parallel execution for multiple) |
| Get full issue details including body |
| Query issues with filtering (state, labels, milestone, assignee) |
| Close an issue with optional comment |
Pull Request Operations
Tool | Description |
| Create PR with structured content (problem, solution, changes) |
| Get PR details including mergeable status |
| Update PR title, body, base branch, or state |
| Merge PR with method selection (squash/merge/rebase) |
CI/CD Operations
Tool | Description |
| Check workflow run status for a branch |
| Get CI logs for debugging failed jobs |
Batch Operations
Tool | Description |
| Update multiple issues in parallel |
| Add labels to multiple issues |
| Link issues to GitHub Project (v2) |
Milestone Operations
Tool | Description |
| Create a milestone with optional due date |
| List milestones with filtering |
Usage Examples
Create an Issue
result = create_issues(
issues=[{
"title": "Implement feature X",
"body": "## Description\n\nDetails here...",
"labels": ["enhancement"],
"milestone": 1
}],
owner="your-username",
repo="your-repo"
)Check CI Status
result = check_ci_status(
branch="feature-branch",
owner="your-username",
repo="your-repo"
)Create a PR
result = create_pr_with_content(
title="feat: add new feature",
problem="Current behavior lacks X functionality",
solution="Implement X using approach Y",
key_changes="- Added X component\n- Updated Y module",
issue=42, # Optional: links to issue #42
owner="your-username",
repo="your-repo"
)Development
Prerequisites
Python >= 3.10
uv (recommended) or pip
GitHub Personal Access Token
Setup
git clone https://github.com/rriesco/github-mcp-server.git
cd github-mcp-server
uv syncRunning Tests
# Unit tests only (fast)
uv run pytest -m "not integration" -v
# Integration tests (requires GITHUB_TOKEN, TEST_OWNER, TEST_REPO)
uv run pytest -m integration -v
# All tests with coverage
uv run pytest --cov=src --cov-report=term-missingType Checking
uv run mypy src/github_mcp_server --strictArchitecture
Claude Code / MCP Client
|
| MCP Protocol (stdio)
v
┌─────────────────────────────┐
│ Python FastMCP Server │
│ - Tool Registry │
│ - PyGithub Client │
│ - Error Handling │
│ - Type Validation │
└─────────────┬───────────────┘
|
| PyGithub REST API
v
GitHub APIProject Structure
github-mcp-server/
├── src/github_mcp_server/
│ ├── server.py # Server entry point
│ ├── tools/
│ │ ├── issues.py # Issue operations
│ │ ├── pulls.py # PR operations
│ │ ├── ci.py # CI operations
│ │ ├── milestones.py # Milestone operations
│ │ └── batch_operations.py # Batch operations
│ ├── utils/
│ │ ├── github_client.py # Singleton PyGithub client
│ │ ├── errors.py # Structured error handling
│ │ └── types.py # Type definitions
│ └── config/
│ └── defaults.py # Environment-based defaults
└── tests/
├── test_*.py # Unit tests
└── integration/ # Integration testsLicense
MIT License - see LICENSE for details.
Links
Available Tools
15 toolsbatch_add_labelsA
Add labels to multiple issues in parallel. Labels are ADDED (not replaced).
Each operation: {issue_number (required), labels (required)}
Returns: {total, successful, failed, success_rate, execution_time_seconds, results}
Inputs: operations (required), owner, repo, max_workers. Returns: object
batch_link_to_projectA
Link multiple issues to a GitHub Project (v2) board in parallel.
project_id: Project node ID starting with "PVT_" (from GraphQL API, not project number) Requires token with project (write) scope.
Returns: {total, successful, failed, success_rate, execution_time_seconds, results}
Inputs: issue_numbers (required), project_id (required), owner, repo, +1 more. Returns: object
batch_update_issuesA
Update multiple GitHub issues in parallel (max 50 per batch).
Each update object: {issue_number (required), title, body, state, labels, milestone, assignees} Note: labels/assignees replace existing (not append).
Returns: {total, successful, failed, success_rate, execution_time_seconds, results}
Inputs: updates (required), owner, repo, max_workers. Returns: object
check_ci_statusA
Check CI workflow status for a branch. Returns overall and per-workflow status.
Returns: {overall_status, overall_conclusion, branch, workflows: [{name, status, conclusion, url, jobs}]}
If no CI runs found, returns status="no_runs".
Inputs: branch (required), owner, repo. Returns: object
close_issueB
Close a GitHub issue with optional comment and reason.
Optional:
comment: add closing comment before closing
state_reason: "completed" or "not_planned"
Returns: {number, state, state_reason, comment_added, url}
Inputs: issue_number (required), comment, state_reason, owner, +1 more. Returns: object
create_issuesA
Create GitHub issues (1 or more). Parallel execution for multiple.
Each issue: {title (required), body, labels, milestone, assignees}
Options:
max_workers: parallel workers (default: 5, max: 10)
Returns: {total, successful, failed, results: [{index, success, data/error}]}
Inputs: issues (required), owner, repo, max_workers. Returns: object
create_milestoneB
Create a GitHub milestone.
Optional:
description: markdown description
due_date: ISO 8601 format (e.g., "2025-12-31T23:59:59Z")
state: "open" (default) or "closed"
Returns: {number, title, description, state, due_on, url}
Inputs: title (required), description, due_date, state, +2 more. Returns: object
create_pr_with_contentA
Create a GitHub PR with structured content. Auto-detects current branch as head.
Required content:
problem: why this change is needed (2-4 sentences)
solution: how it works (4-8 sentences)
key_changes: bulleted markdown list of changes
Optional:
issue: GitHub issue number to close (adds "Closes #N" to PR)
Returns: {pr_number, url, state, head, base, created_at}
Inputs: title (required), problem (required), solution (required), key_changes (required), +4 more. Returns: object
get_ci_logsA
Get CI workflow logs for debugging failed jobs.
Provide either branch OR run_id (not both).
Optional filters:
job_name: filter by job name (e.g., "test", "lint")
status: "failure" (default), "success", or "all"
max_lines: tail N lines of logs (default: 200)
Returns: {run_id, run_url, branch, status, conclusion, jobs: [{job_id, name, status, conclusion, logs, log_url}]}
Inputs: branch, run_id, job_name, status, +3 more. Returns: object
get_issueC
Retrieve full GitHub issue details including body content.
Returns: {number, title, body, state, labels, milestone, created_at, updated_at, url}
Inputs: issue_number (required), owner, repo. Returns: object
get_pull_requestB
Get PR details including mergeable status and statistics.
Returns: {number, title, state, merged, mergeable, mergeable_state, draft, head, base, commits, additions, deletions, changed_files, created_at, updated_at, merged_at, url}
mergeable_state: "clean", "dirty", "unstable", "blocked", or "unknown"
Inputs: pr_number (required), owner, repo. Returns: object
list_issuesA
List and filter GitHub issues with pagination.
Optional filters:
state: "open" (default), "closed", or "all"
labels: filter by label names
milestone: filter by milestone title (not number)
assignee: filter by username, or "none" for unassigned
sort: "created" (default), "updated", or "comments"
limit: max issues to return (default: 30, max: 100)
Returns: {total, count, issues: [{number, title, state, labels, milestone, assignee, url}]}
Inputs: state, labels, milestone, assignee, +5 more. Returns: object
list_milestonesA
List repository milestones with filtering and sorting.
Options:
state: "open" (default), "closed", or "all"
sort: "due_on" (default) or "completeness"
direction: "asc" (default) or "desc"
Returns: {total, milestones: [{number, title, state, open_issues, closed_issues, due_on, url}]}
Inputs: state, sort, direction, owner, +1 more. Returns: object
merge_prA
Merge a PR after checking mergeable status.
Options:
merge_method: "squash" (default), "merge", or "rebase"
commit_title/commit_message: custom merge commit text (squash/merge only)
delete_branch: delete head branch after merge (default: True)
Returns: {merged, sha, message, branch_deleted}
Inputs: pr_number (required), merge_method, commit_title, commit_message, +3 more. Returns: object
update_prA
Update PR metadata. Only provided fields are updated; None values ignored.
Optional updates:
title: new PR title
body: new PR description
base: change base branch
state: "open" or "closed"
Returns: {number, title, state, updated_fields, url}
Note: Cannot update merged PRs.
Inputs: pr_number (required), title, body, base, +3 more. Returns: object
Tool Schema Changelog
Recent tool additions, removals, and schema changes observed during successful MCP inspections.
Loading tool schema changelog…
TDQS
Scored across 15 tools
Each tool targets a distinct resource or operation: issues (create, get, list, close, batch update, batch add labels), milestones (create, list), PRs (create, get, update, merge), and CI (check status, get logs). No two tools have overlapping purposes.
All tool names follow a consistent verb_noun pattern in snake_case (e.g., close_issue, create_milestone, get_ci_logs). Batch operations are prefixed with 'batch_', and names are descriptive without mixing conventions.
15 tools is a well-scoped set for a GitHub MCP server. It covers core workflows without being overly numerous or too sparse, providing a balanced surface for common development tasks.
The tool set covers CRUD-like operations for issues, PRs, milestones, and CI monitoring. Minor gaps exist (e.g., no tool for adding comments to issues, managing individual labels, or PR review actions), but the core workflows are well-supported, and agents can work around the gaps.
Maintenance
Related MCP Connectors
Create, deploy, and operate MCP servers directly from your GitHub repositories.
GitHub Copilot MCP: code, repo, PR, workflow tools for AI assistants.
Nifty's MCP server — exposes tasks, projects, messages, and files as tools for AI agents.
An MCP server that gives your AI access to the source code and docs of all public github repos
Related MCP Servers
- AlicenseBqualityDmaintenanceAn MCP server that enables Claude and other compatible LLMs to interact with the GitHub API, supporting features like creating issues, retrieving repository information, listing issues, and searching repositories.4ISC
- AlicenseBqualityDmaintenanceAn MCP server that allows Claude and other MCP-compatible LLMs to interact with the GitHub API, supporting features like creating issues, getting repository information, listing issues, and searching repositories.4ISC
- AlicenseBqualityCmaintenanceMCP 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.158 npmMIT