mcp-github
v0.11.0MCP server for using the GitHub API
These tools were reported by the server itself during our smoke test (tools/list), not copied from the README.
create_or_update_file
Create or update a single file in a GitHub repository
| Parameter | Type | Description |
|---|---|---|
branch * | string | Branch to create/update the file in |
content * | string | Content of the file |
message * | string | Commit message |
owner * | string | Repository owner (username or organization) |
path * | string | Path where to create/update the file |
repo * | string | Repository name |
sha | string | SHA of the file being replaced (required when updating existing files) |
search_repositories
Search for GitHub repositories
| Parameter | Type | Description |
|---|---|---|
query * | string | Search query (see GitHub search syntax) |
page | number | Page number for pagination (default: 1) |
perPage | number | Number of results per page (default: 30, max: 100) |
create_repository
Create a new GitHub repository in your account
| Parameter | Type | Description |
|---|---|---|
name * | string | Repository name |
autoInit | boolean | Initialize with README.md |
description | string | Repository description |
private | boolean | Whether the repository should be private |
get_file_contents
Get the contents of a file or directory from a GitHub repository
| Parameter | Type | Description |
|---|---|---|
owner * | string | Repository owner (username or organization) |
path * | string | Path to the file or directory |
repo * | string | Repository name |
branch | string | Branch to get contents from |
encoded | boolean | Whether to return the content encoded in base64 (default = true) |
push_files
Push multiple files to a GitHub repository in a single commit
| Parameter | Type | Description |
|---|---|---|
branch * | string | Branch to push to (e.g., 'main' or 'master') |
files * | array | Array of files to push |
message * | string | Commit message |
owner * | string | Repository owner (username or organization) |
repo * | string | Repository name |
create_issue
Create a new issue in a GitHub repository
| Parameter | Type | Description |
|---|---|---|
owner * | string | |
repo * | string | |
title * | string | |
assignees | array | |
body | string | |
labels | array | |
milestone | number |
create_pull_request
Create a new pull request in a GitHub repository
| Parameter | Type | Description |
|---|---|---|
base * | string | The name of the branch you want the changes pulled into |
head * | string | The name of the branch where your changes are implemented |
owner * | string | Repository owner (username or organization) |
repo * | string | Repository name |
title * | string | Pull request title |
body | string | Pull request body/description |
draft | boolean | Whether to create the pull request as a draft |
maintainer_can_modify | boolean | Whether maintainers can modify the pull request |
fork_repository
Fork a GitHub repository to your account or specified organization
| Parameter | Type | Description |
|---|---|---|
owner * | string | Repository owner (username or organization) |
repo * | string | Repository name |
organization | string | Optional: organization to fork to (defaults to your personal account) |
create_branch
Create a new branch in a GitHub repository
| Parameter | Type | Description |
|---|---|---|
branch * | string | Name for the new branch |
owner * | string | Repository owner (username or organization) |
repo * | string | Repository name |
from_branch | string | Optional: source branch to create from (defaults to the repository's default branch) |
list_commits
Get list of commits of a branch in a GitHub repository
| Parameter | Type | Description |
|---|---|---|
owner * | string | |
repo * | string | |
page | number | |
perPage | number | |
sha | string |
list_issues
List issues in a GitHub repository with filtering options
| Parameter | Type | Description |
|---|---|---|
owner * | string | |
repo * | string | |
direction | string | |
labels | array | |
page | number | |
per_page | number | |
since | string | |
sort | string | |
state | string |
update_issue
Update an existing issue in a GitHub repository
| Parameter | Type | Description |
|---|---|---|
issue_number * | number | |
owner * | string | |
repo * | string | |
assignees | array | |
body | string | |
labels | array | |
milestone | number | |
state | string | |
title | string |
add_issue_comment
Add a comment to an existing issue
| Parameter | Type | Description |
|---|---|---|
body * | string | |
issue_number * | number | |
owner * | string | |
repo * | string |
search_code
Search for code across GitHub repositories
| Parameter | Type | Description |
|---|---|---|
q * | string | |
order | string | |
page | number | |
per_page | number |
search_issues
Search for issues and pull requests across GitHub repositories
| Parameter | Type | Description |
|---|---|---|
q * | string | |
order | string | |
page | number | |
per_page | number | |
sort | string |
search_users
Search for users on GitHub
| Parameter | Type | Description |
|---|---|---|
q * | string | |
order | string | |
page | number | |
per_page | number | |
sort | string |
get_issue
Get details of a specific issue in a GitHub repository.
| Parameter | Type | Description |
|---|---|---|
issue_number * | number | |
owner * | string | |
repo * | string |
create_release
Create a new release in a GitHub repository
| Parameter | Type | Description |
|---|---|---|
owner * | string | Repository owner (username or organization) |
repo * | string | Repository name |
tag_name * | string | The name of the tag |
body | string | Text describing the release |
draft | boolean | true to create a draft (unpublished) release, false to create a published one |
generate_release_notes | boolean | Whether to automatically generate the name and body for this release |
name | string | The name of the release |
prerelease | boolean | true to identify the release as a prerelease, false to identify it as a full release |
target_commitish | string | Specifies the commitish value that determines where the Git tag is created from |
list_releases
List releases for a GitHub repository
| Parameter | Type | Description |
|---|---|---|
owner * | string | Repository owner (username or organization) |
repo * | string | Repository name |
page | number | Page number of the results |
per_page | number | Results per page (max 100) |
delete_release
Delete a release from a GitHub repository
| Parameter | Type | Description |
|---|---|---|
owner * | string | Repository owner (username or organization) |
release_id * | number | The ID of the release |
repo * | string | Repository name |
get_release_asset
Get a release asset from a GitHub repository
| Parameter | Type | Description |
|---|---|---|
asset_id * | number | The ID of the asset |
owner * | string | Repository owner (username or organization) |
repo * | string | Repository name |
upload_release_asset
Upload an asset to a GitHub release
| Parameter | Type | Description |
|---|---|---|
content * | string | The content of the asset (base64 encoded) |
content_type * | string | The content type of the asset |
name * | string | The name of the asset |
owner * | string | Repository owner (username or organization) |
release_id * | number | The ID of the release |
repo * | string | Repository name |
label | string | An alternate short description of the asset |
create_tag
Create a new tag in a GitHub repository
| Parameter | Type | Description |
|---|---|---|
owner * | string | Repository owner (username or organization) |
ref * | string | The name of the fully qualified reference (e.g., refs/tags/v1.0.0) |
repo * | string | Repository name |
sha * | string | The SHA1 value to set this reference to |
create_pull_request_review
Create a review for a pull request
| Parameter | Type | Description |
|---|---|---|
body * | string | The body text of the review |
event * | string | The review action to perform |
owner * | string | Repository owner (username or organization) |
pull_number * | number | Pull request number |
repo * | string | Repository name |
comments | array | Comments to post as part of the review |
commit_id | string | The SHA of the commit that needs a review |
submit_pull_request_review
Submit a pull request review (approve, request changes, or comment)
| Parameter | Type | Description |
|---|---|---|
event * | string | The review action to perform |
owner * | string | Repository owner (username or organization) |
pull_number * | number | Pull request number |
repo * | string | Repository name |
review_id * | number | The ID of the review |
body | string | The body text of the review submission |
dismiss_pull_request_review
Dismiss a pull request review
| Parameter | Type | Description |
|---|---|---|
message * | string | The message explaining why the review was dismissed |
owner * | string | Repository owner (username or organization) |
pull_number * | number | Pull request number |
repo * | string | Repository name |
review_id * | number | The ID of the review |
create_commit_status
Create a status for a commit (build passed/failed, etc.)
| Parameter | Type | Description |
|---|---|---|
owner * | string | Repository owner (username or organization) |
repo * | string | Repository name |
sha * | string | The SHA of the commit to create a status for |
state * | string | The state of the status |
context | string | A string label to differentiate this status from others |
description | string | A short description of the status |
target_url | string | The target URL to associate with this status |
get_commit_statuses
Get statuses for a commit
| Parameter | Type | Description |
|---|---|---|
owner * | string | Repository owner (username or organization) |
ref * | string | The ref (SHA, branch name, or tag name) to get statuses for |
repo * | string | Repository name |
get_combined_status
Get the combined status for a commit
| Parameter | Type | Description |
|---|---|---|
owner * | string | Repository owner (username or organization) |
ref * | string | The ref (SHA, branch name, or tag name) to get the combined status for |
repo * | string | Repository name |
get_rate_limit
Check the current rate limit status
create_gist
Create a new gist
| Parameter | Type | Description |
|---|---|---|
files * | object | Files that make up this gist. The key is the filename. |
public * | boolean | Whether the gist is public |
description | string | Description of the gist |
list_gists
List gists for the authenticated user
| Parameter | Type | Description |
|---|---|---|
page | number | Page number of the results |
per_page | number | Results per page (max 100) |
since | string | Only gists updated at or after this time are returned |
get_gist
Get a specific gist
| Parameter | Type | Description |
|---|---|---|
gist_id * | string | The ID of the gist |
list_projects
List projects for a repository
| Parameter | Type | Description |
|---|---|---|
owner * | string | Repository owner (username or organization) |
repo * | string | Repository name |
page | number | Page number of the results |
per_page | number | Results per page (max 100) |
state | string | Filter projects by state |
create_project
Create a new project for a repository
| Parameter | Type | Description |
|---|---|---|
name * | string | The name of the project |
owner * | string | Repository owner (username or organization) |
repo * | string | Repository name |
body | string | The description of the project |
list_project_columns
List columns for a project
| Parameter | Type | Description |
|---|---|---|
project_id * | number | The ID of the project |
page | number | Page number of the results |
per_page | number | Results per page (max 100) |
create_project_column
Create a new column for a project
| Parameter | Type | Description |
|---|---|---|
name * | string | The name of the column |
project_id * | number | The ID of the project |
create_project_card
Create a new card in a project column
| Parameter | Type | Description |
|---|---|---|
column_id * | number | The ID of the column |
note * | string | The note content for the card |
list_org_packages
List packages for an organization
| Parameter | Type | Description |
|---|---|---|
org * | string | Organization name |
package_type * | string | The type of package to filter for |
page | number | Page number of the results |
per_page | number | Results per page (max 100, default 30) |
visibility | string | The visibility to filter for |
list_user_packages
List packages for a user
| Parameter | Type | Description |
|---|---|---|
username * | string | Username |
package_type | string | The type of package to filter for |
page | number | Page number of the results |
per_page | number | Results per page (max 100) |
visibility | string | The visibility to filter for |
list_repo_packages
List packages for a repository
| Parameter | Type | Description |
|---|---|---|
owner * | string | Repository owner (username or organization) |
repo * | string | Repository name |
package_type | string | The type of package to filter for |
page | number | Page number of the results |
per_page | number | Results per page (max 100) |
get_org_package
Get a package for an organization
| Parameter | Type | Description |
|---|---|---|
org * | string | Organization name |
package_name * | string | The name of the package |
package_type * | string | The type of package |
get_user_package
Get a package for a user
| Parameter | Type | Description |
|---|---|---|
package_name * | string | The name of the package |
package_type * | string | The type of package |
username * | string | Username |
get_repo_package
Get a package for a repository
| Parameter | Type | Description |
|---|---|---|
owner * | string | Repository owner (username or organization) |
package_name * | string | The name of the package |
package_type * | string | The type of package |
repo * | string | Repository name |
list_repository_webhooks
List webhooks for a repository
| Parameter | Type | Description |
|---|---|---|
owner * | string | Repository owner (username or organization) |
repo * | string | Repository name |
page | number | Page number for pagination |
per_page | number | Number of results per page (max 100) |
get_repository_webhook
Get a specific webhook for a repository
| Parameter | Type | Description |
|---|---|---|
hook_id * | number | Webhook identifier |
owner * | string | Repository owner (username or organization) |
repo * | string | Repository name |
create_repository_webhook
Create a webhook for a repository
| Parameter | Type | Description |
|---|---|---|
config * | object | |
events * | array | Events that should trigger this webhook; use ["*"] for all events |
owner * | string | Repository owner (username or organization) |
repo * | string | Repository name |
active | boolean | Whether the webhook is active |
update_repository_webhook
Update a webhook for a repository
| Parameter | Type | Description |
|---|---|---|
hook_id * | number | Webhook identifier |
owner * | string | Repository owner (username or organization) |
repo * | string | Repository name |
active | boolean | Whether the webhook is active |
add_events | array | Append event subscriptions without replacing existing ones |
config | object | |
events | array | Replace the webhook event subscriptions |
remove_events | array | Remove specific event subscriptions |
delete_repository_webhook
Delete a webhook from a repository
| Parameter | Type | Description |
|---|---|---|
hook_id * | number | Webhook identifier |
owner * | string | Repository owner (username or organization) |
repo * | string | Repository name |
get_repository_webhook_config
Get webhook config for a repository webhook
| Parameter | Type | Description |
|---|---|---|
hook_id * | number | Webhook identifier |
owner * | string | Repository owner (username or organization) |
repo * | string | Repository name |
update_repository_webhook_config
Update webhook config for a repository webhook
| Parameter | Type | Description |
|---|---|---|
hook_id * | number | Webhook identifier |
owner * | string | Repository owner (username or organization) |
repo * | string | Repository name |
content_type | string | The media type used to serialize the payloads |
insecure_ssl | string | number | Set to 1 to disable SSL verification; 0 keeps verification enabled |
secret | string | The secret used to sign webhook deliveries |
url | string | The URL to which the payloads will be delivered |
ping_repository_webhook
Ping a repository webhook
| Parameter | Type | Description |
|---|---|---|
hook_id * | number | Webhook identifier |
owner * | string | Repository owner (username or organization) |
repo * | string | Repository name |
list_repository_webhook_deliveries
List deliveries for a repository webhook
| Parameter | Type | Description |
|---|---|---|
hook_id * | number | Webhook identifier |
owner * | string | Repository owner (username or organization) |
repo * | string | Repository name |
cursor | string | Cursor for delivery pagination |
per_page | number | Number of results per page (max 100) |
status | string | Filter deliveries by outcome classification |
get_repository_webhook_delivery
Get a delivery for a repository webhook
| Parameter | Type | Description |
|---|---|---|
delivery_id * | number | Webhook delivery identifier |
hook_id * | number | Webhook identifier |
owner * | string | Repository owner (username or organization) |
repo * | string | Repository name |
redeliver_repository_webhook_delivery
Redeliver a repository webhook delivery
| Parameter | Type | Description |
|---|---|---|
delivery_id * | number | Webhook delivery identifier |
hook_id * | number | Webhook identifier |
owner * | string | Repository owner (username or organization) |
repo * | string | Repository name |
list_organization_webhooks
List webhooks for an organization
| Parameter | Type | Description |
|---|---|---|
org * | string | Organization name |
page | number | Page number for pagination |
per_page | number | Number of results per page (max 100) |
get_organization_webhook
Get a specific webhook for an organization
| Parameter | Type | Description |
|---|---|---|
hook_id * | number | Webhook identifier |
org * | string | Organization name |
create_organization_webhook
Create a webhook for an organization
| Parameter | Type | Description |
|---|---|---|
config * | object | |
events * | array | Events that should trigger this webhook; use ["*"] for all events |
org * | string | Organization name |
active | boolean | Whether the webhook is active |
update_organization_webhook
Update a webhook for an organization
| Parameter | Type | Description |
|---|---|---|
hook_id * | number | Webhook identifier |
org * | string | Organization name |
active | boolean | Whether the webhook is active |
config | object | |
events | array | Replace the webhook event subscriptions |
delete_organization_webhook
Delete a webhook from an organization
| Parameter | Type | Description |
|---|---|---|
hook_id * | number | Webhook identifier |
org * | string | Organization name |
get_organization_webhook_config
Get webhook config for an organization webhook
| Parameter | Type | Description |
|---|---|---|
hook_id * | number | Webhook identifier |
org * | string | Organization name |
update_organization_webhook_config
Update webhook config for an organization webhook
| Parameter | Type | Description |
|---|---|---|
hook_id * | number | Webhook identifier |
org * | string | Organization name |
content_type | string | The media type used to serialize the payloads |
insecure_ssl | string | number | Set to 1 to disable SSL verification; 0 keeps verification enabled |
password | string | Optional password for basic authentication |
secret | string | The secret used to sign webhook deliveries |
url | string | The URL to which the payloads will be delivered |
username | string | Optional username for basic authentication |
ping_organization_webhook
Ping an organization webhook
| Parameter | Type | Description |
|---|---|---|
hook_id * | number | Webhook identifier |
org * | string | Organization name |
list_organization_webhook_deliveries
List deliveries for an organization webhook
| Parameter | Type | Description |
|---|---|---|
hook_id * | number | Webhook identifier |
org * | string | Organization name |
cursor | string | Cursor for delivery pagination |
per_page | number | Number of results per page (max 100) |
status | string | Filter deliveries by outcome classification |
get_organization_webhook_delivery
Get a delivery for an organization webhook
| Parameter | Type | Description |
|---|---|---|
delivery_id * | number | Webhook delivery identifier |
hook_id * | number | Webhook identifier |
org * | string | Organization name |
redeliver_organization_webhook_delivery
Redeliver an organization webhook delivery
| Parameter | Type | Description |
|---|---|---|
delivery_id * | number | Webhook delivery identifier |
hook_id * | number | Webhook identifier |
org * | string | Organization name |
get_pull_request_diff
Get the diff for a pull request
| Parameter | Type | Description |
|---|---|---|
owner * | string | Repository owner (username or organization) |
pull_number * | number | Pull request number |
repo * | string | Repository name |
get_pull_request
Get a single pull request by number
| Parameter | Type | Description |
|---|---|---|
owner * | string | Repository owner (username or organization) |
pull_number * | number | Pull request number |
repo * | string | Repository name |
list_pull_requests
List pull requests in a repository with filtering options
| Parameter | Type | Description |
|---|---|---|
owner * | string | Repository owner (username or organization) |
repo * | string | Repository name |
base | string | Filter by base branch name |
direction | string | The direction of the sort |
head | string | Filter by head user or head organization and branch name |
page | integer | Page number of the results |
per_page | integer | Results per page (max 100) |
sort | string | What to sort results by |
state | string | State of the pull requests to return |
get_pull_request_files
List files changed in a pull request
| Parameter | Type | Description |
|---|---|---|
owner * | string | Repository owner (username or organization) |
pull_number * | number | Pull request number |
repo * | string | Repository name |
page | integer | Page number of the results |
per_page | integer | Results per page (max 100) |
get_pull_request_comments
List pull request review comments (inline comments on the diff). For general PR conversation comments, use list_issue_comments with the PR number.
| Parameter | Type | Description |
|---|---|---|
owner * | string | Repository owner (username or organization) |
pull_number * | number | Pull request number |
repo * | string | Repository name |
direction | string | Sort direction. Defaults to asc when sort=created, desc otherwise |
page | integer | Page number of the results |
per_page | integer | Results per page (max 100) |
since | string | Only show comments updated at or after this time (ISO 8601, e.g., 2024-01-01T00:00:00Z) |
sort | string | Sort comments by created or updated time |
get_pull_request_reviews
List reviews on a pull request (each review may contain multiple inline comments — use get_pull_request_review_comments to fetch them).
| Parameter | Type | Description |
|---|---|---|
owner * | string | Repository owner (username or organization) |
pull_number * | number | Pull request number |
repo * | string | Repository name |
page | integer | Page number of the results |
per_page | integer | Results per page (max 100) |
get_pull_request_review_comments
List comments attached to a specific pull request review
| Parameter | Type | Description |
|---|---|---|
owner * | string | Repository owner (username or organization) |
pull_number * | number | Pull request number |
repo * | string | Repository name |
review_id * | number | The unique identifier of the pull request review |
page | integer | Page number of the results |
per_page | integer | Results per page (max 100) |
list_issue_comments
List comments on an issue or pull request conversation (general comments, not inline diff review comments). Pass a PR number as issue_number to fetch conversation-tab comments on a PR.
| Parameter | Type | Description |
|---|---|---|
issue_number * | number | Issue or pull request number (PRs are also issues in the GitHub API) |
owner * | string | Repository owner (username or organization) |
repo * | string | Repository name |
page | integer | Page number of the results |
per_page | integer | Results per page (max 100) |
since | string | Only show comments updated at or after this time (ISO 8601, e.g., 2024-01-01T00:00:00Z) |