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
create_or_update_file
push_files
search_repositories
create_repository
get_file_contents
create_issue
create_pull_request
fork_repository
create_branch
list_issues
update_issue
add_issue_comment
search_code
search_issues
search_users
list_commits
- Gets commits of a branch in a repository
- Inputs:
- Returns: List of commits
get_issue
- Gets the contents of an issue within a repository
- Inputs:
- Returns: Github Issue object & details
get_pull_request
- Get details of a specific pull request
- Inputs:
- Returns: Pull request details including diff and review status
list_pull_requests
- List and filter repository pull requests
- Inputs:
- Returns: Array of pull request details
create_pull_request_review
- Create a review on a pull request
- Inputs:
- Returns: Created review details
merge_pull_request
- Merge a pull request
- Inputs:
- Returns: Merge result details
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
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
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
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
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:issueoris:pr: Filter by type
is:openoris: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:userortype: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:
- Go to Personal access tokens (in GitHub Settings > Developer settings)
- Select which repositories you'd like this token to have access to (Public, All, or Select)
- Create a token with the
reposcope ("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
create_or_update_file
push_files
search_repositories
create_repository
get_file_contents
create_issue
create_pull_request
fork_repository
create_branch
list_issues
update_issue
add_issue_comment
search_code
search_issues
search_users
list_commits
- Gets commits of a branch in a repository
- Inputs:
- Returns: List of commits
get_issue
- Gets the contents of an issue within a repository
- Inputs:
- Returns: Github Issue object & details
get_pull_request
- Get details of a specific pull request
- Inputs:
- Returns: Pull request details including diff and review status
list_pull_requests
- List and filter repository pull requests
- Inputs:
- Returns: Array of pull request details
create_pull_request_review
- Create a review on a pull request
- Inputs:
- Returns: Created review details
merge_pull_request
- Merge a pull request
- Inputs:
- Returns: Merge result details
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
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
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
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
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:issueoris:pr: Filter by type
is:openoris: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:userortype: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:
- Go to Personal access tokens (in GitHub Settings > Developer settings)
- Select which repositories you'd like this token to have access to (Public, All, or Select)
- Create a token with the
reposcope ("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.