github-mcp-connector
v0.19.0A Model Context Protocol (MCP) connector for GitHub, for use with Claude.
These tools were reported by the server itself during our smoke test (tools/list), not copied from the README.
get_authenticated_user
Return the GitHub account the connector's token authenticates as. Useful as a connection/health check and to confirm which identity and permissions the connector is operating with.
get_rate_limit
Show the token's current GitHub API rate-limit status. Returns the remaining/limit/reset for the `core`, `search`, and `graphql` buckets — handy for diagnosing 403s or pacing bulk work. Doesn't count against the limit itself.
get_user
Get a user's or organization's public profile (gh api /users/<name>).
| Parameter | Type | Description |
|---|---|---|
username * | string |
list_workflows
List the workflow definitions in a repository (gh workflow list). These are the workflows under `.github/workflows` (the `id`/`name` you'd dispatch with `trigger_workflow`), not individual runs. Returns up to `limit` (max 100) workflows with their id, name, path, and state. Paginated: returns at most `limit` items from page `page` (1-based). If you get exactly `limit` items there are probably more; request `page=2`, and so on.
| Parameter | Type | Description |
|---|---|---|
owner * | string | |
repo * | string | |
limit | integer | |
page | integer |
cancel_workflow_run
Cancel an in-progress workflow run (a write; gated by read-only mode). `run_id` is the numeric run id (from `list_workflow_runs`). GitHub cancels the run asynchronously, so this returns immediately after the request is accepted. Requires a token with write access.
| Parameter | Type | Description |
|---|---|---|
owner * | string | |
repo * | string | |
run_id * | integer |
list_workflow_runs
List recent GitHub Actions workflow runs for a repository. Optionally filter by `branch` or by `status` (e.g. `completed`, `in_progress`, `queued`, `failure`, `success`). Returns up to `limit` (max 50) runs, newest first. Paginated: returns at most `limit` items from page `page` (1-based). If you get exactly `limit` items there are probably more; request `page=2`, and so on.
| Parameter | Type | Description |
|---|---|---|
owner * | string | |
repo * | string | |
branch | ||
limit | integer | |
page | integer | |
status |
list_workflow_run_jobs
List the jobs of a GitHub Actions workflow run. Use this to see which job(s) in a run failed (check `conclusion` and `failed_steps`) and to get each job's `id` for `get_job_logs`. `filter` is `latest` (default) or `all` (include earlier attempts). Returns up to `limit` (max 100) jobs. Paginated: returns at most `limit` items from page `page` (1-based). If you get exactly `limit` items there are probably more; request `page=2`, and so on.
| Parameter | Type | Description |
|---|---|---|
owner * | string | |
repo * | string | |
run_id * | integer | |
filter | string | |
limit | integer | |
page | integer |
get_job_logs
Get the plain-text logs for a single GitHub Actions job. Get `job_id` from `list_workflow_run_jobs`. Logs are truncated to `max_chars`; with `tail=True` (default) the END of the log is returned (where failures usually are), otherwise the beginning. `truncated` indicates whether anything was cut.
| Parameter | Type | Description |
|---|---|---|
job_id * | integer | |
owner * | string | |
repo * | string | |
max_chars | integer | |
tail | boolean |
rerun_workflow_run
Re-run a GitHub Actions workflow run. With `failed_only=True`, only the failed jobs are re-run; otherwise the whole run is re-run. Get `run_id` from `list_workflow_runs`. Disabled in read-only mode; requires a token with write access.
| Parameter | Type | Description |
|---|---|---|
owner * | string | |
repo * | string | |
run_id * | integer | |
failed_only | boolean |
trigger_workflow
Manually trigger a workflow_dispatch run. `workflow_id` is the workflow file name (e.g. `ci.yml`) or its numeric id. `ref` is the branch or tag to run on. `inputs` is an optional map of the workflow's declared inputs. The workflow must define an `on: workflow_dispatch` trigger. Disabled in read-only mode; requires write access.
| Parameter | Type | Description |
|---|---|---|
owner * | string | |
ref * | string | |
repo * | string | |
workflow_id * | string | |
inputs |
create_scheduled_workflow
Schedule recurring work by committing a cron GitHub Actions workflow. This is GitHub's native "do X later / on a schedule": it creates (or updates) a workflow file at `.github/workflows/<filename>` that runs `run` (a shell script) on the `cron` schedule, and also adds a `workflow_dispatch` trigger so you can run it on demand. `cron` is standard 5-field UTC cron (e.g. "0 9 * * 1" = 09:00 UTC every Monday). IMPORTANT: GitHub only fires `schedule` triggers from a repository's DEFAULT branch, so `branch` defaults to it — committing to another branch will run on…
| Parameter | Type | Description |
|---|---|---|
cron * | string | |
name * | string | |
owner * | string | |
repo * | string | |
run * | string | |
branch | ||
filename | ||
message | ||
runs_on | string |
list_repo_secrets
List the names of a repository's Actions secrets (values are never exposed). Returns each secret's name and created/updated timestamps. GitHub never returns secret values, so neither does this. Returns up to `limit` (max 100). Paginated: returns at most `limit` items from page `page` (1-based). If you get exactly `limit` items there are probably more; request `page=2`, and so on.
| Parameter | Type | Description |
|---|---|---|
owner * | string | |
repo * | string | |
limit | integer | |
page | integer |
set_repo_secret
Create or update a repository Actions secret (a gated write). The value is encrypted client-side with the repo's public key (a libsodium sealed box) before upload, so the plaintext is only ever held in memory. Creates the secret if absent, updates it otherwise. Requires a token with write access to Actions secrets, and the `PyNaCl` package.
| Parameter | Type | Description |
|---|---|---|
owner * | string | |
repo * | string | |
secret_name * | string | |
value * | string |
delete_repo_secret
Delete a repository Actions secret (a gated write).
| Parameter | Type | Description |
|---|---|---|
owner * | string | |
repo * | string | |
secret_name * | string |
list_repo_variables
List a repository's Actions variables (name + value; these are not secret). Returns up to `limit` (max 100) variables with their values and timestamps. Paginated: returns at most `limit` items from page `page` (1-based). If you get exactly `limit` items there are probably more; request `page=2`, and so on.
| Parameter | Type | Description |
|---|---|---|
owner * | string | |
repo * | string | |
limit | integer | |
page | integer |
set_repo_variable
Create or update a repository Actions variable (a gated write). Updates the variable if it exists, otherwise creates it. Variables are plaintext config (use `set_repo_secret` for sensitive values).
| Parameter | Type | Description |
|---|---|---|
name * | string | |
owner * | string | |
repo * | string | |
value * | string |
delete_repo_variable
Delete a repository Actions variable (a gated write).
| Parameter | Type | Description |
|---|---|---|
name * | string | |
owner * | string | |
repo * | string |
list_run_artifacts
List the artifacts produced by a workflow run. Returns each artifact's id, name, size, expiry, and `archive_download_url` (a short-lived API URL for the zip). Returns up to `limit` (max 100). Paginated: returns at most `limit` items from page `page` (1-based). If you get exactly `limit` items there are probably more; request `page=2`, and so on.
| Parameter | Type | Description |
|---|---|---|
owner * | string | |
repo * | string | |
run_id * | integer | |
limit | integer | |
page | integer |
download_artifact
Get a download link for a single run artifact. Returns the artifact's metadata and `archive_download_url` (a short-lived URL for the zip). The binary itself isn't streamed back over MCP — use the URL to fetch it.
| Parameter | Type | Description |
|---|---|---|
artifact_id * | integer | |
owner * | string | |
repo * | string |
get_dependabot_alert
Get a single Dependabot alert by its number, with full advisory detail. Where `list_dependabot_alerts` returns a one-line summary per alert, this returns one alert's complete detail: the advisory description, CVE/GHSA identifiers and CVSS score, the vulnerable version range and first patched version, the affected manifest, and advisory reference links. `alert_number` is the per-repository number shown by the list tool (not a global id). Requires a token with access to security alerts.
| Parameter | Type | Description |
|---|---|---|
alert_number * | integer | |
owner * | string | |
repo * | string |
get_code_scanning_alert
Get a single code-scanning (CodeQL etc.) alert by its number. Where `list_code_scanning_alerts` returns a one-line summary per alert, this returns one alert's full detail: the rule's full description and help URI, the analysis tool and version, and the most recent instance (file path, line range, ref, and the alert message). `alert_number` is the per-repository number shown by the list tool. Requires a token with access to security alerts.
| Parameter | Type | Description |
|---|---|---|
alert_number * | integer | |
owner * | string | |
repo * | string |
get_secret_scanning_alert
Get a single secret-scanning alert by its number. Where `list_secret_scanning_alerts` returns a one-line summary per alert, this returns one alert's full detail: its resolution and resolution comment, whether push protection was bypassed, and the secret's validity. As with the list tool, the raw secret value is never returned. `alert_number` is the per-repository number shown by the list tool. Requires a token with access to security alerts (repo admin / `security_events`).
| Parameter | Type | Description |
|---|---|---|
alert_number * | integer | |
owner * | string | |
repo * | string |
dismiss_dependabot_alert
Dismiss an open Dependabot alert (a write; gated by read-only mode). `reason` must be one of: `fix_started`, `inaccurate`, `no_bandwidth`, `not_used`, `tolerable_risk`. `comment` is an optional free-text note stored with the dismissal. `alert_number` is the per-repository number shown by `list_dependabot_alerts`. Requires a token with write access to Dependabot alerts.
| Parameter | Type | Description |
|---|---|---|
alert_number * | integer | |
owner * | string | |
reason * | string | |
repo * | string | |
comment |
dismiss_code_scanning_alert
Dismiss an open code-scanning alert (a write; gated by read-only mode). `reason` must be one of GitHub's exact values: `false positive`, `won't fix`, `used in tests`. `comment` is an optional note (max 280 characters). `alert_number` is the per-repository number shown by `list_code_scanning_alerts`. Requires a token with write access to code-scanning alerts.
| Parameter | Type | Description |
|---|---|---|
alert_number * | integer | |
owner * | string | |
reason * | string | |
repo * | string | |
comment |
resolve_secret_scanning_alert
Resolve (close) an open secret-scanning alert (a gated write). `resolution` must be one of: `false_positive`, `wont_fix`, `revoked`, `used_in_tests`. `comment` is an optional resolution note. The raw secret is never returned. `alert_number` is the per-repository number shown by `list_secret_scanning_alerts`. Requires a token with write access to secret-scanning alerts.
| Parameter | Type | Description |
|---|---|---|
alert_number * | integer | |
owner * | string | |
repo * | string | |
resolution * | string | |
comment |
list_security_alerts
List Dependabot, code-scanning, and secret-scanning alerts in one call. Returns the three alert lists keyed by type plus a `counts` block. `state` is passed to each endpoint (`open` (default) or `all` are valid for all three); `limit` (max 100) is the per-type cap. If a type can't be read (feature disabled, or the token lacks that permission), it's reported under `errors` instead of failing the whole call. The secret value of secret-scanning alerts is never returned.
| Parameter | Type | Description |
|---|---|---|
owner * | string | |
repo * | string | |
limit | integer | |
state | string |
create_issues_for_alerts
Open a tracking issue for each open security alert (a gated write). For every alert of the requested types (default: all of `dependabot`, `code_scanning`, `secret_scanning`), this opens a GitHub issue titled `[security:<type>#<number>] …` and labeled `security`, unless an issue with that marker already exists. Existing issues are detected among the repo's `security`-labeled issues (open or closed), so re-running is safe and won't create duplicates. `limit` (max 100) caps how many alerts per type are considered. A type that can't be read is reported under `errors`…
| Parameter | Type | Description |
|---|---|---|
owner * | string | |
repo * | string | |
alert_types | ||
limit | integer | |
state | string |
list_secret_scanning_alerts
List secret-scanning alerts for a repository (the Security tab). `state` is `open` (default), `resolved`, or `all`. The raw secret value is never returned — only the type, state, and resolution. Requires a token with access to security alerts (repo admin / `security_events`); GitHub returns 403/404 otherwise. Returns up to `limit` (max 100) alerts. Paginated: returns at most `limit` items from page `page` (1-based). If you get exactly `limit` items there are probably more; request `page=2`, and so on.
| Parameter | Type | Description |
|---|---|---|
owner * | string | |
repo * | string | |
limit | integer | |
page | integer | |
state | string |
list_code_scanning_alerts
List code-scanning (CodeQL etc.) alerts for a repository. `state` is `open` (default), `dismissed`, `fixed`, or `all`. Returns each alert's rule, severity, and tool. Requires a token with access to security alerts. Returns up to `limit` (max 100) alerts. Paginated: returns at most `limit` items from page `page` (1-based). If you get exactly `limit` items there are probably more; request `page=2`, and so on.
| Parameter | Type | Description |
|---|---|---|
owner * | string | |
repo * | string | |
limit | integer | |
page | integer | |
state | string |
list_dependabot_alerts
List Dependabot (vulnerable-dependency) alerts for a repository. `state` is `open` (default), `dismissed`, `fixed`, `auto_dismissed`, or `all`. Returns the affected package, severity, and advisory summary. Requires a token with access to security alerts. Returns up to `limit` (max 100) alerts. Paginated: returns at most `limit` items from page `page` (1-based). If you get exactly `limit` items there are probably more; request `page=2`, and so on.
| Parameter | Type | Description |
|---|---|---|
owner * | string | |
repo * | string | |
limit | integer | |
page | integer | |
state | string |
list_commits
List recent commits on a repository. Optionally narrow to a branch/SHA via `sha` or to commits touching a single file via `path`. Returns up to `limit` (max 50) commits. Paginated: returns at most `limit` items from page `page` (1-based). If you get exactly `limit` items there are probably more; request `page=2`, and so on.
| Parameter | Type | Description |
|---|---|---|
owner * | string | |
repo * | string | |
limit | integer | |
page | integer | |
path | ||
sha |
get_commit
Get a single commit with its stats and changed files. `ref` is a commit SHA, branch, or tag. Returns the commit metadata plus aggregate additions/deletions and a per-file summary (no patch text).
| Parameter | Type | Description |
|---|---|---|
owner * | string | |
ref * | string | |
repo * | string |
compare_commits
Compare two commits, branches, or tags. Returns how `head` relates to `base` (`ahead_by`/`behind_by`), the commits in between, and the files changed. Useful for "what's on this branch that isn't on main" or reviewing a range.
| Parameter | Type | Description |
|---|---|---|
base * | string | |
head * | string | |
owner * | string | |
repo * | string |
get_combined_status
Get the combined commit status for a ref (branch, tag, or SHA). Returns the overall `state` (`success`/`pending`/`failure`) and each individual status context. This covers the legacy "statuses" API; for GitHub Actions checks use `list_check_runs`.
| Parameter | Type | Description |
|---|---|---|
owner * | string | |
ref * | string | |
repo * | string |
list_check_runs
List the check runs for a ref (branch, tag, or SHA). These are the GitHub Actions / app check results for the commit. Use this to inspect CI on any ref without going through a pull request. Returns up to `limit` (max 100) check runs. Paginated: returns at most `limit` items from page `page` (1-based). If you get exactly `limit` items there are probably more; request `page=2`, and so on.
| Parameter | Type | Description |
|---|---|---|
owner * | string | |
ref * | string | |
repo * | string | |
limit | integer | |
page | integer |
list_pending_deployments
List the environments a workflow run is waiting on for approval. For a run parked on an environment protection rule, returns each pending environment with its id, name, wait timer, and whether the current token may approve it. Feed an `environment_id` from here into `review_deployment`.
| Parameter | Type | Description |
|---|---|---|
owner * | string | |
repo * | string | |
run_id * | integer |
review_deployment
Approve or reject pending deployments for a workflow run (a gated write). `state` must be `approved` or `rejected`. `environment_ids` are the ids from `list_pending_deployments`. `comment` is an optional note (GitHub requires a non-empty comment when rejecting). Approving lets a gated job (e.g. a PyPI publish) proceed. Requires a token whose user is a configured reviewer for the environment.
| Parameter | Type | Description |
|---|---|---|
environment_ids * | array | |
owner * | string | |
repo * | string | |
run_id * | integer | |
state * | string | |
comment | string |
get_file_contents
Read a file or list a directory in a repository. `path` is the path within the repo (e.g. `src/app.py`). `ref` is an optional branch, tag, or commit SHA (defaults to the default branch). For a file the decoded text content is returned; for a directory a listing is returned instead.
| Parameter | Type | Description |
|---|---|---|
owner * | string | |
path * | string | |
repo * | string | |
ref |
create_or_update_file
Create a new file or update an existing one (a single commit). `content` is the file's text (UTF-8). `message` is the commit message. `branch` defaults to the repository's default branch. When updating an existing file you must pass its blob `sha`; if you don't, this tool looks it up automatically for the target branch. Disabled in read-only mode; requires a token with write access.
| Parameter | Type | Description |
|---|---|---|
content * | string | |
message * | string | |
owner * | string | |
path * | string | |
repo * | string | |
branch | ||
sha |
delete_file
Delete a file from a repository in a single commit. `message` is the commit message. `branch` defaults to the repository's default branch. Deleting requires the file's current blob `sha`; if you don't pass it, this tool looks it up for the target branch. Disabled in read-only mode; requires write access.
| Parameter | Type | Description |
|---|---|---|
message * | string | |
owner * | string | |
path * | string | |
repo * | string | |
branch | ||
sha |
list_gists
List the authenticated user's gists, most recent first (gh gist list). Paginated: returns at most `limit` items from page `page` (1-based). If you get exactly `limit` items there are probably more; request `page=2`, and so on.
| Parameter | Type | Description |
|---|---|---|
limit | integer | |
page | integer |
get_gist
Get a single gist, including each file's content (gh gist view). Returns the gist's metadata plus a `files` mapping of filename to its text content. Large files may be truncated by GitHub.
| Parameter | Type | Description |
|---|---|---|
gist_id * | string |
create_gist
Create a gist. `files` maps filename -> file content (e.g. `{"notes.md": "# hello"}`). `public=False` (default) creates a secret gist. Disabled in read-only mode; requires write access.
| Parameter | Type | Description |
|---|---|---|
files * | object | |
description | ||
public | boolean |
update_gist
Update a gist's files and/or description (gh gist edit). `files` maps filename to new content; an existing filename overwrites that file, a new filename adds one. (To rename or delete files, use the gist on GitHub.) Disabled in read-only mode; requires write access.
| Parameter | Type | Description |
|---|---|---|
files * | object | |
gist_id * | string | |
description |
delete_gist
Delete one of the authenticated user's gists (a gated write).
| Parameter | Type | Description |
|---|---|---|
gist_id * | string |
list_milestones
List a repository's milestones. `state` is `open`, `closed`, or `all`. Returns up to `limit` (max 100) milestones with their number, title, state, and open/closed issue counts. Paginated: returns at most `limit` items from page `page` (1-based). If you get exactly `limit` items there are probably more; request `page=2`, and so on.
| Parameter | Type | Description |
|---|---|---|
owner * | string | |
repo * | string | |
limit | integer | |
page | integer | |
state | string |
create_milestone
Create a milestone (a write; gated by read-only mode). `title` is required; `due_on` is an ISO-8601 timestamp (e.g. `2026-12-31T00:00:00Z`). Returns the new milestone's number, which you can set on issues via `update_issue`. Requires a token with write access.
| Parameter | Type | Description |
|---|---|---|
owner * | string | |
repo * | string | |
title * | string | |
description | ||
due_on | ||
state | string |
lock_issue
Lock an issue or PR conversation (a write; gated by read-only mode). `lock_reason`, if given, is one of `off-topic`, `too heated`, `resolved`, or `spam`. Locking limits new comments to users with write access. Requires a token with write access.
| Parameter | Type | Description |
|---|---|---|
issue_number * | integer | |
owner * | string | |
repo * | string | |
lock_reason |
unlock_issue
Unlock a previously locked issue or PR (a write; read-only gated).
| Parameter | Type | Description |
|---|---|---|
issue_number * | integer | |
owner * | string | |
repo * | string |
list_pull_request_commits
List the commits that make up a pull request. Returns up to `limit` (max 100) commits in the PR, each with its SHA, message, author, and date. Paginated: returns at most `limit` items from page `page` (1-based). If you get exactly `limit` items there are probably more; request `page=2`, and so on.
| Parameter | Type | Description |
|---|---|---|
owner * | string | |
pull_number * | integer | |
repo * | string | |
limit | integer | |
page | integer |
list_issues
List issues in a repository. `state` is one of `open`, `closed`, or `all`. `labels` is an optional comma-separated list of label names to filter by. Note: GitHub's issues endpoint also returns pull requests; check `is_pull_request` on each item. Paginated: returns at most `limit` items from page `page` (1-based). If you get exactly `limit` items there are probably more; request `page=2`, and so on.
| Parameter | Type | Description |
|---|---|---|
owner * | string | |
repo * | string | |
labels | ||
limit | integer | |
page | integer | |
state | string |
get_issue
Get a single issue including its full body text.
| Parameter | Type | Description |
|---|---|---|
issue_number * | integer | |
owner * | string | |
repo * | string |
create_issue
Create a new issue in a repository. Disabled when the connector runs in read-only mode. Requires a token with write access to the repository.
| Parameter | Type | Description |
|---|---|---|
owner * | string | |
repo * | string | |
title * | string | |
body | ||
labels |
update_issue
Edit an existing issue: change its title, body, labels, or state. Pass `state` as `closed` to close an issue or `open` to reopen it. Only the fields you provide are changed. Disabled in read-only mode; requires a token with write access.
| Parameter | Type | Description |
|---|---|---|
issue_number * | integer | |
owner * | string | |
repo * | string | |
body | ||
labels | ||
state | ||
title |
add_issue_comment
Add a comment to an issue or pull request. Disabled when the connector runs in read-only mode. Requires a token with write access to the repository.
| Parameter | Type | Description |
|---|---|---|
body * | string | |
issue_number * | integer | |
owner * | string | |
repo * | string |
list_issue_comments
List the conversation comments on an issue or pull request. These are the top-level timeline comments (not inline code-review comments — use `list_pull_request_review_comments` for those). Returns up to `limit` (max 100) comments. Paginated: returns at most `limit` items from page `page` (1-based). If you get exactly `limit` items there are probably more; request `page=2`, and so on.
| Parameter | Type | Description |
|---|---|---|
issue_number * | integer | |
owner * | string | |
repo * | string | |
limit | integer | |
page | integer |
add_labels
Add labels to an issue or pull request (existing labels are kept). Disabled in read-only mode; requires write access.
| Parameter | Type | Description |
|---|---|---|
issue_number * | integer | |
labels * | array | |
owner * | string | |
repo * | string |
remove_label
Remove a single label from an issue or pull request. Disabled in read-only mode; requires write access.
| Parameter | Type | Description |
|---|---|---|
issue_number * | integer | |
label * | string | |
owner * | string | |
repo * | string |
add_assignees
Assign users to an issue or pull request. `assignees` is a list of GitHub logins. Disabled in read-only mode; requires write access.
| Parameter | Type | Description |
|---|---|---|
assignees * | array | |
issue_number * | integer | |
owner * | string | |
repo * | string |
list_labels
List the labels defined in a repository (gh label list). Returns each label's name, color (hex, no leading `#`), and description, up to `limit` (max 100). Paginated: returns at most `limit` items from page `page` (1-based). If you get exactly `limit` items there are probably more; request `page=2`, and so on.
| Parameter | Type | Description |
|---|---|---|
owner * | string | |
repo * | string | |
limit | integer | |
page | integer |
create_label
Create a label in a repository (gh label create). `color` is a 6-character hex code without the leading `#` (e.g. `d73a4a`); if omitted GitHub assigns a default. Disabled in read-only mode; requires write access.
| Parameter | Type | Description |
|---|---|---|
name * | string | |
owner * | string | |
repo * | string | |
color | ||
description |
update_label
Edit an existing label (gh label edit). `name` selects the label to change; pass `new_name` to rename it, and/or `color` (6-char hex, leading `#` optional) and `description` to update those. Disabled in read-only mode; requires write access.
| Parameter | Type | Description |
|---|---|---|
name * | string | |
owner * | string | |
repo * | string | |
color | ||
description | ||
new_name |
delete_label
Delete a label from a repository (gh label delete). Removes the label `name` and unsets it from every issue/PR that had it. This cannot be undone. Disabled in read-only mode; requires write access.
| Parameter | Type | Description |
|---|---|---|
name * | string | |
owner * | string | |
repo * | string |
update_issue_comment
Edit an existing issue or PR conversation comment (a gated write). `comment_id` is the numeric id from `list_issue_comments`. Replaces the comment's body.
| Parameter | Type | Description |
|---|---|---|
body * | string | |
comment_id * | integer | |
owner * | string | |
repo * | string |
delete_issue_comment
Delete an issue or PR conversation comment (a gated write).
| Parameter | Type | Description |
|---|---|---|
comment_id * | integer | |
owner * | string | |
repo * | string |
list_notifications
List the authenticated user's notifications across all repositories. By default returns only unread notifications; set `all=True` to include read ones, or `participating=True` to limit to threads you're directly participating in. Each item's `id` is the thread id for `mark_notification_read`. Returns up to `limit` (max 50) notifications. Paginated: returns at most `limit` items from page `page` (1-based). If you get exactly `limit` items there are probably more; request `page=2`, and so on.
| Parameter | Type | Description |
|---|---|---|
all | boolean | |
limit | integer | |
page | integer | |
participating | boolean |
mark_notification_read
Mark a notification thread as read. `thread_id` is the `id` from `list_notifications`. Disabled in read-only mode; requires write access.
| Parameter | Type | Description |
|---|---|---|
thread_id * | string |
mark_all_notifications_read
Mark all of the authenticated user's notifications as read (a gated write). Optionally pass `last_read_at` (ISO 8601) to only mark those read before that time; omit to mark everything read.
| Parameter | Type | Description |
|---|---|---|
last_read_at |
list_pull_requests
List pull requests in a repository. `state` is one of `open`, `closed`, or `all`. Returns up to `limit` (max 50) pull requests. Paginated: returns at most `limit` items from page `page` (1-based). If you get exactly `limit` items there are probably more; request `page=2`, and so on.
| Parameter | Type | Description |
|---|---|---|
owner * | string | |
repo * | string | |
limit | integer | |
page | integer | |
state | string |
get_pull_request
Get a single pull request including its body and merge status.
| Parameter | Type | Description |
|---|---|---|
owner * | string | |
pull_number * | integer | |
repo * | string |
get_pull_request_diff
Get the unified diff for a pull request. The diff is truncated to `max_chars` characters to stay within context limits; `truncated` indicates whether anything was cut off.
| Parameter | Type | Description |
|---|---|---|
owner * | string | |
pull_number * | integer | |
repo * | string | |
max_chars | integer |
list_pull_request_files
List the files changed in a pull request. Returns each file's path, status (added/modified/removed/renamed), and line counts. Returns up to `limit` (max 100) files. Paginated: returns at most `limit` items from page `page` (1-based). If you get exactly `limit` items there are probably more; request `page=2`, and so on.
| Parameter | Type | Description |
|---|---|---|
owner * | string | |
pull_number * | integer | |
repo * | string | |
limit | integer | |
page | integer |
list_pull_request_reviews
List the reviews submitted on a pull request. Returns each review's author, `state` (e.g. `APPROVED`, `CHANGES_REQUESTED`, `COMMENTED`, `DISMISSED`), and body. Returns up to `limit` (max 100) reviews. Paginated: returns at most `limit` items from page `page` (1-based). If you get exactly `limit` items there are probably more; request `page=2`, and so on.
| Parameter | Type | Description |
|---|---|---|
owner * | string | |
pull_number * | integer | |
repo * | string | |
limit | integer | |
page | integer |
list_pull_request_review_comments
List inline code-review comments on a pull request. These are comments anchored to specific files/lines in the diff (each includes `path` and `line`). Returns up to `limit` (max 100) comments. Paginated: returns at most `limit` items from page `page` (1-based). If you get exactly `limit` items there are probably more; request `page=2`, and so on.
| Parameter | Type | Description |
|---|---|---|
owner * | string | |
pull_number * | integer | |
repo * | string | |
limit | integer | |
page | integer |
create_pull_request
Open a new pull request. `head` is the branch with your changes (for a cross-fork PR use `owner:branch`); `base` is the branch you want to merge into (e.g. `main`). Set `draft=True` to open it as a draft. Disabled in read-only mode; requires a token with write access to the repository.
| Parameter | Type | Description |
|---|---|---|
base * | string | |
head * | string | |
owner * | string | |
repo * | string | |
title * | string | |
body | ||
draft | boolean | |
maintainer_can_modify | boolean |
update_pull_request
Edit a pull request: change its title, body, base branch, or state. Pass `state` as `closed` to close or `open` to reopen. `base` retargets the PR onto a different base branch. Only provided fields change. (Note: toggling draft↔ready isn't supported by the REST API.) Disabled in read-only mode; requires write access.
| Parameter | Type | Description |
|---|---|---|
owner * | string | |
pull_number * | integer | |
repo * | string | |
base | ||
body | ||
state | ||
title |
merge_pull_request
Merge a pull request. `merge_method` is one of `merge` (merge commit), `squash`, or `rebase`. `commit_title`/`commit_message` optionally override the merge commit text (ignored for `rebase`). Fails if the PR isn't mergeable (conflicts, failing required checks, or branch protection). Disabled in read-only mode; requires a token with write access.
| Parameter | Type | Description |
|---|---|---|
owner * | string | |
pull_number * | integer | |
repo * | string | |
commit_message | ||
commit_title | ||
merge_method | string |
submit_pull_request_review
Submit a review on a pull request. `event` is `APPROVE`, `REQUEST_CHANGES`, or `COMMENT`. `body` is the review summary text (required by GitHub for `REQUEST_CHANGES` and `COMMENT`). Disabled in read-only mode; requires write access.
| Parameter | Type | Description |
|---|---|---|
event * | string | |
owner * | string | |
pull_number * | integer | |
repo * | string | |
body |
add_pull_request_review_comment
Add an inline review comment on a specific line of a pull request's diff. `commit_id` is the SHA being commented on (typically the PR head), `path` the file, `line` the line number in the file, and `side` is `RIGHT` (the new version, default) or `LEFT` (the old version). Disabled in read-only mode; requires write access.
| Parameter | Type | Description |
|---|---|---|
body * | string | |
commit_id * | string | |
line * | integer | |
owner * | string | |
path * | string | |
pull_number * | integer | |
repo * | string | |
side | string |
request_pull_request_reviewers
Request reviews on a pull request (gh pr edit --add-reviewer). `reviewers` is a list of usernames; `team_reviewers` a list of team slugs. At least one of the two must be provided. Disabled in read-only mode; requires write access.
| Parameter | Type | Description |
|---|---|---|
owner * | string | |
pull_number * | integer | |
repo * | string | |
reviewers | ||
team_reviewers |
update_pull_request_branch
Update a PR's branch with the latest from its base (the "Update branch" button). Merges the base branch into the PR's head so it's no longer behind. Pass `expected_head_sha` to make it a no-op if the head has moved since you checked. This is a gated write; the update runs asynchronously on GitHub.
| Parameter | Type | Description |
|---|---|---|
owner * | string | |
pull_number * | integer | |
repo * | string | |
expected_head_sha |
delete_release
Delete a GitHub release (a write; gated by read-only mode). Identify the release by either `tag` (e.g. `v0.10.0`) or its numeric `release_id`; provide exactly one (`release_id` wins if both are given). This deletes only the release — the underlying git tag is left in place; use `delete_tag` for that, or `delete_release_and_tag` to remove both. Requires a token with write access to the repository.
| Parameter | Type | Description |
|---|---|---|
owner * | string | |
repo * | string | |
release_id | ||
tag |
delete_tag
Delete a git tag (a write; gated by read-only mode). Removes the tag ref `refs/tags/<tag>` (pass just the tag name, e.g. `v0.10.0`). This touches only the git tag — any release associated with it is left in place; use `delete_release` for that, or `delete_release_and_tag` to remove both. Requires a token with write access to the repository.
| Parameter | Type | Description |
|---|---|---|
owner * | string | |
repo * | string | |
tag * | string |
delete_release_and_tag
Delete both a release and its git tag in one call (a gated write). Convenience for fully retiring a tag like `v0.10.0`: it deletes the release published for `tag` (if any) and then the `refs/tags/<tag>` ref. Each step tolerates its target already being absent (a 404 is reported as `*_deleted: false` rather than failing), so it's safe to run for cleanup. Returns which of the two were actually deleted. Requires a token with write access to the repository.
| Parameter | Type | Description |
|---|---|---|
owner * | string | |
repo * | string | |
tag * | string |
update_release
Edit an existing release (a write; gated by read-only mode). Identify the release by either `tag` (e.g. `v1.2.0`) or its numeric `release_id` (`release_id` wins if both are given). Pass only the fields you want to change: `name`, `body`, `draft`, `prerelease`, or `new_tag` to retag it. Requires a token with write access.
| Parameter | Type | Description |
|---|---|---|
owner * | string | |
repo * | string | |
body | ||
draft | ||
name | ||
new_tag | ||
prerelease | ||
release_id | ||
tag |
generate_release_notes
Generate release notes (changelog) for a tag without creating a release. Returns a suggested `name` and Markdown `body` built from the PRs/commits that GitHub would include for `tag_name`. Optionally scope the range with `previous_tag_name` and the target branch/commit with `target_commitish`. Read-only/non-mutating: it computes notes but creates nothing.
| Parameter | Type | Description |
|---|---|---|
owner * | string | |
repo * | string | |
tag_name * | string | |
previous_tag_name | ||
target_commitish |
list_release_assets
List the binary assets attached to a release (by tag, e.g. `v1.2.0`).
| Parameter | Type | Description |
|---|---|---|
owner * | string | |
repo * | string | |
tag * | string |
upload_release_asset
Upload a binary asset to a release (a write; gated by read-only mode). Attaches a file to the release tagged `tag`. `content_base64` is the file's bytes, base64-encoded; `name` is the asset filename and `content_type` its MIME type. Requires a token with write access.
| Parameter | Type | Description |
|---|---|---|
content_base64 * | string | |
name * | string | |
owner * | string | |
repo * | string | |
tag * | string | |
content_type | string | |
label |
list_releases
List releases for a repository, newest first. Returns up to `limit` (max 50) releases with tag, name, draft/prerelease flags, and publish date. Paginated: returns at most `limit` items from page `page` (1-based). If you get exactly `limit` items there are probably more; request `page=2`, and so on.
| Parameter | Type | Description |
|---|---|---|
owner * | string | |
repo * | string | |
limit | integer | |
page | integer |
get_latest_release
Get a repository's latest published release (gh release view --latest). Returns the most recent non-draft, non-prerelease release. Raises a 404 if the repository has no published releases.
| Parameter | Type | Description |
|---|---|---|
owner * | string | |
repo * | string |
get_release_by_tag
Get a release by its tag name (gh release view <tag>). `tag` is the release's tag (e.g. `v1.2.0`). Unlike `get_latest_release`, this finds a specific release even if it's a draft or prerelease. Raises a 404 if no release exists for the tag.
| Parameter | Type | Description |
|---|---|---|
owner * | string | |
repo * | string | |
tag * | string |
create_release
Create a release, creating its git tag if it doesn't already exist. `tag_name` is the tag (e.g. `v1.2.0`). If that tag doesn't exist yet, it's created pointing at `target_commitish` (a branch, tag, or commit SHA; defaults to the repository's default branch). `name` is the release title, `body` its notes. Set `generate_release_notes=True` to have GitHub auto-generate notes from merged PRs (appended to `body` if both are given), `draft=True` to save without publishing, or `prerelease=True` to mark it a pre-release. Publishing a (non-draft) release fires GitHub's…
| Parameter | Type | Description |
|---|---|---|
owner * | string | |
repo * | string | |
tag_name * | string | |
body | ||
draft | boolean | |
generate_release_notes | boolean | |
name | ||
prerelease | boolean | |
target_commitish |
list_tags
List git tags in a repository, with the commit SHA each points at. Paginated: returns at most `limit` items from page `page` (1-based). If you get exactly `limit` items there are probably more; request `page=2`, and so on.
| Parameter | Type | Description |
|---|---|---|
owner * | string | |
repo * | string | |
limit | integer | |
page | integer |
get_tag
Resolve a single tag to its commit (the commit the tag ref points at). `tag` is the tag name (e.g. `v1.2.0`). Works for both lightweight and annotated tags; returns the underlying commit's SHA, message, and author.
| Parameter | Type | Description |
|---|---|---|
owner * | string | |
repo * | string | |
tag * | string |
delete_release_asset
Delete a release asset by its id (a gated write). `asset_id` is from `list_release_assets`.
| Parameter | Type | Description |
|---|---|---|
asset_id * | integer | |
owner * | string | |
repo * | string |
download_release_asset
Get a download link and metadata for a release asset. Returns the asset's name, size, content type, and `browser_download_url`. The binary itself isn't streamed back over MCP — use the URL to fetch it.
| Parameter | Type | Description |
|---|---|---|
asset_id * | integer | |
owner * | string | |
repo * | string |
list_repository_collaborators
List a repository's collaborators with their permission level. Returns up to `limit` (max 100) collaborators. Requires push (or higher) access to the repository. Paginated: returns at most `limit` items from page `page` (1-based). If you get exactly `limit` items there are probably more; request `page=2`, and so on.
| Parameter | Type | Description |
|---|---|---|
owner * | string | |
repo * | string | |
limit | integer | |
page | integer |
list_repository_languages
Get the language breakdown of a repository (bytes of code per language).
| Parameter | Type | Description |
|---|---|---|
owner * | string | |
repo * | string |
get_repository_topics
List the topics (tags) set on a repository.
| Parameter | Type | Description |
|---|---|---|
owner * | string | |
repo * | string |
replace_repository_topics
Replace a repository's topics with `topics` (a write; read-only gated). This sets the full topic list (it doesn't append) — pass every topic you want to keep. Topic names are lowercase, may include hyphens, and there's a limit of 20. Requires a token with write access.
| Parameter | Type | Description |
|---|---|---|
owner * | string | |
repo * | string | |
topics * | array |
update_repository
Update a repository's settings (a write; gated by read-only mode). Pass only the fields you want to change: `name` (rename), `description`, `homepage`, `private`, `default_branch`, or `archived`. Requires a token with admin access to the repository.
| Parameter | Type | Description |
|---|---|---|
owner * | string | |
repo * | string | |
archived | ||
default_branch | ||
description | ||
homepage | ||
name | ||
private |
create_commit_status
Set a commit status on a SHA (a write; gated by read-only mode). `state` is one of `error`, `failure`, `pending`, or `success`. `context` is the status label (e.g. `ci/my-check`); `target_url` links to details and `description` is a short summary. Lets the connector report check-style results. Requires a token with write access.
| Parameter | Type | Description |
|---|---|---|
owner * | string | |
repo * | string | |
sha * | string | |
state * | string | |
context | string | |
description | ||
target_url |
get_repository
Get metadata for a single repository (description, default branch, stars, etc.).
| Parameter | Type | Description |
|---|---|---|
owner * | string | |
repo * | string |
list_my_repositories
List repositories the authenticated user has access to. `affiliation` is a comma-separated subset of `owner`, `collaborator`, `organization_member`. `sort` is one of `created`, `updated`, `pushed`, `full_name`. Returns up to `limit` (max 100) repositories. Use this to discover repos the token can reach without knowing their names. Paginated: returns at most `limit` items from page `page` (1-based). If you get exactly `limit` items there are probably more; request `page=2`, and so on.
| Parameter | Type | Description |
|---|---|---|
affiliation | string | |
limit | integer | |
page | integer | |
sort | string |
get_repository_tree
Get the file tree of a repository at a ref. `ref` is a branch, tag, or commit SHA (defaults to the repository's default branch). With `recursive=True` (default) the entire tree is returned in one call — useful for grasping repo layout. `truncated` is True if GitHub capped the response (very large repos).
| Parameter | Type | Description |
|---|---|---|
owner * | string | |
repo * | string | |
recursive | boolean | |
ref |
list_branches
List branches in a repository, with the head commit SHA for each. Paginated: returns at most `limit` items from page `page` (1-based). If you get exactly `limit` items there are probably more; request `page=2`, and so on.
| Parameter | Type | Description |
|---|---|---|
owner * | string | |
repo * | string | |
limit | integer | |
page | integer |
create_branch
Create a new branch in a repository. The branch starts at `from_ref` (a branch, tag, or commit SHA); if omitted, it starts at the repository's default branch. Disabled in read-only mode; requires a token with write access.
| Parameter | Type | Description |
|---|---|---|
branch * | string | |
owner * | string | |
repo * | string | |
from_ref |
delete_branch
Delete a branch from a repository. `branch` is the branch name (e.g. `feature-x`, not `refs/heads/feature-x`). This permanently removes the ref; it cannot delete the repository's default branch (GitHub rejects that). Disabled in read-only mode; requires a token with write access.
| Parameter | Type | Description |
|---|---|---|
branch * | string | |
owner * | string | |
repo * | string |
create_repository
Create a new repository (gh repo create). Creates the repo under the authenticated user, or under `org` if given. Set `auto_init=True` to seed an initial commit with a README (so the repo has a default branch you can push to immediately). Disabled in read-only mode; requires a token with the `repo` scope.
| Parameter | Type | Description |
|---|---|---|
name * | string | |
auto_init | boolean | |
description | ||
homepage | ||
org | ||
private | boolean |
fork_repository
Fork a repository to your account or an organization (gh repo fork). Forks `owner/repo` into the authenticated account, or into `organization` if given. Set `default_branch_only=True` to fork just the default branch. The fork is created asynchronously by GitHub, so it may take a moment to become fully available. Disabled in read-only mode; requires write access.
| Parameter | Type | Description |
|---|---|---|
owner * | string | |
repo * | string | |
default_branch_only | boolean | |
organization |
find_reusable_repositories
Find repositories you could reuse for something you're building. Searches every repository the token can see — public repos **and** the private/org repos your token has access to — ranked by stars. Set `public_only=True` to restrict to public results. Archived repos are excluded unless `include_archived=True`. Returns the fields that matter when deciding whether to adopt a project: description, stars, language, **license**, topics, and last-pushed date (to spot abandoned projects). The exact search string is returned as `query` so you can see and refine it.…
| Parameter | Type | Description |
|---|---|---|
query * | string | |
include_archived | boolean | |
language | ||
limit | integer | |
min_stars | integer | |
page | integer | |
public_only | boolean | |
topic |
add_repository_collaborator
Add (or invite) a collaborator to a repository (a gated write). `permission` is one of `pull`, `triage`, `push` (default), `maintain`, `admin`. For an outside user this creates an invitation they must accept; for an existing collaborator it updates their permission. Requires admin access.
| Parameter | Type | Description |
|---|---|---|
owner * | string | |
repo * | string | |
username * | string | |
permission | string |
remove_repository_collaborator
Remove a collaborator from a repository (a gated write). Also cancels a pending invitation for that user. Requires admin access.
| Parameter | Type | Description |
|---|---|---|
owner * | string | |
repo * | string | |
username * | string |
get_branch_protection
Get a branch's protection settings. Returns a summary (required status checks, enforce-admins, required review count). If the branch isn't protected, returns `{"protected": false}` instead of erroring. Requires admin access to read protection.
| Parameter | Type | Description |
|---|---|---|
branch * | string | |
owner * | string | |
repo * | string |
update_branch_protection
Set a branch's protection rules (a gated write). Pass `required_status_check_contexts` (e.g. `["CI"]`) to require those checks (with `strict` requiring the branch be up to date); omit to disable that rule. Pass `required_approving_review_count` to require that many PR approvals; omit to disable required reviews. `enforce_admins` applies the rules to admins too. Requires admin access. (Overwrites existing protection with exactly what you specify.)
| Parameter | Type | Description |
|---|---|---|
branch * | string | |
owner * | string | |
repo * | string | |
enforce_admins | boolean | |
require_code_owner_reviews | boolean | |
required_approving_review_count | ||
required_status_check_contexts | ||
strict | boolean |
merge_branch
Merge one branch into another without a pull request (a gated write). Merges `head` (a branch name or SHA) into the `base` branch, creating a merge commit. Returns the new commit, or `{"merged": false}` if `base` is already up to date. A merge conflict surfaces as a 409 error.
| Parameter | Type | Description |
|---|---|---|
base * | string | |
head * | string | |
owner * | string | |
repo * | string | |
commit_message |
search_repositories
Search GitHub for repositories matching a query. `query` accepts GitHub search syntax, e.g. `language:python topic:mcp` or `org:anthropics stars:>100`. Returns up to `limit` (max 50) repositories. Paginated: returns at most `limit` items from page `page` (1-based). If you get exactly `limit` items there are probably more; request `page=2`, and so on.
| Parameter | Type | Description |
|---|---|---|
query * | string | |
limit | integer | |
page | integer |
search_issues
Search issues and pull requests across GitHub using search qualifiers. Example queries: `repo:octocat/hello-world is:open label:bug`, `is:pr author:octocat is:merged`. Returns up to `limit` (max 50) results. Paginated: returns at most `limit` items from page `page` (1-based). If you get exactly `limit` items there are probably more; request `page=2`, and so on.
| Parameter | Type | Description |
|---|---|---|
query * | string | |
limit | integer | |
page | integer |
search_code
Search for code across GitHub. Example: `addClass in:file language:js repo:jquery/jquery`. A `repo:`, `org:`, or `user:` qualifier is usually required by GitHub's code search. Returns up to `limit` (max 50) matching files. Paginated: returns at most `limit` items from page `page` (1-based). If you get exactly `limit` items there are probably more; request `page=2`, and so on.
| Parameter | Type | Description |
|---|---|---|
query * | string | |
limit | integer | |
page | integer |
search_pull_requests
Search pull requests across GitHub (gh search prs). Wraps GitHub's issue search with an `is:pr` qualifier added automatically, so `query` only needs the PR-specific parts, e.g. `repo:octocat/hello-world is:open review:required` or `author:octocat is:merged`. Returns up to `limit` (max 50) pull requests. Paginated: returns at most `limit` items from page `page` (1-based). If you get exactly `limit` items there are probably more; request `page=2`, and so on.
| Parameter | Type | Description |
|---|---|---|
query * | string | |
limit | integer | |
page | integer |
search_commits
Search commits across GitHub (gh search commits). Example queries: `repo:octocat/hello-world fix bug`, `author:octocat merge`, `org:anthropics committer-date:>2024-01-01`. Returns up to `limit` (max 50) commits. Paginated: returns at most `limit` items from page `page` (1-based). If you get exactly `limit` items there are probably more; request `page=2`, and so on.
| Parameter | Type | Description |
|---|---|---|
query * | string | |
limit | integer | |
page | integer |
search_users
Search for users and organizations on GitHub (gh search users). Example queries: `octocat`, `location:berlin language:python`, `type:org anthropic`. Returns up to `limit` (max 50) accounts. Paginated: returns at most `limit` items from page `page` (1-based). If you get exactly `limit` items there are probably more; request `page=2`, and so on.
| Parameter | Type | Description |
|---|---|---|
query * | string | |
limit | integer | |
page | integer |