mcp/github

Verified Publisher

By mcp

Updated 8 months ago

Tools for interacting with the GitHub API, enabling file operations, repository management, searc...

Image
Machine learning & AI
20

50K+

mcp/github repository overview

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

AttributeDetails
Dockerfilehttps://github.com/modelcontextprotocol/servers/blob/b4ee623039a6c60053ce67269701ad9e95073306/src/github/Dockerfile
Commitb4ee623039a6c60053ce67269701ad9e95073306
Docker Image built byDocker Inc.
Docker Scout Health ScoreDocker Scout Health Score
Verify SignatureCOSIGN_REPOSITORY=mcp/signatures cosign verify mcp/github --key https://raw.githubusercontent.com/docker/keyring/refs/heads/main/public/mcp/latest.pub
LicenceMIT License

Available Tools (26)

Tools provided by this ServerShort Description
add_issue_commentAdd a comment to an existing issue
create_branchCreate a new branch in a GitHub repository
create_issueCreate a new issue in a GitHub repository
create_or_update_fileCreate or update a single file in a GitHub repository
create_pull_requestCreate a new pull request in a GitHub repository
create_pull_request_reviewCreate a review on a pull request
create_repositoryCreate a new GitHub repository in your account
fork_repositoryFork a GitHub repository to your account or specified organization
get_file_contentsGet the contents of a file or directory from a GitHub repository
get_issueGet details of a specific issue in a GitHub repository.
get_pull_requestGet details of a specific pull request
get_pull_request_commentsGet the review comments on a pull request
get_pull_request_filesGet the list of files changed in a pull request
get_pull_request_reviewsGet the reviews on a pull request
get_pull_request_statusGet the combined status of all status checks for a pull request
list_commitsGet list of commits of a branch in a GitHub repository
list_issuesList issues in a GitHub repository with filtering options
list_pull_requestsList and filter repository pull requests
merge_pull_requestMerge a pull request
push_filesPush multiple files to a GitHub repository in a single commit
search_codeSearch for code across GitHub repositories
search_issuesSearch for issues and pull requests across GitHub repositories
search_repositoriesSearch for GitHub repositories
search_usersSearch for users on GitHub
update_issueUpdate an existing issue in a GitHub repository
update_pull_request_branchUpdate 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

ParametersTypeDescription
bodystring
issue_numbernumber
ownerstring
repostring

Tool: create_branch

Create a new branch in a GitHub repository

ParametersTypeDescription
branchstringName for the new branch
ownerstringRepository owner (username or organization)
repostringRepository name
from_branchstring optionalOptional: source branch to create from (defaults to the repository's default branch)

Tool: create_issue

Create a new issue in a GitHub repository

ParametersTypeDescription
ownerstring
repostring
titlestring
assigneesarray optional
bodystring optional
labelsarray optional
milestonenumber optional

Tool: create_or_update_file

Create or update a single file in a GitHub repository

ParametersTypeDescription
branchstringBranch to create/update the file in
contentstringContent of the file
messagestringCommit message
ownerstringRepository owner (username or organization)
pathstringPath where to create/update the file
repostringRepository name
shastring optionalSHA of the file being replaced (required when updating existing files)

Tool: create_pull_request

Create a new pull request in a GitHub repository

ParametersTypeDescription
basestringThe name of the branch you want the changes pulled into
headstringThe name of the branch where your changes are implemented
ownerstringRepository owner (username or organization)
repostringRepository name
titlestringPull request title
bodystring optionalPull request body/description
draftboolean optionalWhether to create the pull request as a draft
maintainer_can_modifyboolean optionalWhether maintainers can modify the pull request

Tool: create_pull_request_review

Create a review on a pull request

ParametersTypeDescription
bodystringThe body text of the review
eventstringThe review action to perform
ownerstringRepository owner (username or organization)
pull_numbernumberPull request number
repostringRepository name
commentsarray optionalComments to post as part of the review (specify either position or line, not both)
commit_idstring optionalThe SHA of the commit that needs a review

Tool: create_repository

Create a new GitHub repository in your account

ParametersTypeDescription
namestringRepository name
autoInitboolean optionalInitialize with README.md
descriptionstring optionalRepository description
privateboolean optionalWhether the repository should be private

Tool: fork_repository

Fork a GitHub repository to your account or specified organization

ParametersTypeDescription
ownerstringRepository owner (username or organization)
repostringRepository name
organizationstring optionalOptional: 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

ParametersTypeDescription
ownerstringRepository owner (username or organization)
pathstringPath to the file or directory
repostringRepository name
branchstring optionalBranch to get contents from

Tool: get_issue

Get details of a specific issue in a GitHub repository.

ParametersTypeDescription
issue_numbernumber
ownerstring
repostring

Tool: get_pull_request

Get details of a specific pull request

ParametersTypeDescription
ownerstringRepository owner (username or organization)
pull_numbernumberPull request number
repostringRepository name

Tool: get_pull_request_comments

Get the review comments on a pull request

ParametersTypeDescription
ownerstringRepository owner (username or organization)
pull_numbernumberPull request number
repostringRepository name

Tool: get_pull_request_files

Get the list of files changed in a pull request

ParametersTypeDescription
ownerstringRepository owner (username or organization)
pull_numbernumberPull request number
repostringRepository name

Tool: get_pull_request_reviews

Get the reviews on a pull request

ParametersTypeDescription
ownerstringRepository owner (username or organization)
pull_numbernumberPull request number
repostringRepository name

Tool: get_pull_request_status

Get the combined status of all status checks for a pull request

ParametersTypeDescription
ownerstringRepository owner (username or organization)
pull_numbernumberPull request number
repostringRepository name

Tool: list_commits

Get list of commits of a branch in a GitHub repository

ParametersTypeDescription
ownerstring
repostring
pagenumber optional
perPagenumber optional
shastring optional

Tool: list_issues

List issues in a GitHub repository with filtering options

ParametersTypeDescription
ownerstring
repostring
directionstring optional
labelsarray optional
pagenumber optional
per_pagenumber optional
sincestring optional
sortstring optional
statestring optional

Tool: list_pull_requests

List and filter repository pull requests

ParametersTypeDescription
ownerstringRepository owner (username or organization)
repostringRepository name
basestring optionalFilter by base branch name
directionstring optionalThe direction of the sort
headstring optionalFilter by head user or head organization and branch name
pagenumber optionalPage number of the results
per_pagenumber optionalResults per page (max 100)
sortstring optionalWhat to sort results by
statestring optionalState of the pull requests to return

Tool: merge_pull_request

Merge a pull request

ParametersTypeDescription
ownerstringRepository owner (username or organization)
pull_numbernumberPull request number
repostringRepository name
commit_messagestring optionalExtra detail to append to automatic commit message
commit_titlestring optionalTitle for the automatic commit message
merge_methodstring optionalMerge method to use

Tool: push_files

Push multiple files to a GitHub repository in a single commit

ParametersTypeDescription
branchstringBranch to push to (e.g., 'main' or 'master')
filesarrayArray of files to push
messagestringCommit message
ownerstringRepository owner (username or organization)
repostringRepository name

Tool: search_code

Search for code across GitHub repositories

ParametersTypeDescription
qstring
orderstring optional
pagenumber optional
per_pagenumber optional

Tool: search_issues

Search for issues and pull requests across GitHub repositories

ParametersTypeDescription
qstring
orderstring optional
pagenumber optional
per_pagenumber optional
sortstring optional

Tool: search_repositories

Search for GitHub repositories

ParametersTypeDescription
querystringSearch query (see GitHub search syntax)
pagenumber optionalPage number for pagination (default: 1)
perPagenumber optionalNumber of results per page (default: 30, max: 100)

Tool: search_users

Search for users on GitHub

ParametersTypeDescription
qstring
orderstring optional
pagenumber optional
per_pagenumber optional
sortstring optional

Tool: update_issue

Update an existing issue in a GitHub repository

ParametersTypeDescription
issue_numbernumber
ownerstring
repostring
assigneesarray optional
bodystring optional
labelsarray optional
milestonenumber optional
statestring optional
titlestring optional

Tool: update_pull_request_branch

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

ParametersTypeDescription
ownerstringRepository owner (username or organization)
pull_numbernumberPull request number
repostringRepository name
expected_head_shastring optionalThe 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?

Install from MCP:Hub

Tag summary

Content type

Image

Digest

sha256:89fd71b6f

Size

57.9 MB

Last updated

8 months ago

Requires Docker Desktop 4.37.1 or later.

This week's pulls

Pulls:

2,121

Last week