github.com
github.com logo

GitHub

Manage repositories, issues, and search code via GitHub API.

Created byApr 22, 2025

GitHub MCP Server

Deprecation Notice: Development for this project has been moved to GitHub in the http://github.com/github/github-mcp-server repo.

MCP Server for the GitHub API, enabling file operations, repository management, search functionality, and more.

Features

  • Automatic Branch Creation: When creating/updating files or pushing changes, branches are automatically created if they don't exist
  • Comprehensive Error Handling: Clear error messages for common issues
  • Git History Preservation: Operations maintain proper Git history without force pushing
  • Batch Operations: Support for both single-file and multi-file operations
  • Advanced Search: Support for searching code, issues/PRs, and users

Tools

  1. create_or_update_file
  1. push_files
  1. search_repositories
  1. create_repository
  1. get_file_contents
  1. create_issue
  1. create_pull_request
  1. fork_repository
  1. create_branch
  1. list_issues
  1. update_issue
  1. add_issue_comment
  1. search_code
  1. search_issues
  1. search_users
  1. list_commits
  • Gets commits of a branch in a repository
  • Inputs:
  • Returns: List of commits
  1. get_issue
  • Gets the contents of an issue within a repository
  • Inputs:
  • Returns: Github Issue object & details
  1. get_pull_request
  • Get details of a specific pull request
  • Inputs:
  • Returns: Pull request details including diff and review status
  1. list_pull_requests
  • List and filter repository pull requests
  • Inputs:
  • Returns: Array of pull request details
  1. create_pull_request_review
  • Create a review on a pull request
  • Inputs:
  • Returns: Created review details
  1. merge_pull_request
  • Merge a pull request
  • Inputs:
  • Returns: Merge result details
  1. get_pull_request_files
  • Get the list of files changed in a pull request
  • Inputs:
  • Returns: Array of changed files with patch and status details
  1. get_pull_request_status
  • Get the combined status of all status checks for a pull request
  • Inputs:
  • Returns: Combined status check results and individual check details
  1. update_pull_request_branch
  • Update a pull request branch with the latest changes from the base branch (equivalent to GitHub's "Update branch" button)
  • Inputs:
  • Returns: Success message when branch is updated
  1. get_pull_request_comments
  • Get the review comments on a pull request
  • Inputs:
  • Returns: Array of pull request review comments with details like the comment text, author, and location in the diff
  1. get_pull_request_reviews
  • Get the reviews on a pull request
  • Inputs:
  • Returns: Array of pull request reviews with details like the review state (APPROVED, CHANGES_REQUESTED, etc.), reviewer, and review body

Search Query Syntax

Code Search

  • language:javascript: Search by programming language
  • repo:owner/name: Search in specific repository
  • path:app/src: Search in specific path
  • extension:js: Search by file extension
  • Example: q: "import express" language:typescript path:src/

Issues Search

  • is:issue or is:pr: Filter by type
  • is:open or is:closed: Filter by state
  • label:bug: Search by label
  • author:username: Search by author
  • Example: q: "memory leak" is:issue is:open label:bug

Users Search

  • type:user or type:org: Filter by account type
  • followers:>1000: Filter by followers
  • location:London: Search by location
  • Example: q: "fullstack developer" location:London followers:>100
For detailed search syntax, see GitHub's searching documentation.

Setup

Personal Access Token

Create a GitHub Personal Access Token with appropriate permissions:
  • Select which repositories you'd like this token to have access to (Public, All, or Select)
  • Create a token with the repo scope ("Full control of private repositories")
  • Copy the generated token

Usage with Claude Desktop

To use this with Claude Desktop, add the following to your claude_desktop_config.json:

Docker

NPX

Build

Docker build:

License

This MCP server is licensed under the MIT License. This means you are free to use, modify, and distribute the software, subject to the terms and conditions of the MIT License. For more details, please see the LICENSE file in the project repository.

GitHub MCP Server

Deprecation Notice: Development for this project has been moved to GitHub in the http://github.com/github/github-mcp-server repo.

MCP Server for the GitHub API, enabling file operations, repository management, search functionality, and more.

Features

  • Automatic Branch Creation: When creating/updating files or pushing changes, branches are automatically created if they don't exist
  • Comprehensive Error Handling: Clear error messages for common issues
  • Git History Preservation: Operations maintain proper Git history without force pushing
  • Batch Operations: Support for both single-file and multi-file operations
  • Advanced Search: Support for searching code, issues/PRs, and users

Tools

  1. create_or_update_file
  1. push_files
  1. search_repositories
  1. create_repository
  1. get_file_contents
  1. create_issue
  1. create_pull_request
  1. fork_repository
  1. create_branch
  1. list_issues
  1. update_issue
  1. add_issue_comment
  1. search_code
  1. search_issues
  1. search_users
  1. list_commits
  • Gets commits of a branch in a repository
  • Inputs:
  • Returns: List of commits
  1. get_issue
  • Gets the contents of an issue within a repository
  • Inputs:
  • Returns: Github Issue object & details
  1. get_pull_request
  • Get details of a specific pull request
  • Inputs:
  • Returns: Pull request details including diff and review status
  1. list_pull_requests
  • List and filter repository pull requests
  • Inputs:
  • Returns: Array of pull request details
  1. create_pull_request_review
  • Create a review on a pull request
  • Inputs:
  • Returns: Created review details
  1. merge_pull_request
  • Merge a pull request
  • Inputs:
  • Returns: Merge result details
  1. get_pull_request_files
  • Get the list of files changed in a pull request
  • Inputs:
  • Returns: Array of changed files with patch and status details
  1. get_pull_request_status
  • Get the combined status of all status checks for a pull request
  • Inputs:
  • Returns: Combined status check results and individual check details
  1. update_pull_request_branch
  • Update a pull request branch with the latest changes from the base branch (equivalent to GitHub's "Update branch" button)
  • Inputs:
  • Returns: Success message when branch is updated
  1. get_pull_request_comments
  • Get the review comments on a pull request
  • Inputs:
  • Returns: Array of pull request review comments with details like the comment text, author, and location in the diff
  1. get_pull_request_reviews
  • Get the reviews on a pull request
  • Inputs:
  • Returns: Array of pull request reviews with details like the review state (APPROVED, CHANGES_REQUESTED, etc.), reviewer, and review body

Search Query Syntax

Code Search

  • language:javascript: Search by programming language
  • repo:owner/name: Search in specific repository
  • path:app/src: Search in specific path
  • extension:js: Search by file extension
  • Example: q: "import express" language:typescript path:src/

Issues Search

  • is:issue or is:pr: Filter by type
  • is:open or is:closed: Filter by state
  • label:bug: Search by label
  • author:username: Search by author
  • Example: q: "memory leak" is:issue is:open label:bug

Users Search

  • type:user or type:org: Filter by account type
  • followers:>1000: Filter by followers
  • location:London: Search by location
  • Example: q: "fullstack developer" location:London followers:>100
For detailed search syntax, see GitHub's searching documentation.

Setup

Personal Access Token

Create a GitHub Personal Access Token with appropriate permissions:
  • Select which repositories you'd like this token to have access to (Public, All, or Select)
  • Create a token with the repo scope ("Full control of private repositories")
  • Copy the generated token

Usage with Claude Desktop

To use this with Claude Desktop, add the following to your claude_desktop_config.json:

Docker

NPX

Build

Docker build:

License

This MCP server is licensed under the MIT License. This means you are free to use, modify, and distribute the software, subject to the terms and conditions of the MIT License. For more details, please see the LICENSE file in the project repository.