---
canonical_url: "https://docs.composio.dev/toolkits/github_mcp"
markdown_url: "https://docs.composio.dev/toolkits/github_mcp.md"
product: "platform"
version: null
last_updated: null
---

# GitHub MCP

GitHub MCP lets agents work with repositories, issues, pull requests, users, actions, projects, notifications, code security, and other authorized GitHub surfaces.

- **Category:** model context protocol
- **Auth:** API_KEY
- **Composio-managed OAuth available?** N/A
- **Tools:** 44
- **Triggers:** 0
- **Slug:** `GITHUB_MCP`
- **Version:** 20260910_00

## Tools

### Add comment to pending review

**Slug:** `GITHUB_MCP_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).

#### Input Parameters

| Parameter | Type | Required | Description |
|-----------|------|----------|-------------|
| `body` | string | Yes | The text of the review comment |
| `line` | number | No | 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 |
| `path` | string | Yes | The relative path to the file that necessitates a comment |
| `repo` | string | Yes | Repository name |
| `side` | string ("LEFT" | "RIGHT") | No | The side of the diff to comment on. LEFT indicates the previous state, RIGHT indicates the new state |
| `owner` | string | Yes | Repository owner |
| `startLine` | number | No | For multi-line comments, the first line of the range that the comment applies to |
| `startSide` | string ("LEFT" | "RIGHT") | No | 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 |
| `pullNumber` | number | Yes | Pull request number |
| `subjectType` | string ("FILE" | "LINE") | Yes | The level at which the comment is targeted |

### Add issue comment

**Slug:** `GITHUB_MCP_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.

#### Input Parameters

| Parameter | Type | Required | Description |
|-----------|------|----------|-------------|
| `body` | string | No | Comment content. Required unless reaction is provided. |
| `repo` | string | Yes | Repository name |
| `owner` | string | Yes | Repository owner |
| `reaction` | string ("+1" | "-1" | "laugh" | "confused" | "heart" | "hooray" | "rocket" | "eyes") | No | Emoji reaction to add. Required unless body is provided. |
| `comment_id` | integer | No | The 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. |
| `issue_number` | number | Yes | Issue or pull request number to comment on or react to. |

### Add reply to pull request comment

**Slug:** `GITHUB_MCP_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.

#### Input Parameters

| Parameter | Type | Required | Description |
|-----------|------|----------|-------------|
| `body` | string | No | The text of the reply. Required unless reaction is provided. |
| `repo` | string | Yes | Repository name |
| `owner` | string | Yes | Repository owner |
| `reaction` | string ("+1" | "-1" | "laugh" | "confused" | "heart" | "hooray" | "rocket" | "eyes") | No | Emoji reaction to add. Required unless body is provided. |
| `commentId` | number | Yes | The 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_...). |
| `pullNumber` | number | No | Pull request number. Required when body is provided. |

### Create branch

**Slug:** `GITHUB_MCP_CREATE_BRANCH`

Create a new branch in a GitHub repository

#### Input Parameters

| Parameter | Type | Required | Description |
|-----------|------|----------|-------------|
| `repo` | string | Yes | Repository name |
| `owner` | string | Yes | Repository owner |
| `branch` | string | Yes | Name for new branch |
| `from_branch` | string | No | Source branch (defaults to repo default) |

### Create or update file

**Slug:** `GITHUB_MCP_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.


#### Input Parameters

| Parameter | Type | Required | Description |
|-----------|------|----------|-------------|
| `sha` | string | No | The 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. |
| `path` | string | Yes | Path where to create/update the file |
| `repo` | string | Yes | Repository name |
| `owner` | string | Yes | Repository owner (username or organization) |
| `branch` | string | Yes | Branch to create/update the file in |
| `content` | string | Yes | Content 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` | string | Yes | Commit message |
| `allow_symlink_write` | boolean | No | Set true to update a symbolic link itself; content must be its new target path. |

### Create pull request

**Slug:** `GITHUB_MCP_CREATE_PULL_REQUEST`

Create a new pull request in a GitHub repository.

#### Input Parameters

| Parameter | Type | Required | Description |
|-----------|------|----------|-------------|
| `base` | string | Yes | Branch to merge into |
| `body` | string | No | PR description |
| `head` | string | Yes | Branch containing changes |
| `repo` | string | Yes | Repository name |
| `draft` | boolean | No | Create as draft PR |
| `owner` | string | Yes | Repository owner |
| `title` | string | Yes | PR title |
| `reviewers` | array | No | GitHub usernames or ORG/team-slug team reviewers to request reviews from |
| `maintainer_can_modify` | boolean | No | Allow maintainer edits |

### Create repository

**Slug:** `GITHUB_MCP_CREATE_REPOSITORY`

Create a new GitHub repository in your account or specified organization

#### Input Parameters

| Parameter | Type | Required | Description |
|-----------|------|----------|-------------|
| `name` | string | Yes | Repository name |
| `private` | boolean | No | Whether the repository should be private. Defaults to true (private) when omitted. |
| `autoInit` | boolean | No | Initialize with README |
| `description` | string | No | Repository description |
| `organization` | string | No | Organization to create the repository in (omit to create in your personal account) |

### Delete file

**Slug:** `GITHUB_MCP_DELETE_FILE`

Delete a file from a GitHub repository

#### Input Parameters

| Parameter | Type | Required | Description |
|-----------|------|----------|-------------|
| `path` | string | Yes | Path to the file to delete |
| `repo` | string | Yes | Repository name |
| `owner` | string | Yes | Repository owner (username or organization) |
| `branch` | string | Yes | Branch to delete the file from |
| `message` | string | Yes | Commit message |

### Fork repository

**Slug:** `GITHUB_MCP_FORK_REPOSITORY`

Fork a GitHub repository to your account or specified organization

#### Input Parameters

| Parameter | Type | Required | Description |
|-----------|------|----------|-------------|
| `repo` | string | Yes | Repository name |
| `owner` | string | Yes | Repository owner |
| `organization` | string | No | Organization to fork to |

### Get commit

**Slug:** `GITHUB_MCP_GET_COMMIT`

Get details for a commit from a GitHub repository

#### Input Parameters

| Parameter | Type | Required | Description |
|-----------|------|----------|-------------|
| `sha` | string | Yes | Commit SHA, branch name, or tag name |
| `page` | number | No | Page number for pagination (min 1) |
| `repo` | string | Yes | Repository name |
| `owner` | string | Yes | Repository owner |
| `detail` | string ("none" | "stats" | "full_patch") | No | Level 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, changes), with no patch content. "full_patch" additionally includes the unified diff content for each file and can be very large. |
| `perPage` | number | No | Results per page for pagination (min 1, max 100) |

### Get file contents

**Slug:** `GITHUB_MCP_GET_FILE_CONTENTS`

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

#### Input Parameters

| Parameter | Type | Required | Description |
|-----------|------|----------|-------------|
| `ref` | string | No | Accepts optional git refs such as `refs/tags/{tag}`, `refs/heads/{branch}` or `refs/pull/{pr_number}/head` |
| `sha` | string | No | Accepts optional commit SHA. If specified, it will be used instead of ref |
| `path` | string | No | Path to file/directory |
| `repo` | string | Yes | Repository name |
| `owner` | string | Yes | Repository owner (username or organization) |
| `fields` | array | No | Subset 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 directories and you only need specific fields, e.g. just 'name' and 'type'. |

### Get label

**Slug:** `GITHUB_MCP_GET_LABEL`

Get a specific label from a repository.

#### Input Parameters

| Parameter | Type | Required | Description |
|-----------|------|----------|-------------|
| `name` | string | Yes | Label name. |
| `repo` | string | Yes | Repository name |
| `owner` | string | Yes | Repository owner (username or organization name) |

### Get latest release

**Slug:** `GITHUB_MCP_GET_LATEST_RELEASE`

Get the latest release in a GitHub repository

#### Input Parameters

| Parameter | Type | Required | Description |
|-----------|------|----------|-------------|
| `repo` | string | Yes | Repository name |
| `owner` | string | Yes | Repository owner |

### Get me

**Slug:** `GITHUB_MCP_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

**Slug:** `GITHUB_MCP_GET_RELEASE_BY_TAG`

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

#### Input Parameters

| Parameter | Type | Required | Description |
|-----------|------|----------|-------------|
| `tag` | string | Yes | Tag name (e.g., 'v1.0.0') |
| `repo` | string | Yes | Repository name |
| `owner` | string | Yes | Repository owner |

### Get tag

**Slug:** `GITHUB_MCP_GET_TAG`

Get details about a specific git tag in a GitHub repository

#### Input Parameters

| Parameter | Type | Required | Description |
|-----------|------|----------|-------------|
| `tag` | string | Yes | Tag name |
| `repo` | string | Yes | Repository name |
| `owner` | string | Yes | Repository owner |

### Get team members

**Slug:** `GITHUB_MCP_GET_TEAM_MEMBERS`

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

#### Input Parameters

| Parameter | Type | Required | Description |
|-----------|------|----------|-------------|
| `org` | string | Yes | Organization login (owner) that contains the team. |
| `team_slug` | string | Yes | Team slug |

### Get teams

**Slug:** `GITHUB_MCP_GET_TEAMS`

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

#### Input Parameters

| Parameter | Type | Required | Description |
|-----------|------|----------|-------------|
| `user` | string | No | Username to get teams for. If not provided, uses the authenticated user. |

### Issue read

**Slug:** `GITHUB_MCP_ISSUE_READ`

Get information about a specific issue in a GitHub repository.

#### Input Parameters

| Parameter | Type | Required | Description |
|-----------|------|----------|-------------|
| `page` | number | No | Page number for pagination (min 1) |
| `repo` | string | Yes | The name of the repository |
| `owner` | string | Yes | The owner of the repository |
| `method` | string ("get" | "get_comments" | "get_sub_issues" | "get_parent" | "get_labels") | Yes | The 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 optional relationship summaries, and `closed_by_pull_requests` summarizes the pull requests configured to close the issue as `total_count` plus up to 5 `references`. 2. get_comments - Get issue comments. 3. get_sub_issues - Get sub-issues (children) of the issue. 4. get_parent - Get the parent issue, if this issue is a sub-issue of another. 5. get_labels - Get labels assigned to the issue.  |
| `perPage` | number | No | Results per page for pagination (min 1, max 100) |
| `issue_number` | number | Yes | The number of the issue |

### Issue write

**Slug:** `GITHUB_MCP_ISSUE_WRITE`

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

#### Input Parameters

| Parameter | Type | Required | Description |
|-----------|------|----------|-------------|
| `body` | string | No | Issue body content |
| `repo` | string | Yes | Repository name |
| `type` | string | No | Type 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 owner organization. If the repository doesn't support issue types, omit this parameter. |
| `owner` | string | Yes | Repository owner |
| `state` | string ("open" | "closed") | No | New state |
| `title` | string | No | Issue title |
| `labels` | array | No | Labels to apply to this issue |
| `method` | string ("create" | "update") | Yes | Write operation to perform on a single issue. Options are: - 'create' - creates a new issue. - 'update' - updates an existing issue.  |
| `assignees` | array | No | Usernames to assign to this issue |
| `milestone` | number | No | Milestone number |
| `parent_repo` | string | No | Repository 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. |
| `duplicate_of` | number | No | Issue number that this issue is a duplicate of. Required when state_reason is 'duplicate'. |
| `issue_fields` | array | No | Issue field values to set or clear. Each item requires 'field_name' and exactly one of 'value', 'field_option_name', or 'delete: true'. |
| `issue_number` | number | No | Issue number to update |
| `parent_owner` | string | No | Repository 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. |
| `state_reason` | string ("completed" | "not_planned" | "duplicate") | No | Reason for the state change. Ignored unless state is changed. |
| `parent_issue_number` | number | No | Issue 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. |

### List branches

**Slug:** `GITHUB_MCP_LIST_BRANCHES`

List branches in a GitHub repository

#### Input Parameters

| Parameter | Type | Required | Description |
|-----------|------|----------|-------------|
| `page` | number | No | Page number for pagination (min 1) |
| `repo` | string | Yes | Repository name |
| `owner` | string | Yes | Repository owner |
| `perPage` | number | No | Results per page for pagination (min 1, max 100) |

### List commits

**Slug:** `GITHUB_MCP_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).

#### Input Parameters

| Parameter | Type | Required | Description |
|-----------|------|----------|-------------|
| `sha` | string | No | 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. |
| `page` | number | No | Page number for pagination (min 1) |
| `path` | string | No | Only commits containing this file path will be returned |
| `repo` | string | Yes | Repository name |
| `owner` | string | Yes | Repository owner |
| `since` | string | No | Only commits after this date will be returned (ISO 8601 format: YYYY-MM-DDTHH:MM:SSZ or YYYY-MM-DD) |
| `until` | string | No | Only commits before this date will be returned (ISO 8601 format: YYYY-MM-DDTHH:MM:SSZ or YYYY-MM-DD) |
| `author` | string | No | Author username or email address to filter commits by |
| `fields` | array | No | Subset 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'. |
| `perPage` | number | No | Results per page for pagination (min 1, max 100) |

### List issue fields

**Slug:** `GITHUB_MCP_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.

#### Input Parameters

| Parameter | Type | Required | Description |
|-----------|------|----------|-------------|
| `repo` | string | No | The name of the repository. When provided, returns fields for this specific repository (inherited from its organization). When omitted, returns org-level fields directly. |
| `owner` | string | Yes | The account owner of the repository or organization. The name is not case sensitive. |

### List issues

**Slug:** `GITHUB_MCP_LIST_ISSUES`

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

#### Input Parameters

| Parameter | Type | Required | Description |
|-----------|------|----------|-------------|
| `repo` | string | Yes | Repository name |
| `after` | string | No | Cursor for pagination. Use the cursor from the previous response. |
| `owner` | string | Yes | Repository owner |
| `since` | string | No | Filter by date (ISO 8601 timestamp) |
| `state` | string ("OPEN" | "CLOSED") | No | Filter by state, by default both open and closed issues are returned when not provided |
| `fields` | array | No | Subset 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 drops the largest per-result data. |
| `labels` | array | No | Filter by labels |
| `orderBy` | string ("CREATED_AT" | "UPDATED_AT" | "COMMENTS") | No | Order issues by field. If provided, the 'direction' also needs to be provided. |
| `perPage` | number | No | Results per page for pagination (min 1, max 100) |
| `direction` | string ("ASC" | "DESC") | No | Order direction. If provided, the 'orderBy' also needs to be provided. |
| `field_filters` | array | No | Filter 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 date). |

### List issue types

**Slug:** `GITHUB_MCP_LIST_ISSUE_TYPES`

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

#### Input Parameters

| Parameter | Type | Required | Description |
|-----------|------|----------|-------------|
| `repo` | string | No | The name of the repository. When provided, returns issue types for this specific repository. When omitted, returns org-level issue types directly. |
| `owner` | string | Yes | The account owner of the repository or organization. |

### List pull requests

**Slug:** `GITHUB_MCP_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.

#### Input Parameters

| Parameter | Type | Required | Description |
|-----------|------|----------|-------------|
| `base` | string | No | Filter by base branch |
| `head` | string | No | Filter by head user/org and branch |
| `page` | number | No | Page number for pagination (min 1) |
| `repo` | string | Yes | Repository name |
| `sort` | string ("created" | "updated" | "popularity" | "long-running") | No | Sort by |
| `owner` | string | Yes | Repository owner |
| `state` | string ("open" | "closed" | "all") | No | Filter by state |
| `fields` | array | No | Subset 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 largest per-result data. |
| `perPage` | number | No | Results per page for pagination (min 1, max 100) |
| `direction` | string ("asc" | "desc") | No | Sort direction |

### List releases

**Slug:** `GITHUB_MCP_LIST_RELEASES`

List releases in a GitHub repository

#### Input Parameters

| Parameter | Type | Required | Description |
|-----------|------|----------|-------------|
| `page` | number | No | Page number for pagination (min 1) |
| `repo` | string | Yes | Repository name |
| `owner` | string | Yes | Repository owner |
| `fields` | array | No | Subset 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 per-release data. |
| `perPage` | number | No | Results per page for pagination (min 1, max 100) |

### List repository collaborators

**Slug:** `GITHUB_MCP_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.

#### Input Parameters

| Parameter | Type | Required | Description |
|-----------|------|----------|-------------|
| `page` | number | No | Page number for pagination (default 1, min 1) |
| `repo` | string | Yes | Repository name |
| `owner` | string | Yes | Repository owner |
| `perPage` | number | No | Results per page for pagination (default 30, min 1, max 100) |
| `affiliation` | string ("outside" | "direct" | "all") | No | Filter by affiliation. Can be one of: 'outside' (outside collaborators), 'direct' (all with permissions regardless of org membership), 'all' (all collaborators). Default: 'all' |

### List tags

**Slug:** `GITHUB_MCP_LIST_TAGS`

List git tags in a GitHub repository

#### Input Parameters

| Parameter | Type | Required | Description |
|-----------|------|----------|-------------|
| `page` | number | No | Page number for pagination (min 1) |
| `repo` | string | Yes | Repository name |
| `owner` | string | Yes | Repository owner |
| `perPage` | number | No | Results per page for pagination (min 1, max 100) |

### Merge pull request

**Slug:** `GITHUB_MCP_MERGE_PULL_REQUEST`

Merge a pull request in a GitHub repository.

#### Input Parameters

| Parameter | Type | Required | Description |
|-----------|------|----------|-------------|
| `repo` | string | Yes | Repository name |
| `owner` | string | Yes | Repository owner |
| `pullNumber` | number | Yes | Pull request number |
| `commit_title` | string | No | Title for merge commit |
| `merge_method` | string ("merge" | "squash" | "rebase") | No | Merge method |
| `commit_message` | string | No | Extra detail for merge commit |
| `expectedHeadSha` | string | No | The expected SHA of the pull request's HEAD ref |

### Pull request read

**Slug:** `GITHUB_MCP_PULL_REQUEST_READ`

Get information on a specific pull request in GitHub repository.

#### Input Parameters

| Parameter | Type | Required | Description |
|-----------|------|----------|-------------|
| `page` | number | No | Page number for pagination (min 1) |
| `repo` | string | Yes | Repository name |
| `after` | string | No | Cursor for pagination, used only by the get_review_comments method. Pass the endCursor from the previous page's PageInfo to fetch the next page. |
| `owner` | string | Yes | Repository owner |
| `method` | string ("get" | "get_diff" | "get_status" | "get_files" | "get_commits" | "get_review_comments" | "get_reviews" | "get_comments" | "get_check_runs") | Yes | Action 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_status - Get combined commit status of a head commit in a pull request.  4. get_files - Get the list of files changed in a pull request. Use with pagination parameters to control the number of results returned.  5. get_commits - Get the list of commits on a pull request. Use with pagination parameters to control the number of results returned.  6. get_review_comments - Get review threads on a pull request. Each thread contains logically grouped review comments made on the same code location during pull request reviews. Returns thread metadata and comments with nullable current and original line-range coordinates (line, start_line, original_line, original_start_line). Current coordinates are omitted when unavailable, such as for outdated comments. Use cursor-based pagination (perPage, after) to control results.  7. get_reviews - Get the reviews on a pull request. When asked for review comments, use get_review_comments method. Use with pagination parameters to control the number of results returned.  8. get_comments - Get comments on a pull request. Use this if user doesn't specifically want review comments. Use with pagination parameters to control the number of results returned.  9. get_check_runs - Get check runs for the head commit of a pull request. Check runs are the individual CI/CD jobs and checks that run on the PR.  |
| `perPage` | number | No | Results per page for pagination (min 1, max 100) |
| `pullNumber` | number | Yes | Pull request number |

### Pull request review write

**Slug:** `GITHUB_MCP_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 current user on the specified pull request.
- resolve_thread: Resolve a review thread. Requires only "threadId" parameter with the thread's node ID (e.g., PRRT_kwDOxxx). The owner, repo, and pullNumber parameters are not used for this method. Resolving an already-resolved thread is a no-op.
- unresolve_thread: Unresolve a previously resolved review thread. Requires only "threadId" parameter. The owner, repo, and pullNumber parameters are not used for this method. Unresolving an already-unresolved thread is a no-op.


#### Input Parameters

| Parameter | Type | Required | Description |
|-----------|------|----------|-------------|
| `body` | string | No | Review comment text |
| `repo` | string | Yes | Repository name |
| `event` | string ("APPROVE" | "REQUEST_CHANGES" | "COMMENT") | No | Review action to perform. |
| `owner` | string | Yes | Repository owner |
| `method` | string ("create" | "submit_pending" | "delete_pending" | "resolve_thread" | "unresolve_thread") | Yes | The write operation to perform on pull request review. |
| `commitID` | string | No | SHA of commit to review |
| `threadId` | string | No | The 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. |
| `pullNumber` | number | Yes | Pull request number |

### Push files

**Slug:** `GITHUB_MCP_PUSH_FILES`

Push multiple files to a GitHub repository in a single commit

#### Input Parameters

| Parameter | Type | Required | Description |
|-----------|------|----------|-------------|
| `repo` | string | Yes | Repository name |
| `files` | array | Yes | Array of file objects to push, each object with path (string) and content (string) |
| `owner` | string | Yes | Repository owner |
| `branch` | string | Yes | Branch to push to |
| `message` | string | Yes | Commit message |

### Request copilot review

**Slug:** `GITHUB_MCP_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.

#### Input Parameters

| Parameter | Type | Required | Description |
|-----------|------|----------|-------------|
| `repo` | string | Yes | Repository name |
| `owner` | string | Yes | Repository owner |
| `pullNumber` | number | Yes | Pull request number |

### Run secret scanning

**Slug:** `GITHUB_MCP_RUN_SECRET_SCANNING`

Scan files, content, or recent changes for secrets such as API keys, passwords, tokens, and credentials.

This tool is intended for targeted scans of specific files, snippets, or diffs provided directly as content. The files parameter accepts either a single string or an array of strings containing raw file contents or diff hunks, and returns detected secrets with their locations and related secret scanning metadata. Content must not be empty. For full repository scanning, other mechanisms are available.

Caveats:

- Only files within the codebase should be scanned. Files outside of the codebase should not be sent.
- Files listed in .gitignore should be skipped.

#### Input Parameters

| Parameter | Type | Required | Description |
|-----------|------|----------|-------------|
| `repo` | string | Yes | Repository name |
| `files` | string | Yes | A single string or an array of strings containing file contents, snippets, or diff hunks to scan for secrets. These must be raw contents, not repository file paths. |
| `owner` | string | Yes | Repository owner |

### Search code

**Slug:** `GITHUB_MCP_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.

#### Input Parameters

| Parameter | Type | Required | Description |
|-----------|------|----------|-------------|
| `page` | number | No | Page number for pagination (min 1) |
| `sort` | string | No | Sort field ('indexed' only) |
| `order` | string ("asc" | "desc") | No | Sort order for results |
| `query` | string | Yes | Search 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` (prefix match), `filename:exact.ext`, `extension:`, `in:file`, `in:path`, `size:`, `is:archived`, `is:fork`. Max 256 chars. Examples: `WithContext language:go org:github`; `"package main" repo:o/r`; `func extension:go path:cmd repo:o/r`; `NOT TODO language:go repo:o/r`. |
| `fields` | array | No | Subset 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_matches' in particular drops the largest per-result data. |
| `perPage` | number | No | Results per page for pagination (min 1, max 100) |

### Search commits

**Slug:** `GITHUB_MCP_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.

#### Input Parameters

| Parameter | Type | Required | Description |
|-----------|------|----------|-------------|
| `page` | number | No | Page number for pagination (min 1) |
| `sort` | string ("author-date" | "committer-date") | No | Sort by author or committer date (defaults to best match) |
| `order` | string ("asc" | "desc") | No | Sort order |
| `query` | string | Yes | Commit 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 match across all of GitHub and are usually not what you want). Other qualifiers: `author:`, `committer:`, `author-name:`, `committer-name:`, `author-email:`, `committer-email:`, `author-date:`, `committer-date:` (supports `>`, `<`, `>=`, `<=`, and `YYYY-MM-DD..YYYY-MM-DD` ranges), `merge:true&#124;false`, `hash:`, `tree:`, `parent:`, `is:public`. Examples: `repo:owner/repo fix panic`; `org:github author:defunkt committer-date:>=2024-01-01`; `"refactor cache" repo:o/r`; `hash:abc1234 repo:o/r`. |
| `perPage` | number | No | Results per page for pagination (min 1, max 100) |

### Search issues

**Slug:** `GITHUB_MCP_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.

#### Input Parameters

| Parameter | Type | Required | Description |
|-----------|------|----------|-------------|
| `page` | number | No | Page number for pagination (min 1) |
| `repo` | string | No | Optional repository name. If provided with owner, only issues for this repository are listed. |
| `sort` | string ("comments" | "reactions" | "reactions-+1" | "reactions--1" | "reactions-smile" | "reactions-thinking_face" | "reactions-heart" | "reactions-tada" | "interactions" | "created" | "updated") | No | Sort field by number of matches of categories, defaults to best match |
| `order` | string ("asc" | "desc") | No | Sort order |
| `owner` | string | No | Optional repository owner. If provided with repo, only issues for this repository are listed. |
| `query` | string | Yes | The search query, as natural language. When the user gives alternative wordings, include them as plain words rather than joining them with OR. |
| `fields` | array | No | Subset 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' in particular drops the largest per-result data. |
| `perPage` | number | No | Results per page for pagination (min 1, max 100) |

### Search pull requests

**Slug:** `GITHUB_MCP_SEARCH_PULL_REQUESTS`

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

#### Input Parameters

| Parameter | Type | Required | Description |
|-----------|------|----------|-------------|
| `page` | number | No | Page number for pagination (min 1) |
| `repo` | string | No | Optional repository name. If provided with owner, only pull requests for this repository are listed. |
| `sort` | string ("comments" | "reactions" | "reactions-+1" | "reactions--1" | "reactions-smile" | "reactions-thinking_face" | "reactions-heart" | "reactions-tada" | "interactions" | "created" | "updated") | No | Sort field by number of matches of categories, defaults to best match |
| `order` | string ("asc" | "desc") | No | Sort order |
| `owner` | string | No | Optional repository owner. If provided with repo, only pull requests for this repository are listed. |
| `query` | string | Yes | Search query using GitHub pull request search syntax |
| `fields` | array | No | Subset 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 'labels' in particular drops the largest per-result data. |
| `perPage` | number | No | Results per page for pagination (min 1, max 100) |

### Search repositories

**Slug:** `GITHUB_MCP_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.

#### Input Parameters

| Parameter | Type | Required | Description |
|-----------|------|----------|-------------|
| `page` | number | No | Page number for pagination (min 1) |
| `sort` | string ("stars" | "forks" | "help-wanted-issues" | "updated") | No | Sort repositories by field, defaults to best match |
| `order` | string ("asc" | "desc") | No | Sort order |
| `query` | string | Yes | Repository search query. Examples: 'machine learning in:name stars:>1000 language:python', 'topic:react', 'user:facebook'. Supports advanced search syntax for precise filtering. |
| `perPage` | number | No | Results per page for pagination (min 1, max 100) |
| `minimal_output` | boolean | No | Return minimal repository information (default: true). When false, returns full GitHub API repository objects. |

### Search users

**Slug:** `GITHUB_MCP_SEARCH_USERS`

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

#### Input Parameters

| Parameter | Type | Required | Description |
|-----------|------|----------|-------------|
| `page` | number | No | Page number for pagination (min 1) |
| `sort` | string ("followers" | "repositories" | "joined") | No | Sort users by number of followers or repositories, or when the person joined GitHub. |
| `order` | string ("asc" | "desc") | No | Sort order |
| `query` | string | Yes | User search query. Examples: 'john smith', 'location:seattle', 'followers:>100'. Search is automatically scoped to type:user. |
| `perPage` | number | No | Results per page for pagination (min 1, max 100) |

### Sub issue write

**Slug:** `GITHUB_MCP_SUB_ISSUE_WRITE`

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

#### Input Parameters

| Parameter | Type | Required | Description |
|-----------|------|----------|-------------|
| `repo` | string | Yes | Repository name |
| `owner` | string | Yes | Repository owner |
| `method` | string | Yes | The 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. - 'reprioritize' - change the order of sub-issues within a parent issue in a GitHub repository. Use either 'after_id' or 'before_id' to specify the new position. Writes issue hierarchy. To move a sub-issue to a new parent, use `add` with `replace_parent=true`; there is no writable parent field.  |
| `after_id` | number | No | The ID of the sub-issue to be prioritized after (either after_id OR before_id should be specified) |
| `before_id` | number | No | The ID of the sub-issue to be prioritized before (either after_id OR before_id should be specified) |
| `issue_number` | number | Yes | The number of the parent issue |
| `sub_issue_id` | number | Yes | The ID of the sub-issue to add. ID is not the same as issue number |
| `replace_parent` | boolean | No | When true, replaces the sub-issue's current parent issue. Use with 'add' method only. |

### Update pull request

**Slug:** `GITHUB_MCP_UPDATE_PULL_REQUEST`

Update an existing pull request in a GitHub repository.

#### Input Parameters

| Parameter | Type | Required | Description |
|-----------|------|----------|-------------|
| `base` | string | No | New base branch name |
| `body` | string | No | New description |
| `repo` | string | Yes | Repository name |
| `draft` | boolean | No | Mark pull request as draft (true) or ready for review (false) |
| `owner` | string | Yes | Repository owner |
| `state` | string ("open" | "closed") | No | New state |
| `title` | string | No | New title |
| `reviewers` | array | No | GitHub usernames or ORG/team-slug team reviewers to request reviews from |
| `pullNumber` | number | Yes | Pull request number to update |
| `maintainer_can_modify` | boolean | No | Allow maintainer edits |

### Update pull request branch

**Slug:** `GITHUB_MCP_UPDATE_PULL_REQUEST_BRANCH`

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

#### Input Parameters

| Parameter | Type | Required | Description |
|-----------|------|----------|-------------|
| `repo` | string | Yes | Repository name |
| `owner` | string | Yes | Repository owner |
| `pullNumber` | number | Yes | Pull request number |
| `expectedHeadSha` | string | No | The expected SHA of the pull request's HEAD ref |
