Built by Metorial, the integration platform for agentic AI.

Learn More

    Server Summary

    • Manage GitHub repositories

    • Track issues and PRs

    • Review and merge code

    • Search code repositories

GitHub MCP Server

A comprehensive Model Context Protocol (MCP) server that provides seamless integration with GitHub's API. This server enables AI assistants and applications to interact with GitHub repositories, issues, pull requests, and more through a standardized interface. Whether you're managing projects, reviewing code, or automating workflows, this server provides the tools you need to work effectively with GitHub.

Overview

The GitHub MCP Server transforms how AI applications interact with GitHub by providing a rich set of capabilities for repository management, issue tracking, pull request workflows, and code exploration. It supports both read and write operations, allowing you to query repository information, create and update issues, manage pull requests, review code, and even modify repository contents directly through the MCP protocol.

This server is designed for developers, project managers, and teams who want to leverage AI assistance for their GitHub workflows. By exposing GitHub's functionality through MCP, it enables natural language interactions with your repositories while maintaining full control over your development process.

Features

Repository Management

Browse and search repositories across GitHub, create new repositories, fork existing ones, and access detailed repository metadata. The server provides comprehensive repository discovery capabilities with flexible filtering and sorting options.

Issue Tracking

Full-featured issue management including listing, creating, updating, and commenting on issues. Filter issues by state, labels, and sort criteria to quickly find what you need. Assign issues to team members and organize your project workflow efficiently.

Pull Request Workflows

Complete pull request lifecycle management from creation to review. List open and closed pull requests, create new ones from branches, update existing pull requests, and submit code reviews with inline comments.

Code Exploration

Search for code across repositories, browse repository contents, view files at specific commits or branches, and navigate directory structures. Perfect for code discovery and understanding project organization.

File Operations

Create and update files directly in repositories with commit messages, making it easy to automate content updates or documentation changes without leaving your AI workflow.

Branch Management

List and access branch information to understand repository structure and manage parallel development efforts.

Tools

list_repositories

List repositories for a specific user or organization, or search across all of GitHub. Supports pagination and multiple sorting options.

Parameters:

  • username (optional): GitHub username or organization to list repositories for
  • search_query (optional): Search query to find repositories across GitHub
  • sort (optional): Sort by created, updated, pushed, full_name, or stars
  • page (optional): Page number for pagination (default: 1, min: 1)
  • per_page (optional): Results per page (default: 30, min: 1, max: 100)

list_issues

List issues for a repository with comprehensive filtering options to find exactly what you need.

Parameters:

  • owner (required): Repository owner username
  • repo (required): Repository name
  • state (optional): Filter by open, closed, or all issues (default: open)
  • labels (optional): Comma-separated list of label names
  • sort (optional): Sort by created, updated, or comments
  • page (optional): Page number (default: 1, min: 1)
  • per_page (optional): Results per page (default: 30, min: 1, max: 100)

list_pull_requests

List pull requests for a repository with filtering and sorting capabilities.

Parameters:

  • owner (required): Repository owner username
  • repo (required): Repository name
  • state (optional): Filter by open, closed, or all pull requests (default: open)
  • sort (optional): Sort by created, updated, popularity, or long-running
  • page (optional): Page number (default: 1, min: 1)
  • per_page (optional): Results per page (default: 30, min: 1, max: 100)

create_issue

Create a new issue in a repository with title, description, labels, and assignees.

Parameters:

  • owner (required): Repository owner username
  • repo (required): Repository name
  • title (required): Issue title
  • body (optional): Issue description or body content
  • labels (optional): Array of label names to apply
  • assignees (optional): Array of usernames to assign to the issue

update_issue

Update an existing issue's title, body, state, labels, or assignees.

Parameters:

  • owner (required): Repository owner username
  • repo (required): Repository name
  • issue_number (required): Issue number to update
  • title (optional): New issue title
  • body (optional): New issue body
  • state (optional): Set to open or closed
  • labels (optional): Array of label names
  • assignees (optional): Array of usernames to assign

create_issue_comment

Add a comment to an existing issue for discussion and collaboration.

Parameters:

  • owner (required): Repository owner username
  • repo (required): Repository name
  • issue_number (required): Issue number to comment on
  • body (required): Comment content

create_pull_request

Create a new pull request to merge changes from one branch into another.

Parameters:

  • owner (required): Repository owner username
  • repo (required): Repository name
  • title (required): Pull request title
  • head (required): Branch name containing your changes
  • base (required): Branch name you want to merge into
  • body (optional): Pull request description
  • draft (optional): Create as draft pull request

update_pull_request

Update an existing pull request's title, body, or state.

Parameters:

  • owner (required): Repository owner username
  • repo (required): Repository name
  • pull_number (required): Pull request number
  • title (optional): New pull request title
  • body (optional): New pull request body
  • state (optional): Set to open or closed

create_pull_request_review

Submit a review on a pull request with approval, change requests, or comments.

Parameters:

  • owner (required): Repository owner username
  • repo (required): Repository name
  • pull_number (required): Pull request number
  • event (required): Review action - APPROVE, REQUEST_CHANGES, or COMMENT
  • body (optional): Overall review comment
  • comments (optional): Array of line-specific comments, each with path, body, line, side, and position

list_commits

List commits in a repository with pagination support.

Parameters:

  • owner (required): Repository owner username
  • repo (required): Repository name
  • sha (optional): SHA or branch name to start listing from
  • page (optional): Page number (default: 1, min: 1)
  • per_page (optional): Results per page (default: 30, min: 1, max: 100)

list_branches

List all branches in a repository.

Parameters:

  • owner (required): Repository owner username
  • repo (required): Repository name
  • page (optional): Page number (default: 1, min: 1)
  • per_page (optional): Results per page (default: 30, min: 1, max: 100)

create_repository

Create a new repository for the authenticated user.

Parameters:

  • name (required): Repository name
  • description (optional): Repository description
  • private (optional): Make repository private (default: false)
  • auto_init (optional): Initialize repository with README

search_code

Search for code across GitHub repositories using GitHub's code search syntax.

Parameters:

  • query (required): Search query (e.g., "console.log repo:owner/name")
  • sort (optional): Sort by indexed
  • order (optional): Sort direction - asc or desc
  • page (optional): Page number (default: 1, min: 1)
  • per_page (optional): Results per page (default: 30, min: 1, max: 100)

list_repository_contents

List contents of a directory in a repository, perfect for browsing file structures.

Parameters:

  • owner (required): Repository owner username
  • repo (required): Repository name
  • path (optional): Directory path, empty for root (default: "")
  • ref (optional): Branch, tag, or commit SHA

create_or_update_file

Create a new file or update an existing file in a repository.

Parameters:

  • owner (required): Repository owner username
  • repo (required): Repository name
  • path (required): File path in repository
  • message (required): Commit message
  • content (required): File content (automatically base64 encoded)
  • sha (optional): Blob SHA of existing file (required for updates)
  • branch (optional): Branch to commit to

fork_repository

Create a fork of a repository to your account or an organization.

Parameters:

  • owner (required): Repository owner username
  • repo (required): Repository name
  • organization (optional): Organization name to fork to

Resource Templates

repository

Access comprehensive repository details and metadata including description, stars, forks, and more.

URI Pattern: github://repository/{owner}/{repo}

repository-file

Retrieve the content of a specific file from a repository.

URI Pattern: github://repository/{owner}/{repo}/file/{path}

issue

Access detailed information about a specific issue including comments, labels, and current state.

URI Pattern: github://issue/{owner}/{repo}/{issue_number}

pull-request

Access comprehensive pull request details including diff information, review status, and comments.

URI Pattern: github://pull/{owner}/{repo}/{pull_number}

user

Retrieve user or organization profile information including bio, repository count, and public activity.

URI Pattern: github://user/{username}

branch

Access information about a specific branch including the latest commit and protection status.

URI Pattern: github://repository/{owner}/{repo}/branch/{branch}

Use Cases

The GitHub MCP Server excels in numerous scenarios:

Project Management: Quickly triage issues, assign tasks to team members, and track project progress through natural language queries and commands.

Code Review: Streamline the review process by listing pending pull requests, examining changes, and submitting reviews with detailed feedback.

Repository Discovery: Search across GitHub to find relevant code examples, libraries, or projects that match specific criteria.

Documentation Updates: Create or update documentation files directly in repositories with proper commit messages and branch targeting.

Workflow Automation: Build automated workflows that respond to repository events, create issues from templates, or manage release processes.

Team Collaboration: Facilitate team communication by commenting on issues and pull requests, mentioning team members, and organizing work with labels.

The server provides a complete toolkit for GitHub integration, making it an essential component for any AI-powered development workflow. Whether you're building automation tools, creating development assistants, or enhancing project management capabilities, this MCP server provides the foundation for sophisticated GitHub interactions.