GitHub

v2.3.0
io.github.github/github-mcp-server Checked 6 hours ago Published 6 days ago

Connect AI assistants to GitHub - manage repos, issues, PRs, and workflows through natural language.

These tools were reported by the server itself during our smoke test (tools/list), not copied from the README.

add_comment_to_pending_review

Add 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).

ParameterTypeDescription
body *stringThe text of the review comment
owner *stringRepository owner
path *stringThe relative path to the file that necessitates a comment
pullNumber *numberPull request number
repo *stringRepository name
subjectType *stringThe level at which the comment is targeted
linenumberThe line of the blob in the pull request diff that the comment applies to. For multi-line comments, the last line of the range
sidestringThe side of the diff to comment on. LEFT indicates the previous state, RIGHT indicates the new state
startLinenumberFor multi-line comments, the first line of the range that the comment applies to
startSidestringFor 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_comment

Add a comment and/or reaction to a specific issue or issue comment in a GitHub repository. Use this tool with pull requests as well (in this case pass pull request number as issue_number), but only if user is not asking specifically to add or react to review comments. At least one of body or reaction is required.

ParameterTypeDescription
issue_number *numberIssue or pull request number to comment on or react to.
owner *stringRepository owner
repo *stringRepository name
bodystringComment content. Required unless reaction is provided.
comment_idintegerThe numeric ID of the issue or pull request comment to react to. Use this for reactions to comments; omit it to react to the issue or pull request itself. Cannot be combined with body.
reactionstringEmoji reaction to add. Required unless body is provided.

add_reply_to_pull_request_comment

Add a reply and/or reaction to an existing pull request comment. This can create a new comment linked as a reply to the specified comment, add an emoji reaction to the specified comment, or do both. At least one of body or reaction is required.

ParameterTypeDescription
commentId *numberThe numeric ID of the pull request review comment to reply or react to. Use the number from a #discussion_r... anchor, not the GraphQL thread node ID (PRRT_...).
owner *stringRepository owner
repo *stringRepository name
bodystringThe text of the reply. Required unless reaction is provided.
pullNumbernumberPull request number. Required when body is provided.
reactionstringEmoji reaction to add. Required unless body is provided.

assign_copilot_to_issue

Assign Copilot to a specific issue in a GitHub repository. This tool can help with the following outcomes: - a Pull Request created with source code changes to resolve the issue More information can be found at: - https://docs.github.com/en/copilot/concepts/agents/cloud-agent/about-cloud-agent

ParameterTypeDescription
issue_number *numberIssue number
owner *stringRepository owner
repo *stringRepository name
base_refstringGit reference (e.g., branch) that the agent will start its work from. If not specified, defaults to the repository's default branch
custom_instructionsstringOptional custom instructions to guide the agent beyond the issue body. Use this to provide additional context, constraints, or guidance that is not captured in the issue description

create_branch

Create a new branch in a GitHub repository

ParameterTypeDescription
branch *stringName for new branch
owner *stringRepository owner
repo *stringRepository name
from_branchstringSource branch (defaults to repo default)

create_or_update_file

Create or update a single file in a GitHub repository. If updating, you should 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. To obtain the current blob SHA before updating, call the get_file_contents tool with the same owner, repo, and path, and set its ref parameter to this tool's branch value. The first text result reports the blob SHA for the requested path. SHA MUST be provided for existing file updates.

ParameterTypeDescription
branch *stringBranch to create/update the file in
content *stringContent of the file, exactly as it should appear once written. Do not base64-encode it; this server does that before calling the REST API.
message *stringCommit message
owner *stringRepository owner (username or organization)
path *stringPath where to create/update the file
repo *stringRepository name
allow_symlink_writebooleanSet true to update a symbolic link itself; content must be its new target path.
shastringThe blob SHA of the file being replaced. Required if the file already exists. Retrieve it with get_file_contents using the same owner, repo, and path, with ref set to this tool's branch value.

create_pull_request

Create a new pull request in a GitHub repository.

ParameterTypeDescription
base *stringBranch to merge into
head *stringBranch containing changes
owner *stringRepository owner
repo *stringRepository name
title *stringPR title
bodystringPR description
draftbooleanCreate as draft PR
maintainer_can_modifybooleanAllow maintainer edits
reviewersarrayGitHub usernames or ORG/team-slug team reviewers to request reviews from

create_repository

Create a new GitHub repository in your account or specified organization

ParameterTypeDescription
name *stringRepository name
autoInitbooleanInitialize with README
descriptionstringRepository description
organizationstringOrganization to create the repository in (omit to create in your personal account)
privatebooleanWhether the repository should be private. Defaults to true (private) when omitted.

delete_file

Delete a file from a GitHub repository

ParameterTypeDescription
branch *stringBranch to delete the file from
message *stringCommit message
owner *stringRepository owner (username or organization)
path *stringPath to the file to delete
repo *stringRepository name

fork_repository

Fork a GitHub repository to your account or specified organization

ParameterTypeDescription
owner *stringRepository owner
repo *stringRepository name
organizationstringOrganization to fork to

get_commit

Get details for a commit from a GitHub repository

ParameterTypeDescription
owner *stringRepository owner
repo *stringRepository name
sha *stringCommit SHA, branch name, or tag name
detailstringLevel of detail to include for changed files. "none" omits stats and files entirely. "stats" (default) includes per-file metadata: filename, status, and lines-of-code counts (additions, deletions, cha…
pagenumberPage number for pagination (min 1)
perPagenumberResults per page for pagination (min 1, max 100)

get_file_contents

Get the contents of a file or directory from a GitHub repository

ParameterTypeDescription
owner *stringRepository owner (username or organization)
repo *stringRepository name
fieldsarraySubset of fields to return for each entry when the path is a directory. If omitted, all fields are returned. Ignored when the path is a single file. Use this to reduce response size when listing direc…
pathstringPath to file/directory
refstringAccepts optional git refs such as `refs/tags/{tag}`, `refs/heads/{branch}` or `refs/pull/{pr_number}/head`
shastringAccepts optional commit SHA. If specified, it will be used instead of ref

get_label

Get a specific label from a repository.

ParameterTypeDescription
name *stringLabel name.
owner *stringRepository owner (username or organization name)
repo *stringRepository name

get_latest_release

Get the latest release in a GitHub repository

ParameterTypeDescription
owner *stringRepository owner
repo *stringRepository name

get_me

Get 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_tag

Get a specific release by its tag name in a GitHub repository

ParameterTypeDescription
owner *stringRepository owner
repo *stringRepository name
tag *stringTag name (e.g., 'v1.0.0')

get_tag

Get details about a specific git tag in a GitHub repository

ParameterTypeDescription
owner *stringRepository owner
repo *stringRepository name
tag *stringTag name

get_team_members

Get member usernames of a specific team in an organization. Limited to organizations accessible with current credentials

ParameterTypeDescription
org *stringOrganization login (owner) that contains the team.
team_slug *stringTeam slug

get_teams

Get details of the teams the user is a member of. Limited to organizations accessible with current credentials

ParameterTypeDescription
userstringUsername to get teams for. If not provided, uses the authenticated user.

issue_read

Get information about a specific issue in a GitHub repository.

ParameterTypeDescription
issue_number *numberThe number of the issue
method *stringThe read operation to perform on a single issue. Options are: 1. get - Get issue details. Also returns best-effort hierarchy flags (`has_parent`, `has_children`); `parent` and `sub_issues_summary` are…
owner *stringThe owner of the repository
repo *stringThe name of the repository
pagenumberPage number for pagination (min 1)
perPagenumberResults per page for pagination (min 1, max 100)

issue_write

Create a new or update an existing issue in a GitHub repository.

ParameterTypeDescription
method *stringWrite operation to perform on a single issue. Options are: - 'create' - creates a new issue. - 'update' - updates an existing issue.
owner *stringRepository owner
repo *stringRepository name
assigneesarrayUsernames to assign to this issue
bodystringIssue body content
duplicate_ofnumberIssue number that this issue is a duplicate of. Required when state_reason is 'duplicate'.
issue_fieldsarrayIssue field values to set or clear. Each item requires 'field_name' and exactly one of 'value', 'field_option_name', or 'delete: true'.
issue_numbernumberIssue number to update
labelsarrayLabels to apply to this issue
milestonenumberMilestone number
parent_issue_numbernumberIssue number of the parent issue. Only used when method is 'create' and cannot be combined with issue_fields. The new issue is created and attached to this parent in the same operation.
parent_ownerstringRepository owner of the parent issue. Must be provided with parent_repo. Omit both to use owner and repo. Only used when method is 'create' and parent_issue_number is provided.
parent_repostringRepository name of the parent issue. Must be provided with parent_owner. Omit both to use owner and repo. Only used when method is 'create' and parent_issue_number is provided.
statestringNew state
state_reasonstringReason for the state change. Ignored unless state is changed.
titlestringIssue title
typeType of this issue. For updates, pass null to remove the current type. Only use if issue types are enabled for this repository. Use list_issue_types to get valid type values for this repository or its…

list_branches

List branches in a GitHub repository

ParameterTypeDescription
owner *stringRepository owner
repo *stringRepository name
pagenumberPage number for pagination (min 1)
perPagenumberResults per page for pagination (min 1, max 100)

list_commits

Get 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).

ParameterTypeDescription
owner *stringRepository owner
repo *stringRepository name
authorstringAuthor username or email address to filter commits by
fieldsarraySubset of fields to return for each commit. If omitted, all fields are returned. Use this to reduce response size when you only need specific fields, e.g. just 'sha' and 'html_url'.
pagenumberPage number for pagination (min 1)
pathstringOnly commits containing this file path will be returned
perPagenumberResults per page for pagination (min 1, max 100)
shastringCommit 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.
sincestringOnly commits after this date will be returned (ISO 8601 format: YYYY-MM-DDTHH:MM:SSZ or YYYY-MM-DD)
untilstringOnly commits before this date will be returned (ISO 8601 format: YYYY-MM-DDTHH:MM:SSZ or YYYY-MM-DD)

list_issue_fields

List issue fields for a repository or organization. Returns field definitions including name, type (text, number, date, single_select), and for single_select fields the list of valid option names. When repo is omitted, returns org-level fields directly.

ParameterTypeDescription
owner *stringThe account owner of the repository or organization. The name is not case sensitive.
repostringThe name of the repository. When provided, returns fields for this specific repository (inherited from its organization). When omitted, returns org-level fields directly.

list_issue_types

List supported issue types for a repository or its owner organization. When repo is omitted, returns org-level issue types directly.

ParameterTypeDescription
owner *stringThe account owner of the repository or organization.
repostringThe name of the repository. When provided, returns issue types for this specific repository. When omitted, returns org-level issue types directly.

list_issues

List issues in a GitHub repository. For pagination, use the 'endCursor' from the previous response's 'pageInfo' in the 'after' parameter.

ParameterTypeDescription
owner *stringRepository owner
repo *stringRepository name
afterstringCursor for pagination. Use the cursor from the previous response.
directionstringOrder direction. If provided, the 'orderBy' also needs to be provided.
field_filtersarrayFilter by custom issue field values. Each entry takes a field_name and a value; the server looks up the field and coerces the value to its type (single-select option name, text, number, or YYYY-MM-DD…
fieldsarraySubset of fields to return for each issue. If omitted, all fields are returned. Use this to reduce response size when you only need specific fields; omitting 'body' and 'field_values' in particular dr…
labelsarrayFilter by labels
orderBystringOrder issues by field. If provided, the 'direction' also needs to be provided.
perPagenumberResults per page for pagination (min 1, max 100)
sincestringFilter by date (ISO 8601 timestamp)
statestringFilter by state, by default both open and closed issues are returned when not provided

list_pull_requests

List 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.

ParameterTypeDescription
owner *stringRepository owner
repo *stringRepository name
basestringFilter by base branch
directionstringSort direction
fieldsarraySubset of fields to return for each pull request. If omitted, all fields are returned. Use this to reduce response size when you only need specific fields; omitting 'body' in particular drops the larg…
headstringFilter by head user/org and branch
pagenumberPage number for pagination (min 1)
perPagenumberResults per page for pagination (min 1, max 100)
sortstringSort by
statestringFilter by state

list_releases

List releases in a GitHub repository

ParameterTypeDescription
owner *stringRepository owner
repo *stringRepository name
fieldsarraySubset of fields to return for each release. If omitted, all fields are returned. Use this to reduce response size when you only need specific fields; omitting 'body' in particular drops the largest p…
pagenumberPage number for pagination (min 1)
perPagenumberResults per page for pagination (min 1, max 100)

list_repository_collaborators

List collaborators of a GitHub repository. Results are paginated; the response includes `nextPage`, `prevPage`, `firstPage`, and `lastPage` fields. To get the next page, use the `nextPage` value as the `page` parameter.

ParameterTypeDescription
owner *stringRepository owner
repo *stringRepository name
affiliationstringFilter by affiliation. Can be one of: 'outside' (outside collaborators), 'direct' (all with permissions regardless of org membership), 'all' (all collaborators). Default: 'all'
pagenumberPage number for pagination (default 1, min 1)
perPagenumberResults per page for pagination (default 30, min 1, max 100)

list_tags

List git tags in a GitHub repository

ParameterTypeDescription
owner *stringRepository owner
repo *stringRepository name
pagenumberPage number for pagination (min 1)
perPagenumberResults per page for pagination (min 1, max 100)

merge_pull_request

Merge a pull request in a GitHub repository.

ParameterTypeDescription
owner *stringRepository owner
pullNumber *numberPull request number
repo *stringRepository name
commit_messagestringExtra detail for merge commit
commit_titlestringTitle for merge commit
expectedHeadShastringThe expected SHA of the pull request's HEAD ref
merge_methodstringMerge method

pull_request_read

Get information on a specific pull request in GitHub repository.

ParameterTypeDescription
method *stringAction to specify what pull request data needs to be retrieved from GitHub. Possible options: 1. get - Get details of a specific pull request. 2. get_diff - Get the diff of a pull request. 3. get…
owner *stringRepository owner
pullNumber *numberPull request number
repo *stringRepository name
afterstringCursor for pagination, used only by the get_review_comments method. Pass the endCursor from the previous page's PageInfo to fetch the next page.
pagenumberPage number for pagination (min 1)
perPagenumberResults per page for pagination (min 1, max 100)

pull_request_review_write

Create and/or submit, delete review of a pull request. Available methods: - create: Create a new review of a pull request. If "event" parameter is provided, the review is submitted. If "event" is omitted, a pending review is created. - submit_pending: Submit an existing pending review of a pull request. This requires that a pending review exists for the current user on the specified pull request. The "body" and "event" parameters are used when submitting the review. - delete_pending: Delete an existing pending review of a pull request. This requires that a pending review exists for the curren…

ParameterTypeDescription
method *stringThe write operation to perform on pull request review.
owner *stringRepository owner
pullNumber *numberPull request number
repo *stringRepository name
bodystringReview comment text
commitIDstringSHA of commit to review
eventstringReview action to perform.
resolutionReasonstringOptional reason for resolving a Copilot code review thread: addressed, wont-fix, or invalid.
threadIdstringThe node ID of the review thread (e.g., PRRT_kwDOxxx). Required for resolve_thread and unresolve_thread methods. Get thread IDs from pull_request_read with method get_review_comments.

push_files

Push multiple files to a GitHub repository in a single commit

ParameterTypeDescription
branch *stringBranch to push to
files *arrayArray of file objects to push, each object with path (string) and content (string)
message *stringCommit message
owner *stringRepository owner
repo *stringRepository name

request_copilot_review

Request a GitHub Copilot code review for a pull request. Use this for automated feedback on pull requests, usually before requesting a human reviewer.

ParameterTypeDescription
owner *stringRepository owner
pullNumber *numberPull request number
repo *stringRepository name

search_code

Fast 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.

ParameterTypeDescription
query *stringSearch query (GitHub code search REST). Implicit AND between terms; supports `OR`, `NOT`, and `"quoted phrase"` for exact match. Qualifiers: `repo:owner/repo`, `org:`, `user:`, `language:`, `path:dir`…
fieldsarraySubset of fields to return for each code search result. If omitted, all fields are returned. Use this to reduce response size when you only need specific fields; omitting 'repository' and 'text_matche…
orderstringSort order for results
pagenumberPage number for pagination (min 1)
perPagenumberResults per page for pagination (min 1, max 100)
sortstringSort field ('indexed' only)

search_commits

Search for commits across GitHub repositories using GitHub's commit search syntax. Useful for finding specific changes, authors, or messages across one or many repositories. Searches the default branch only.

ParameterTypeDescription
query *stringCommit search query (GitHub commit search REST). Searches commit messages on the default branch only. Scope the search with `repo:owner/repo`, `org:`, or `user:` (queries without a scope qualifier mat…
orderstringSort order
pagenumberPage number for pagination (min 1)
perPagenumberResults per page for pagination (min 1, max 100)
sortstringSort by author or committer date (defaults to best match)

search_issues

Search issues using natural-language semantic matching. Best for conceptual or paraphrased queries (e.g. "login fails after password reset"). Already scoped to is:issue.

ParameterTypeDescription
query *stringThe search query, as natural language. When the user gives alternative wordings, include them as plain words rather than joining them with OR.
fieldsarraySubset of fields to return for each issue result. If omitted, all fields are returned. Use this to reduce response size when you only need specific fields; omitting 'body', 'reactions', and 'labels' i…
orderstringSort order
ownerstringOptional repository owner. If provided with repo, only issues for this repository are listed.
pagenumberPage number for pagination (min 1)
perPagenumberResults per page for pagination (min 1, max 100)
repostringOptional repository name. If provided with owner, only issues for this repository are listed.
sortstringSort field by number of matches of categories, defaults to best match

search_pull_requests

Search for pull requests in GitHub repositories using issues search syntax already scoped to is:pr

ParameterTypeDescription
query *stringSearch query using GitHub pull request search syntax
fieldsarraySubset of fields to return for each pull request result. If omitted, all fields are returned. Use this to reduce response size when you only need specific fields; omitting 'body', 'reactions', and 'la…
orderstringSort order
ownerstringOptional repository owner. If provided with repo, only pull requests for this repository are listed.
pagenumberPage number for pagination (min 1)
perPagenumberResults per page for pagination (min 1, max 100)
repostringOptional repository name. If provided with owner, only pull requests for this repository are listed.
sortstringSort field by number of matches of categories, defaults to best match

search_repositories

Find GitHub repositories by name, description, readme, topics, or other metadata. Perfect for discovering projects, finding examples, or locating specific repositories across GitHub.

ParameterTypeDescription
query *stringRepository search query. Examples: 'machine learning in:name stars:>1000 language:python', 'topic:react', 'user:facebook'. Supports advanced search syntax for precise filtering.
minimal_outputbooleanReturn minimal repository information (default: true). When false, modern clients receive additional curated repository details, not the complete GitHub API object. Legacy clients retain full GitHub A…
orderstringSort order
pagenumberPage number for pagination (min 1)
perPagenumberResults per page for pagination (min 1, max 100)
sortstringSort repositories by field, defaults to best match

search_users

Find GitHub users by username, real name, or other profile information. Useful for locating developers, contributors, or team members.

ParameterTypeDescription
query *stringUser search query. Examples: 'john smith', 'location:seattle', 'followers:>100'. Search is automatically scoped to type:user.
orderstringSort order
pagenumberPage number for pagination (min 1)
perPagenumberResults per page for pagination (min 1, max 100)
sortstringSort users by number of followers or repositories, or when the person joined GitHub.

sub_issue_write

Add a sub-issue to a parent issue in a GitHub repository.

ParameterTypeDescription
issue_number *numberThe number of the parent issue
method *stringThe action to perform on a single sub-issue Options are: - 'add' - add a sub-issue to a parent issue in a GitHub repository. - 'remove' - remove a sub-issue from a parent issue in a GitHub repository.…
owner *stringRepository owner
repo *stringRepository name
sub_issue_id *numberThe ID of the sub-issue to add. ID is not the same as issue number
after_idnumberThe ID of the sub-issue to be prioritized after (either after_id OR before_id should be specified)
before_idnumberThe ID of the sub-issue to be prioritized before (either after_id OR before_id should be specified)
replace_parentbooleanWhen true, replaces the sub-issue's current parent issue. Use with 'add' method only.

ui_get

Fetch UI data for MCP Apps (labels, assignees, milestones, issue types, branches, issue fields, reviewers).

ParameterTypeDescription
method *stringThe type of data to fetch
owner *stringRepository owner (required for all methods)
repostringRepository name (required for labels, assignees, milestones, branches, issue fields, reviewers)

update_issue_comment

Update the body of an existing issue or pull request conversation comment. This tool cannot update pull request review comments.

ParameterTypeDescription
body *stringNew comment content
comment_id *integerThe numeric ID of the issue or pull request conversation comment to update. Do not use a pull request review comment ID.
owner *stringRepository owner
repo *stringRepository name

update_pull_request

Update an existing pull request in a GitHub repository.

ParameterTypeDescription
owner *stringRepository owner
pullNumber *numberPull request number to update
repo *stringRepository name
basestringNew base branch name
bodystringNew description
draftbooleanMark pull request as draft (true) or ready for review (false)
maintainer_can_modifybooleanAllow maintainer edits
reviewersarrayGitHub usernames or ORG/team-slug team reviewers to request reviews from
statestringNew state
titlestringNew title

update_pull_request_branch

Update the branch of a pull request with the latest changes from the base branch.

ParameterTypeDescription
owner *stringRepository owner
pullNumber *numberPull request number
repo *stringRepository name
expectedHeadShastringThe expected SHA of the pull request's HEAD ref