Tools for interacting with the GitHub API, enabling file operations, repository management, search functionality, and more.
100K+
26 Tools
Version 4.43 or later needs to be installed to add the server automatically
Use cases
About
Tools for interacting with the GitHub API, enabling file operations, repository management, search functionality, and more.
| Attribute | Details |
|---|---|
| Docker Image | mcp/github |
| Author | modelcontextprotocol |
| Repository | https://github.com/modelcontextprotocol/servers |
| Attribute | Details |
|---|---|
| Dockerfile | https://github.com/modelcontextprotocol/servers/blob/b4ee623039a6c60053ce67269701ad9e95073306/src/github/Dockerfile |
| Commit | b4ee623039a6c60053ce67269701ad9e95073306 |
| Docker Image built by | Docker Inc. |
| Docker Scout Health Score | |
| Verify Signature | COSIGN_REPOSITORY=mcp/signatures cosign verify mcp/github --key https://raw.githubusercontent.com/docker/keyring/refs/heads/main/public/mcp/latest.pub |
| Licence | MIT License |
| Tools provided by this Server | Short Description |
|---|---|
add_issue_comment | Add a comment to an existing issue |
create_branch | Create a new branch in a GitHub repository |
create_issue | Create a new issue in a GitHub repository |
create_or_update_file | Create or update a single file in a GitHub repository |
create_pull_request | Create a new pull request in a GitHub repository |
create_pull_request_review | Create a review on a pull request |
create_repository | Create a new GitHub repository in your account |
fork_repository | Fork a GitHub repository to your account or specified organization |
get_file_contents | Get the contents of a file or directory from a GitHub repository |
get_issue | Get details of a specific issue in a GitHub repository. |
get_pull_request | Get details of a specific pull request |
get_pull_request_comments | Get the review comments on a pull request |
get_pull_request_files | Get the list of files changed in a pull request |
get_pull_request_reviews | Get the reviews on a pull request |
get_pull_request_status | Get the combined status of all status checks for a pull request |
list_commits | Get list of commits of a branch in a GitHub repository |
list_issues | List issues in a GitHub repository with filtering options |
list_pull_requests | List and filter repository pull requests |
merge_pull_request | Merge a pull request |
push_files | Push multiple files to a GitHub repository in a single commit |
search_code | Search for code across GitHub repositories |
search_issues | Search for issues and pull requests across GitHub repositories |
search_repositories | Search for GitHub repositories |
search_users | Search for users on GitHub |
update_issue | Update an existing issue in a GitHub repository |
update_pull_request_branch | Update a pull request branch with the latest changes from the base branch |
add_issue_commentAdd a comment to an existing issue
| Parameters | Type | Description |
|---|---|---|
body | string | |
issue_number | number | |
owner | string | |
repo | string |
create_branchCreate a new branch in a GitHub repository
| Parameters | Type | Description |
|---|---|---|
branch | string | Name for the new branch |
owner | string | Repository owner (username or organization) |
repo | string | Repository name |
from_branch | stringoptional | Optional: source branch to create from (defaults to the repository's default branch) |
create_issueCreate a new issue in a GitHub repository
| Parameters | Type | Description |
|---|---|---|
owner | string | |
repo | string | |
title | string | |
assignees | arrayoptional | |
body | stringoptional | |
labels | arrayoptional | |
milestone | numberoptional |
create_or_update_fileCreate or update a single file in a GitHub repository
| Parameters | Type | Description |
|---|---|---|
branch | string | Branch to create/update the file in |
content | string | Content of the file |
message | string | Commit message |
owner | string | Repository owner (username or organization) |
path | string | Path where to create/update the file |
repo | string | Repository name |
sha | stringoptional | SHA of the file being replaced (required when updating existing files) |
create_pull_requestCreate a new pull request in a GitHub repository
| Parameters | Type | Description |
|---|---|---|
base | string | The name of the branch you want the changes pulled into |
head | string | The name of the branch where your changes are implemented |
owner | string | Repository owner (username or organization) |
repo | string | Repository name |
title | string | Pull request title |
body | stringoptional | Pull request body/description |
draft | booleanoptional | Whether to create the pull request as a draft |
maintainer_can_modify | booleanoptional | Whether maintainers can modify the pull request |
create_pull_request_reviewCreate a review on a pull request
| Parameters | Type | Description |
|---|---|---|
body | string | The body text of the review |
event | string | The review action to perform |
owner | string | Repository owner (username or organization) |
pull_number | number | Pull request number |
repo | string | Repository name |
comments | arrayoptional | Comments to post as part of the review (specify either position or line, not both) |
commit_id | stringoptional | The SHA of the commit that needs a review |
create_repositoryCreate a new GitHub repository in your account
| Parameters | Type | Description |
|---|---|---|
name | string | Repository name |
autoInit | booleanoptional | Initialize with README.md |
description | stringoptional | Repository description |
private | booleanoptional | Whether the repository should be private |
fork_repositoryFork a GitHub repository to your account or specified organization
| Parameters | Type | Description |
|---|---|---|
owner | string | Repository owner (username or organization) |
repo | string | Repository name |
organization | stringoptional | Optional: organization to fork to (defaults to your personal account) |
get_file_contentsGet the contents of a file or directory from a GitHub repository
| Parameters | Type | Description |
|---|---|---|
owner | string | Repository owner (username or organization) |
path | string | Path to the file or directory |
repo | string | Repository name |
branch | stringoptional | Branch to get contents from |
get_issueGet details of a specific issue in a GitHub repository.
| Parameters | Type | Description |
|---|---|---|
issue_number | number | |
owner | string | |
repo | string |
get_pull_requestGet details of a specific pull request
| Parameters | Type | Description |
|---|---|---|
owner | string | Repository owner (username or organization) |
pull_number | number | Pull request number |
repo | string | Repository name |
get_pull_request_commentsGet the review comments on a pull request
| Parameters | Type | Description |
|---|---|---|
owner | string | Repository owner (username or organization) |
pull_number | number | Pull request number |
repo | string | Repository name |
get_pull_request_filesGet the list of files changed in a pull request
| Parameters | Type | Description |
|---|---|---|
owner | string | Repository owner (username or organization) |
pull_number | number | Pull request number |
repo | string | Repository name |
get_pull_request_reviewsGet the reviews on a pull request
| Parameters | Type | Description |
|---|---|---|
owner | string | Repository owner (username or organization) |
pull_number | number | Pull request number |
repo | string | Repository name |
get_pull_request_statusGet the combined status of all status checks for a pull request
| Parameters | Type | Description |
|---|---|---|
owner | string | Repository owner (username or organization) |
pull_number | number | Pull request number |
repo | string | Repository name |
list_commitsGet list of commits of a branch in a GitHub repository
| Parameters | Type | Description |
|---|---|---|
owner | string | |
repo | string | |
page | numberoptional | |
perPage | numberoptional | |
sha | stringoptional |
list_issuesList issues in a GitHub repository with filtering options
| Parameters | Type | Description |
|---|---|---|
owner | string | |
repo | string | |
direction | stringoptional | |
labels | arrayoptional | |
page | numberoptional | |
per_page | numberoptional | |
since | stringoptional | |
sort | stringoptional | |
state | stringoptional |
list_pull_requestsList and filter repository pull requests
| Parameters | Type | Description |
|---|---|---|
owner | string | Repository owner (username or organization) |
repo | string | Repository name |
base | stringoptional | Filter by base branch name |
direction | stringoptional | The direction of the sort |
head | stringoptional | Filter by head user or head organization and branch name |
page | numberoptional | Page number of the results |
per_page | numberoptional | Results per page (max 100) |
sort | stringoptional | What to sort results by |
state | stringoptional | State of the pull requests to return |
merge_pull_requestMerge a pull request
| Parameters | Type | Description |
|---|---|---|
owner | string | Repository owner (username or organization) |
pull_number | number | Pull request number |
repo | string | Repository name |
commit_message | stringoptional | Extra detail to append to automatic commit message |
commit_title | stringoptional | Title for the automatic commit message |
merge_method | stringoptional | Merge method to use |
push_filesPush multiple files to a GitHub repository in a single commit
| Parameters | Type | Description |
|---|---|---|
branch | string | Branch to push to (e.g., 'main' or 'master') |
files | array | Array of files to push |
message | string | Commit message |
owner | string | Repository owner (username or organization) |
repo | string | Repository name |
search_codeSearch for code across GitHub repositories
| Parameters | Type | Description |
|---|---|---|
q | string | |
order | stringoptional | |
page | numberoptional | |
per_page | numberoptional |
search_issuesSearch for issues and pull requests across GitHub repositories
| Parameters | Type | Description |
|---|---|---|
q | string | |
order | stringoptional | |
page | numberoptional | |
per_page | numberoptional | |
sort | stringoptional |
search_repositoriesSearch for GitHub repositories
| Parameters | Type | Description |
|---|---|---|
query | string | Search query (see GitHub search syntax) |
page | numberoptional | Page number for pagination (default: 1) |
perPage | numberoptional | Number of results per page (default: 30, max: 100) |
search_usersSearch for users on GitHub
| Parameters | Type | Description |
|---|---|---|
q | string | |
order | stringoptional | |
page | numberoptional | |
per_page | numberoptional | |
sort | stringoptional |
update_issueUpdate an existing issue in a GitHub repository
| Parameters | Type | Description |
|---|---|---|
issue_number | number | |
owner | string | |
repo | string | |
assignees | arrayoptional | |
body | stringoptional | |
labels | arrayoptional | |
milestone | numberoptional | |
state | stringoptional | |
title | stringoptional |
update_pull_request_branchUpdate a pull request branch with the latest changes from the base branch
| Parameters | Type | Description |
|---|---|---|
owner | string | Repository owner (username or organization) |
pull_number | number | Pull request number |
repo | string | Repository name |
expected_head_sha | stringoptional | The expected SHA of the pull request's HEAD ref |
{
"mcpServers": {
"github": {
"command": "docker",
"args": [
"run",
"-i",
"--rm",
"-e",
"GITHUB_PERSONAL_ACCESS_TOKEN",
"mcp/github"
],
"env": {
"GITHUB_PERSONAL_ACCESS_TOKEN": "<YOUR_TOKEN>"
}
}
}
}