GitHub MCP Server

1

Add it to Claude Code

Run this in a terminal.

Run in terminal
claude mcp add -e "GITHUB_TOKEN=${GITHUB_TOKEN}" github-mcp -- uv run --directory /path/to/github-mcp python -m github_mcp
Required:GITHUB_TOKEN
README.md

A comprehensive Model Context Protocol server for the GitHub API

GitHub MCP Server

A comprehensive Model Context Protocol (MCP) server for the GitHub API, built with Python and the official MCP SDK.

This server exposes 87 tools across 25 categories, enabling AI agents like Claude to interact with GitHub repositories, issues, pull requests, discussions, projects, and more.

Features

Category Tools Description
Repositories 7 List, get, create, fork repos; list commits; get commit details; get file contents
Issues 6 List, get, create, update issues; manage comments
Pull Requests 8 List, get, create, update, merge PRs; view files/commits; update branch
Search 4 Search repositories, code, issues, and users
Actions 4 List workflows/runs, trigger workflows, cancel runs
Releases 4 List, get latest, create releases; get release by tag
Tags 2 List tags, get annotated tag details
Git 2 Get repository tree, push multiple files in a single commit
Organizations 3 List orgs, get details, list members
Branches 3 List, create, delete branches
Branch Protection 3 Get, update, delete branch protection rules
Webhooks 3 List, create, delete repository webhooks
Files 2 Create/update and delete files via the Contents API
PR Reviews 2 Create and list pull request reviews
Review Comments 3 List, create, reply to PR review comments
Commit Statuses 4 List/create commit statuses; list/get check runs
Labels 3 List, create, delete repository labels
Gists 4 List, get, create, update gists
Stars 3 List starred repos, star/unstar repositories
Users 2 Get authenticated user info, get any user's profile
Notifications 3 List notifications, mark as read
Collaborators 3 List, add, remove repository collaborators
Discussions 4 List, get discussions; view comments; list categories (GraphQL)
Projects (Classic) 2 List repository and organization projects
Projects V2 3 List, get projects; list project items (GraphQL)

Requirements

Installation

git clone https://github.com/software-engineer-mj/github-mcp.git
cd github-mcp
uv sync

Configuration

cp .env.example .env

Edit the .env file:

GITHUB_TOKEN=ghp_your_token_here

Token Permissions

Depending on which tools you use, your token needs these scopes:

Scope Required For
repo Repositories, issues, PRs, branches, webhooks, collaborators, files, tags, git
read:org Organizations, org members, org projects
gist Gists
notifications Notifications
user Authenticated user info, starring
workflow GitHub Actions (trigger, cancel)
read:discussion Discussions
project Projects (Classic), Projects V2

Usage

stdio (default)

uv run python -m github_mcp

Docker

docker build -t github-mcp .

docker run -e GITHUB_TOKEN=ghp_your_token github-mcp

MCP Client Configuration

Claude Desktop

Add to claude_desktop_config.json:

macOS: ~/Library/Application Support/Claude/claude_desktop_config.json Windows: %APPDATA%\Claude\claude_desktop_config.json

{
  "mcpServers": {
    "github": {
      "command": "uv",
      "args": ["run", "--directory", "/path/to/github-mcp", "python", "-m", "github_mcp"],
      "env": {
        "GITHUB_TOKEN": "ghp_your_token_here"
      }
    }
  }
}

Claude Code

Add to .mcp.json:

{
  "mcpServers": {
    "github": {
      "command": "uv",
      "args": ["run", "--directory", "/path/to/github-mcp", "python", "-m", "github_mcp"],
      "env": {
        "GITHUB_TOKEN": "ghp_your_token_here"
      }
    }
  }
}

Development

# Install with dev dependencies
uv sync --dev

# Run tests
uv run pytest tests/ -v

# Lint
uv run ruff check src/ tests/

# Format
uv run ruff format src/ tests/

# Type check
uv run mypy src/

Tool Reference

Repositories

Tool Description
list_repositories List repositories for a user or organization
get_repository Get detailed repository information
create_repository Create a new repository
fork_repository Fork a repository
list_commits List commits with optional filters (author, date range)
get_commit Get commit details including stats and changed files
get_file_contents Get file contents or directory listing

Issues

Tool Description
list_issues List issues with filters (state, labels, assignee)
get_issue Get detailed issue informatio

Tools (9)

list_repositoriesList repositories for a user or organization
get_repositoryGet detailed repository information
create_repositoryCreate a new repository
fork_repositoryFork a repository
list_commitsList commits with optional filters
get_commitGet commit details including stats and changed files
get_file_contentsGet file contents or directory listing
list_issuesList issues with filters
get_issueGet detailed issue information

Environment Variables

GITHUB_TOKENrequiredGitHub Personal Access Token with required scopes

Configuration

claude_desktop_config.json
{"mcpServers": {"github": {"command": "uv", "args": ["run", "--directory", "/path/to/github-mcp", "python", "-m", "github_mcp"], "env": {"GITHUB_TOKEN": "ghp_your_token_here"}}}}

Try it

List all open issues in my repository and summarize the top 3 priorities.
Create a new branch named 'feature/login-fix' in the current repository.
Find the latest pull request in the repository and list the files changed.
Search for all Python files in the repository that contain the string 'TODO'.
Trigger the 'deploy' workflow for the main branch.

Frequently Asked Questions

What are the key features of GitHub MCP Server?

Comprehensive access to 87 GitHub API tools across 25 categories.. Manage repositories, issues, pull requests, and project boards.. Automate GitHub Actions workflows and release management.. Support for branch protection rules and repository webhooks.. Built with Python and the official Model Context Protocol SDK..

What can I use GitHub MCP Server for?

Automating the triage and labeling of incoming GitHub issues.. Generating summaries of pull request changes for code reviews.. Syncing project board status with repository activity.. Triggering CI/CD workflows directly from an AI chat interface.. Quickly searching through repository codebases for specific patterns..

How do I install GitHub MCP Server?

Install GitHub MCP Server by running: git clone https://github.com/software-engineer-mj/github-mcp.git && cd github-mcp && uv sync

What MCP clients work with GitHub MCP Server?

GitHub MCP Server works with any MCP-compatible client including Claude Desktop, Claude Code, Cursor, and other editors with MCP support.

Turn this server into reusable context

Keep GitHub MCP Server docs, env vars, and workflow notes in Conare so your agent carries them across sessions.

Need the old visual installer? Open Conare IDE.
Open Conare