GitHub (Archived) MCP Server
Tools for interacting with the GitHub API, enabling file operations, repository management, search functionality, and more.
What is an MCP Server?
MCP Info
Image Building Info
Available Tools (26)
| Tools provided by this Server | Short Description |
|---|
add_issue_comment | Add a comment to an existing issue |
create_branch | Create a new branch in a GitHub repository |
create_issue | Create a new issue in a GitHub repository |
create_or_update_file | Create or update a single file in a GitHub repository |
create_pull_request | Create a new pull request in a GitHub repository |
create_pull_request_review | Create a review on a pull request |
create_repository | Create a new GitHub repository in your account |
fork_repository | Fork a GitHub repository to your account or specified organization |
get_file_contents | Get the contents of a file or directory from a GitHub repository |
get_issue | Get details of a specific issue in a GitHub repository. |
get_pull_request | Get details of a specific pull request |
get_pull_request_comments | Get the review comments on a pull request |
get_pull_request_files | Get the list of files changed in a pull request |
get_pull_request_reviews | Get the reviews on a pull request |
get_pull_request_status | Get the combined status of all status checks for a pull request |
list_commits | Get list of commits of a branch in a GitHub repository |
list_issues | List issues in a GitHub repository with filtering options |
list_pull_requests | List and filter repository pull requests |
merge_pull_request | Merge a pull request |
push_files | Push multiple files to a GitHub repository in a single commit |
search_code | Search for code across GitHub repositories |
search_issues | Search for issues and pull requests across GitHub repositories |
search_repositories | Search for GitHub repositories |
search_users | Search for users on GitHub |
update_issue | Update an existing issue in a GitHub repository |
update_pull_request_branch | Update a pull request branch with the latest changes from the base branch |
Tools Details
Tool: add_issue_comment
Add a comment to an existing issue
| Parameters | Type | Description |
|---|
body | string | |
issue_number | number | |
owner | string | |
repo | string | |
Tool: create_branch
Create a new branch in a GitHub repository
| Parameters | Type | Description |
|---|
branch | string | Name for the new branch |
owner | string | Repository owner (username or organization) |
repo | string | Repository name |
from_branch | stringoptional | Optional: source branch to create from (defaults to the repository's default branch) |
Tool: create_issue
Create a new issue in a GitHub repository
| Parameters | Type | Description |
|---|
owner | string | |
repo | string | |
title | string | |
assignees | arrayoptional | |
body | stringoptional | |
labels | arrayoptional | |
milestone | numberoptional | |
Tool: create_or_update_file
Create or update a single file in a GitHub repository
| Parameters | Type | Description |
|---|
branch | string | Branch to create/update the file in |
content | string | Content of the file |
message | string | Commit message |
owner | string | Repository owner (username or organization) |
path | string | Path where to create/update the file |
repo | string | Repository name |
sha | stringoptional | SHA of the file being replaced (required when updating existing files) |
Tool: create_pull_request
Create a new pull request in a GitHub repository
| Parameters | 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 | stringoptional | Pull request body/description |
draft | booleanoptional | Whether to create the pull request as a draft |
maintainer_can_modify | booleanoptional | Whether maintainers can modify the pull request |
Tool: create_pull_request_review
Create a review on a pull request
| Parameters | 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 | arrayoptional | Comments to post as part of the review (specify either position or line, not both) |
commit_id | stringoptional | The SHA of the commit that needs a review |
Tool: create_repository
Create a new GitHub repository in your account
| Parameters | Type | Description |
|---|
name | string | Repository name |
autoInit | booleanoptional | Initialize with README.md |
description | stringoptional | Repository description |
private | booleanoptional | Whether the repository should be private |
Tool: fork_repository
Fork a GitHub repository to your account or specified organization
| Parameters | Type | Description |
|---|
owner | string | Repository owner (username or organization) |
repo | string | Repository name |
organization | stringoptional | Optional: organization to fork to (defaults to your personal account) |
Tool: get_file_contents
Get the contents of a file or directory from a GitHub repository
| Parameters | Type | Description |
|---|
owner | string | Repository owner (username or organization) |
path | string | Path to the file or directory |
repo | string | Repository name |
branch | stringoptional | Branch to get contents from |
Tool: get_issue
Get details of a specific issue in a GitHub repository.
| Parameters | Type | Description |
|---|
issue_number | number | |
owner | string | |
repo | string | |
Tool: get_pull_request
Get details of a specific pull request
| Parameters | Type | Description |
|---|
owner | string | Repository owner (username or organization) |
pull_number | number | Pull request number |
repo | string | Repository name |
Tool: get_pull_request_comments
Get the review comments on a pull request
| Parameters | Type | Description |
|---|
owner | string | Repository owner (username or organization) |
pull_number | number | Pull request number |
repo | string | Repository name |
Tool: get_pull_request_files
Get the list of files changed in a pull request
| Parameters | Type | Description |
|---|
owner | string | Repository owner (username or organization) |
pull_number | number | Pull request number |
repo | string | Repository name |
Tool: get_pull_request_reviews
Get the reviews on a pull request
| Parameters | Type | Description |
|---|
owner | string | Repository owner (username or organization) |
pull_number | number | Pull request number |
repo | string | Repository name |
Tool: get_pull_request_status
Get the combined status of all status checks for a pull request
| Parameters | Type | Description |
|---|
owner | string | Repository owner (username or organization) |
pull_number | number | Pull request number |
repo | string | Repository name |
Tool: list_commits
Get list of commits of a branch in a GitHub repository
| Parameters | Type | Description |
|---|
owner | string | |
repo | string | |
page | numberoptional | |
perPage | numberoptional | |
sha | stringoptional | |
Tool: list_issues
List issues in a GitHub repository with filtering options
| Parameters | Type | Description |
|---|
owner | string | |
repo | string | |
direction | stringoptional | |
labels | arrayoptional | |
page | numberoptional | |
per_page | numberoptional | |
since | stringoptional | |
sort | stringoptional | |
state | stringoptional | |
Tool: list_pull_requests
List and filter repository pull requests
| Parameters | Type | Description |
|---|
owner | string | Repository owner (username or organization) |
repo | string | Repository name |
base | stringoptional | Filter by base branch name |
direction | stringoptional | The direction of the sort |
head | stringoptional | Filter by head user or head organization and branch name |
page | numberoptional | Page number of the results |
per_page | numberoptional | Results per page (max 100) |
sort | stringoptional | What to sort results by |
state | stringoptional | State of the pull requests to return |
Tool: merge_pull_request
Merge a pull request
| Parameters | Type | Description |
|---|
owner | string | Repository owner (username or organization) |
pull_number | number | Pull request number |
repo | string | Repository name |
commit_message | stringoptional | Extra detail to append to automatic commit message |
commit_title | stringoptional | Title for the automatic commit message |
merge_method | stringoptional | Merge method to use |
Tool: push_files
Push multiple files to a GitHub repository in a single commit
| Parameters | 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 |
Tool: search_code
Search for code across GitHub repositories
| Parameters | Type | Description |
|---|
q | string | |
order | stringoptional | |
page | numberoptional | |
per_page | numberoptional | |
Tool: search_issues
Search for issues and pull requests across GitHub repositories
| Parameters | Type | Description |
|---|
q | string | |
order | stringoptional | |
page | numberoptional | |
per_page | numberoptional | |
sort | stringoptional | |
Tool: search_repositories
Search for GitHub repositories
| Parameters | Type | Description |
|---|
query | string | Search query (see GitHub search syntax) |
page | numberoptional | Page number for pagination (default: 1) |
perPage | numberoptional | Number of results per page (default: 30, max: 100) |
Tool: search_users
Search for users on GitHub
| Parameters | Type | Description |
|---|
q | string | |
order | stringoptional | |
page | numberoptional | |
per_page | numberoptional | |
sort | stringoptional | |
Tool: update_issue
Update an existing issue in a GitHub repository
| Parameters | Type | Description |
|---|
issue_number | number | |
owner | string | |
repo | string | |
assignees | arrayoptional | |
body | stringoptional | |
labels | arrayoptional | |
milestone | numberoptional | |
state | stringoptional | |
title | stringoptional | |
Tool: update_pull_request_branch
Update a pull request branch with the latest changes from the base branch
| Parameters | Type | Description |
|---|
owner | string | Repository owner (username or organization) |
pull_number | number | Pull request number |
repo | string | Repository name |
expected_head_sha | stringoptional | The expected SHA of the pull request's HEAD ref |
Use this MCP Server
{
"mcpServers": {
"github": {
"command": "docker",
"args": [
"run",
"-i",
"--rm",
"-e",
"GITHUB_PERSONAL_ACCESS_TOKEN",
"mcp/github"
],
"env": {
"GITHUB_PERSONAL_ACCESS_TOKEN": "<YOUR_TOKEN>"
}
}
}
}
Why is it safer to run MCP Servers with Docker?