Official GitHub MCP Server, by GitHub. Provides seamless integration with GitHub APIs, enabling advanced automation and interaction capabilities for developers and tools.
49 Tools
Version 4.43 or later needs to be installed to add the server automatically
Use cases
About
Official GitHub MCP Server, by GitHub. Provides seamless integration with GitHub APIs, enabling advanced automation and interaction capabilities for developers and tools.
| Attribute | Details |
|---|---|
| Docker Image | ghcr.io/github/github-mcp-server |
| Author | github |
| Repository | https://github.com/github/github-mcp-server |
Docker Image built by|github Docker Scout Health Score|Not available Verify Signature|Not available Licence|MIT License
| Tools provided by this Server | Short Description |
|---|---|
add_comment_to_pending_review | Add review comment to the requester's latest pending pull request review |
add_issue_comment | Add comment to issue |
add_sub_issue | Add sub-issue |
assign_copilot_to_issue | Assign Copilot to issue |
create_and_submit_pull_request_review | Create and submit a pull request review without comments |
create_branch | Create branch |
create_issue | Open new issue |
create_or_update_file | Create or update file |
create_pending_pull_request_review | Create pending pull request review |
create_pull_request | Open new pull request |
create_repository | Create repository |
delete_file | Delete file |
delete_pending_pull_request_review | Delete the requester's latest pending pull request review |
fork_repository | Fork repository |
get_commit | Get commit details |
get_file_contents | Get file or directory contents |
get_issue | Get issue details |
get_issue_comments | Get issue comments |
get_label | Get a specific label from a repository. |
get_latest_release | Get latest release |
get_me | Get my user profile |
get_release_by_tag | Get a release by tag name |
get_tag | Get tag details |
get_team_members | Get team members |
get_teams | Get teams |
list_branches | List branches |
list_commits | List commits |
list_issue_types | List available issue types |
list_issues | List issues |
list_label | List labels from a repository or an issue |
list_pull_requests | List pull requests |
list_releases | List releases |
list_sub_issues | List sub-issues |
list_tags | List tags |
merge_pull_request | Merge pull request |
pull_request_read | Get details for a single pull request |
push_files | Push files to repository |
remove_sub_issue | Remove sub-issue |
reprioritize_sub_issue | Reprioritize sub-issue |
request_copilot_review | Request Copilot review |
search_code | Search code |
search_issues | Search issues |
search_pull_requests | Search pull requests |
search_repositories | Search repositories |
search_users | Search users |
submit_pending_pull_request_review | Submit the requester's latest pending pull request review |
update_issue | Edit issue |
update_pull_request | Edit pull request |
update_pull_request_branch | Update pull request branch |
add_comment_to_pending_reviewAdd review comment to the requester's latest pending pull request review. A pending review needs to already exist to call this (check with the user if not sure).
| Parameters | Type | Description |
|---|---|---|
body | string | The text of the review comment |
owner | string | Repository owner |
path | string | The relative path to the file that necessitates a comment |
pullNumber | number | Pull request number |
repo | string | Repository name |
subjectType | string | The level at which the comment is targeted |
line | numberoptional | The line of the blob in the pull request diff that the comment applies to. For multi-line comments, the last line of the range |
side | stringoptional | The side of the diff to comment on. LEFT indicates the previous state, RIGHT indicates the new state |
startLine | numberoptional | For multi-line comments, the first line of the range that the comment applies to |
startSide | stringoptional | For multi-line comments, the starting side of the diff that the comment applies to. LEFT indicates the previous state, RIGHT indicates the new state |
add_issue_commentAdd a comment to a specific issue in a GitHub repository.
| Parameters | Type | Description |
|---|---|---|
body | string | Comment content |
issue_number | number | Issue number to comment on |
owner | string | Repository owner |
repo | string | Repository name |
add_sub_issueAdd a sub-issue to a parent issue in a GitHub repository.
| Parameters | Type | Description |
|---|---|---|
issue_number | number | The number of the parent issue |
owner | string | Repository owner |
repo | string | Repository name |
sub_issue_id | number | The ID of the sub-issue to add. ID is not the same as issue number |
replace_parent | booleanoptional | When true, replaces the sub-issue's current parent issue |
assign_copilot_to_issueAssign Copilot to a specific issue in a GitHub repository.
This tool can help with the following outcomes:
More information can be found at:
issueNumber|number|Issue number
owner|string|Repository owner
repo|string|Repository namecreate_and_submit_pull_request_reviewCreate and submit a review for a pull request without review comments.
| Parameters | Type | Description |
|---|---|---|
body | string | Review comment text |
event | string | Review action to perform |
owner | string | Repository owner |
pullNumber | number | Pull request number |
repo | string | Repository name |
commitID | stringoptional | SHA of commit to review |
create_branchCreate a new branch in a GitHub repository
| Parameters | Type | Description |
|---|---|---|
branch | string | Name for new branch |
owner | string | Repository owner |
repo | string | Repository name |
from_branch | stringoptional | Source branch (defaults to repo default) |
create_issueCreate a new issue in a GitHub repository.
| Parameters | Type | Description |
|---|---|---|
owner | string | Repository owner |
repo | string | Repository name |
title | string | Issue title |
assignees | arrayoptional | Usernames to assign to this issue |
body | stringoptional | Issue body content |
labels | arrayoptional | Labels to apply to this issue |
milestone | numberoptional | Milestone number |
type | stringoptional | Type of this issue |
create_or_update_fileCreate or update a single file in a GitHub repository. If updating, you must provide the SHA of the file you want to update. Use this tool to create or update a file in a GitHub repository remotely; do not use it for local file operations.
| 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 | Required if updating an existing file. The blob SHA of the file being replaced. |
create_pending_pull_request_reviewCreate a pending review for a pull request. Call this first before attempting to add comments to a pending review, and ultimately submitting it. A pending pull request review means a pull request review, it is pending because you create it first and submit it later, and the PR author will not see it until it is submitted.
| Parameters | Type | Description |
|---|---|---|
owner | string | Repository owner |
pullNumber | number | Pull request number |
repo | string | Repository name |
commitID | stringoptional | SHA of commit to review |
create_pull_requestCreate a new pull request in a GitHub repository.
| Parameters | Type | Description |
|---|---|---|
base | string | Branch to merge into |
head | string | Branch containing changes |
owner | string | Repository owner |
repo | string | Repository name |
title | string | PR title |
body | stringoptional | PR description |
draft | booleanoptional | Create as draft PR |
maintainer_can_modify | booleanoptional | Allow maintainer edits |
create_repositoryCreate a new GitHub repository in your account or specified organization
| Parameters | Type | Description |
|---|---|---|
name | string | Repository name |
autoInit | booleanoptional | Initialize with README |
description | stringoptional | Repository description |
organization | stringoptional | Organization to create the repository in (omit to create in your personal account) |
private | booleanoptional | Whether repo should be private |
delete_fileDelete a file from a GitHub repository
| Parameters | Type | Description |
|---|---|---|
branch | string | Branch to delete the file from |
message | string | Commit message |
owner | string | Repository owner (username or organization) |
path | string | Path to the file to delete |
repo | string | Repository name |
This tool may perform destructive updates.
delete_pending_pull_request_reviewDelete the requester's latest pending pull request review. Use this after the user decides not to submit a pending review, if you don't know if they already created one then check first.
| Parameters | Type | Description |
|---|---|---|
owner | string | Repository owner |
pullNumber | number | Pull request number |
repo | string | Repository name |
fork_repositoryFork a GitHub repository to your account or specified organization
| Parameters | Type | Description |
|---|---|---|
owner | string | Repository owner |
repo | string | Repository name |
organization | stringoptional | Organization to fork to |
get_commitGet details for a commit from a GitHub repository
| Parameters | Type | Description |
|---|---|---|
owner | string | Repository owner |
repo | string | Repository name |
sha | string | Commit SHA, branch name, or tag name |
include_diff | booleanoptional | Whether to include file diffs and stats in the response. Default is true. |
page | numberoptional | Page number for pagination (min 1) |
perPage | numberoptional | Results per page for pagination (min 1, max 100) |
This tool is read-only. It does not modify its environment.
get_file_contentsGet the contents of a file or directory from a GitHub repository
| Parameters | Type | Description |
|---|---|---|
owner | string | Repository owner (username or organization) |
repo | string | Repository name |
path | stringoptional | Path to file/directory (directories must end with a slash '/') |
ref | stringoptional | Accepts optional git refs such as refs/tags/{tag}, refs/heads/{branch} or refs/pull/{pr_number}/head |
sha | stringoptional | Accepts optional commit SHA. If specified, it will be used instead of ref |
This tool is read-only. It does not modify its environment.
get_issueGet details of a specific issue in a GitHub repository.
| Parameters | Type | Description |
|---|---|---|
issue_number | number | The number of the issue |
owner | string | The owner of the repository |
repo | string | The name of the repository |
This tool is read-only. It does not modify its environment.
get_issue_commentsGet comments for a specific issue in a GitHub repository.
| Parameters | Type | Description |
|---|---|---|
issue_number | number | Issue number |
owner | string | Repository owner |
repo | string | Repository name |
page | numberoptional | Page number for pagination (min 1) |
perPage | numberoptional | Results per page for pagination (min 1, max 100) |
This tool is read-only. It does not modify its environment.
get_labelGet a specific label from a repository.
| Parameters | Type | Description |
|---|---|---|
name | string | Label name. |
owner | string | Repository owner (username or organization name) |
repo | string | Repository name |
This tool is read-only. It does not modify its environment.
get_latest_releaseGet the latest release in a GitHub repository
| Parameters | Type | Description |
|---|---|---|
owner | string | Repository owner |
repo | string | Repository name |
This tool is read-only. It does not modify its environment.
get_meGet details of the authenticated GitHub user. Use this when a request is about the user's own profile for GitHub. Or when information is missing to build other tool calls.
get_release_by_tagGet a specific release by its tag name in a GitHub repository
| Parameters | Type | Description |
|---|---|---|
owner | string | Repository owner |
repo | string | Repository name |
tag | string | Tag name (e.g., 'v1.0.0') |
This tool is read-only. It does not modify its environment.
get_tagGet details about a specific git tag in a GitHub repository
| Parameters | Type | Description |
|---|---|---|
owner | string | Repository owner |
repo | string | Repository name |
tag | string | Tag name |
This tool is read-only. It does not modify its environment.
get_team_membersGet member usernames of a specific team in an organization. Limited to organizations accessible with current credentials
| Parameters | Type | Description |
|---|---|---|
org | string | Organization login (owner) that contains the team. |
team_slug | string | Team slug |
This tool is read-only. It does not modify its environment.
get_teamsGet details of the teams the user is a member of. Limited to organizations accessible with current credentials
| Parameters | Type | Description |
|---|---|---|
user | stringoptional | Username to get teams for. If not provided, uses the authenticated user. |
This tool is read-only. It does not modify its environment.
list_branchesList branches in a GitHub repository
| Parameters | Type | Description |
|---|---|---|
owner | string | Repository owner |
repo | string | Repository name |
page | numberoptional | Page number for pagination (min 1) |
perPage | numberoptional | Results per page for pagination (min 1, max 100) |
This tool is read-only. It does not modify its environment.
list_commitsGet list of commits of a branch in a GitHub repository. Returns at least 30 results per page by default, but can return more if specified using the perPage parameter (up to 100).
| Parameters | Type | Description |
|---|---|---|
owner | string | Repository owner |
repo | string | Repository name |
author | stringoptional | Author username or email address to filter commits by |
page | numberoptional | Page number for pagination (min 1) |
perPage | numberoptional | Results per page for pagination (min 1, max 100) |
sha | stringoptional | Commit SHA, branch or tag name to list commits of. If not provided, uses the default branch of the repository. If a commit SHA is provided, will list commits up to that SHA. |
This tool is read-only. It does not modify its environment.
list_issue_typesList supported issue types for repository owner (organization).
| Parameters | Type | Description |
|---|---|---|
owner | string | The organization owner of the repository |
This tool is read-only. It does not modify its environment.
list_issuesList issues in a GitHub repository. For pagination, use the 'endCursor' from the previous response's 'pageInfo' in the 'after' parameter.
| Parameters | Type | Description |
|---|---|---|
owner | string | Repository owner |
repo | string | Repository name |
after | stringoptional | Cursor for pagination. Use the endCursor from the previous page's PageInfo for GraphQL APIs. |
direction | stringoptional | Order direction. If provided, the 'orderBy' also needs to be provided. |
labels | arrayoptional | Filter by labels |
orderBy | stringoptional | Order issues by field. If provided, the 'direction' also needs to be provided. |
perPage | numberoptional | Results per page for pagination (min 1, max 100) |
since | stringoptional | Filter by date (ISO 8601 timestamp) |
state | stringoptional | Filter by state, by default both open and closed issues are returned when not provided |
This tool is read-only. It does not modify its environment.
list_labelList labels from a repository or an issue
| Parameters | Type | Description |
|---|---|---|
owner | string | Repository owner (username or organization name) - required for all operations |
repo | string | Repository name - required for all operations |
issue_number | numberoptional | Issue number - if provided, lists labels on the specific issue |
This tool is read-only. It does not modify its environment.
list_pull_requestsList pull requests in a GitHub repository. If the user specifies an author, then DO NOT use this tool and use the search_pull_requests tool instead.
| Parameters | Type | Description |
|---|---|---|
owner | string | Repository owner |
repo | string | Repository name |
base | stringoptional | Filter by base branch |
direction | stringoptional | Sort direction |
head | stringoptional | Filter by head user/org and branch |
page | numberoptional | Page number for pagination (min 1) |
perPage | numberoptional | Results per page for pagination (min 1, max 100) |
sort | stringoptional | Sort by |
state | stringoptional | Filter by state |
This tool is read-only. It does not modify its environment.
list_releasesList releases in a GitHub repository
| Parameters | Type | Description |
|---|---|---|
owner | string | Repository owner |
repo | string | Repository name |
page | numberoptional | Page number for pagination (min 1) |
perPage | numberoptional | Results per page for pagination (min 1, max 100) |
This tool is read-only. It does not modify its environment.
list_sub_issuesList sub-issues for a specific issue in a GitHub repository.
| Parameters | Type | Description |
|---|---|---|
issue_number | number | Issue number |
owner | string | Repository owner |
repo | string | Repository name |
page | numberoptional | Page number for pagination (default: 1) |
per_page | numberoptional | Number of results per page (max 100, default: 30) |
This tool is read-only. It does not modify its environment.
list_tagsList git tags in a GitHub repository
| Parameters | Type | Description |
|---|---|---|
owner | string | Repository owner |
repo | string | Repository name |
page | numberoptional | Page number for pagination (min 1) |
perPage | numberoptional | Results per page for pagination (min 1, max 100) |
This tool is read-only. It does not modify its environment.
merge_pull_requestMerge a pull request in a GitHub repository.
| Parameters | Type | Description |
|---|---|---|
owner | string | Repository owner |
pullNumber | number | Pull request number |
repo | string | Repository name |
commit_message | stringoptional | Extra detail for merge commit |
commit_title | stringoptional | Title for merge commit |
merge_method | stringoptional | Merge method |
pull_request_readGet information on a specific pull request in GitHub repository.
| Parameters | Type | Description |
|---|---|---|
method | string | Action to specify what pull request data needs to be retrieved from GitHub. |
| Possible options: |
owner|string|Repository owner
pullNumber|number|Pull request number
repo|string|Repository name
page|numberoptional|Page number for pagination (min 1)
perPage|numberoptional|Results per page for pagination (min 1, max 100)
This tool is read-only. It does not modify its environment.
push_filesPush multiple files to a GitHub repository in a single commit
| Parameters | Type | Description |
|---|---|---|
branch | string | Branch to push to |
files | array | Array of file objects to push, each object with path (string) and content (string) |
message | string | Commit message |
owner | string | Repository owner |
repo | string | Repository name |
remove_sub_issueRemove a sub-issue from a parent issue in a GitHub repository.
| Parameters | Type | Description |
|---|---|---|
issue_number | number | The number of the parent issue |
owner | string | Repository owner |
repo | string | Repository name |
sub_issue_id | number | The ID of the sub-issue to remove. ID is not the same as issue number |
reprioritize_sub_issueReprioritize a sub-issue to a different position in the parent issue's sub-issue list.
| Parameters | Type | Description |
|---|---|---|
issue_number | number | The number of the parent issue |
owner | string | Repository owner |
repo | string | Repository name |
sub_issue_id | number | The ID of the sub-issue to reprioritize. ID is not the same as issue number |
after_id | numberoptional | The ID of the sub-issue to be prioritized after (either after_id OR before_id should be specified) |
before_id | numberoptional | The ID of the sub-issue to be prioritized before (either after_id OR before_id should be specified) |
request_copilot_reviewRequest a GitHub Copilot code review for a pull request. Use this for automated feedback on pull requests, usually before requesting a human reviewer.
| Parameters | Type | Description |
|---|---|---|
owner | string | Repository owner |
pullNumber | number | Pull request number |
repo | string | Repository name |
search_codeFast and precise code search across ALL GitHub repositories using GitHub's native search engine. Best for finding exact symbols, functions, classes, or specific code patterns.
| Parameters | Type | Description |
|---|---|---|
query | string | Search query using GitHub's powerful code search syntax. Examples: 'content:Skill language:Java org:github', 'NOT is:archived language:Python OR language:go', 'repo:github/github-mcp-server'. Supports exact matching, language filters, path filters, and more. |
order | stringoptional | Sort order for results |
page | numberoptional | Page number for pagination (min 1) |
perPage | numberoptional | Results per page for pagination (min 1, max 100) |
sort | stringoptional | Sort field ('indexed' only) |
This tool is read-only. It does not modify its environment.
search_issuesSearch for issues in GitHub repositories using issues search syntax already scoped to is:issue
| Parameters | Type | Description |
|---|---|---|
query | string | Search query using GitHub issues search syntax |
order | stringoptional | Sort order |
owner | stringoptional | Optional repository owner. If provided with repo, only issues for this repository are listed. |
page | numberoptional | Page number for pagination (min 1) |
perPage | numberoptional | Results per page for pagination (min 1, max 100) |
repo | stringoptional | Optional repository name. If provided with owner, only issues for this repository are listed. |
sort | stringoptional | Sort field by number of matches of categories, defaults to best match |
This tool is read-only. It does not modify its environment.
search_pull_requestsSearch for pull requests in GitHub repositories using issues search syntax already scoped to is:pr
| Parameters | Type | Description |
|---|---|---|
query | string | Search query using GitHub pull request search syntax |
order | stringoptional | Sort order |
owner | stringoptional | Optional repository owner. If provided with repo, only pull requests for this repository are listed. |
page | numberoptional | Page number for pagination (min 1) |
perPage | numberoptional | Results per page for pagination (min 1, max 100) |
repo | stringoptional | Optional repository name. If provided with owner, only pull requests for this repository are listed. |
sort | stringoptional | Sort field by number of matches of categories, defaults to best match |
This tool is read-only. It does not modify its environment.
search_repositoriesFind GitHub repositories by name, description, readme, topics, or other metadata. Perfect for discovering projects, finding examples, or locating specific repositories across GitHub.
| Parameters | Type | Description |
|---|---|---|
query | string | Repository search query. Examples: 'machine learning in:name stars:>1000 language:python', 'topic:react', 'user:facebook'. Supports advanced search syntax for precise filtering. |
minimal_output | booleanoptional | Return minimal repository information (default: true). When false, returns full GitHub API repository objects. |
order | stringoptional | Sort order |
page | numberoptional | Page number for pagination (min 1) |
perPage | numberoptional | Results per page for pagination (min 1, max 100) |
sort | stringoptional | Sort repositories by field, defaults to best match |
This tool is read-only. It does not modify its environment.
search_usersFind GitHub users by username, real name, or other profile information. Useful for locating developers, contributors, or team members.
| Parameters | Type | Description |
|---|---|---|
query | string | User search query. Examples: 'john smith', 'location:seattle', 'followers:>100'. Search is automatically scoped to type:user. |
order | stringoptional | Sort order |
page | numberoptional | Page number for pagination (min 1) |
perPage | numberoptional | Results per page for pagination (min 1, max 100) |
sort | stringoptional | Sort users by number of followers or repositories, or when the person joined GitHub. |
This tool is read-only. It does not modify its environment.
submit_pending_pull_request_reviewSubmit the requester's latest pending pull request review, normally this is a final step after creating a pending review, adding comments first, unless you know that the user already did the first two steps, you should check before calling this.
| Parameters | Type | Description |
|---|---|---|
event | string | The event to perform |
owner | string | Repository owner |
pullNumber | number | Pull request number |
repo | string | Repository name |
body | stringoptional | The text of the review comment |
update_issueUpdate an existing issue in a GitHub repository.
| Parameters | Type | Description |
|---|---|---|
issue_number | number | Issue number to update |
owner | string | Repository owner |
repo | string | Repository name |
assignees | arrayoptional | New assignees |
body | stringoptional | New description |
duplicate_of | numberoptional | Issue number that this issue is a duplicate of. Only used when state_reason is 'duplicate'. |
labels | arrayoptional | New labels |
milestone | numberoptional | New milestone number |
state | stringoptional | New state |
state_reason | stringoptional | Reason for the state change. Ignored unless state is changed. |
title | stringoptional | New title |
type | stringoptional | New issue type |
update_pull_requestUpdate an existing pull request in a GitHub repository.
| Parameters | Type | Description |
|---|---|---|
owner | string | Repository owner |
pullNumber | number | Pull request number to update |
repo | string | Repository name |
base | stringoptional | New base branch name |
body | stringoptional | New description |
draft | booleanoptional | Mark pull request as draft (true) or ready for review (false) |
maintainer_can_modify | booleanoptional | Allow maintainer edits |
reviewers | arrayoptional | GitHub usernames to request reviews from |
state | stringoptional | New state |
title | stringoptional | New title |
update_pull_request_branchUpdate the branch of a pull request with the latest changes from the base branch.
| Parameters | Type | Description |
|---|---|---|
owner | string | Repository owner |
pullNumber | number | Pull request number |
repo | string | Repository name |
expectedHeadSha | stringoptional | The expected SHA of the pull request's HEAD ref |
{
"mcpServers": {
"github-official": {
"command": "docker",
"args": [
"run",
"-i",
"--rm",
"-e",
"GITHUB_PERSONAL_ACCESS_TOKEN",
"ghcr.io/github/github-mcp-server"
],
"env": {
"GITHUB_PERSONAL_ACCESS_TOKEN": "<YOUR_TOKEN>"
}
}
}
}
Manual installation
You can install the MCP server using:
Installation for