Official GitHub MCP Server, by GitHub. Provides seamless integration with GitHub APIs, enabling advanced automation and interaction capabilities for developers and tools.
40 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 |
| Attribute | Details |
|---|---|
| Dockerfile | https://github.com/github/github-mcp-server/blob/23fa0dd1a821d1346c1de2abafe7327d26981606/Dockerfile |
| 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 |
assign_copilot_to_issue | Assign Copilot to issue |
create_branch | Create branch |
create_or_update_file | Create or update file |
create_pull_request | Open new pull request |
create_repository | Create repository |
delete_file | Delete file |
fork_repository | Fork repository |
get_commit | Get commit details |
get_file_contents | Get file or directory contents |
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 |
issue_read | Get issue details |
issue_write | Create or update issue. |
list_branches | List branches |
list_commits | List commits |
list_issue_types | List available issue types |
list_issues | List issues |
list_pull_requests | List pull requests |
list_releases | List releases |
list_tags | List tags |
merge_pull_request | Merge pull request |
pull_request_read | Get details for a single pull request |
pull_request_review_write | Write operations (create, submit, delete) on pull request reviews. |
push_files | Push files to repository |
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 |
sub_issue_write | Change sub-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. Use this tool to add comments to pull requests as well (in this case pass pull request number as issue_number), but only if user is not asking specifically to add review comments.
| Parameters | Type | Description |
|---|---|---|
body | string | Comment content |
issue_number | number | Issue number to comment on |
owner | string | Repository owner |
repo | string | Repository name |
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_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_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_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.
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_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.
issue_readGet information about a specific issue in a GitHub repository.
| Parameters | Type | Description |
|---|---|---|
issue_number | number | The number of the issue |
method | string | The read operation to perform on a single issue. |
| Options are: |
owner|string|The owner of the repository
repo|string|The name of the repository
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.
issue_writeCreate a new or update an existing issue in a GitHub repository.
| Parameters | Type | Description |
|---|---|---|
method | string | Write operation to perform on a single issue. |
| Options are: |
owner|string|Repository owner
repo|string|Repository name
assignees|arrayoptional|Usernames to assign to this issue
body|stringoptional|Issue body content
duplicate_of|numberoptional|Issue number that this issue is a duplicate of. Only used when state_reason is 'duplicate'.
issue_number|numberoptional|Issue number to update
labels|arrayoptional|Labels to apply to this issue
milestone|numberoptional|Milestone number
state|stringoptional|New state
state_reason|stringoptional|Reason for the state change. Ignored unless state is changed.
title|stringoptional|Issue title
type|stringoptional|Type of this issue. Only use if the repository has issue types configured. Use list_issue_types tool to get valid type values for the organization. If the repository doesn't support issue types, omit this parameter.
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_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_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.
pull_request_review_writeCreate and/or submit, delete review of a pull request.
Available methods:
method|string|The write operation to perform on pull request review.
owner|string|Repository owner
pullNumber|number|Pull request number
repo|string|Repository name
body|stringoptional|Review comment text
commitID|stringoptional|SHA of commit to review
event|stringoptional|Review action to perform.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 |
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.
sub_issue_writeAdd a sub-issue to a parent issue in a GitHub repository.
| Parameters | Type | Description |
|---|---|---|
issue_number | number | The number of the parent issue |
method | string | The action to perform on a single sub-issue |
| Options are: |
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
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)
replace_parent|booleanoptional|When true, replaces the sub-issue's current parent issue. Use with 'add' method only.
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