Get the FREE Ultimate OpenClaw Setup Guide →

GitHub

Official

MCP server for GitHub API integration - repositories, issues, pull requests, and more.

Installation
Run this command in your terminal to add the MCP server to Claude Code.
Run in terminal:
Command
claude mcp add --transport stdio modelcontextprotocol-server-github npx -y @modelcontextprotocol/server-github

How to use

The GitHub MCP server enables seamless integration with the GitHub API, allowing you to manage repositories, issues, pull requests, and more directly from your applications. By utilizing this server, developers can automate tasks such as creating repositories, updating issues, and merging pull requests, streamlining their workflow and enhancing productivity.

Once you are connected to the GitHub MCP server, you can interact with it using various tools designed for specific tasks. For example, you can use create_repository to set up a new repository, create_issue to track bugs or feature requests, and create_pull_request to facilitate code reviews. The server supports a wide range of queries, so you can efficiently manage your GitHub projects by leveraging tools like list_commits and search_repositories to retrieve relevant information.

How to install

To get started with the GitHub MCP server, ensure you have Node.js installed on your machine. You can install the package in two ways:

Option A: Quick start with npx:

npx -y @modelcontextprotocol/server-github

Option B: Global install alternative:

npm install -g @modelcontextprotocol/server-github

After installation, you're ready to begin integrating with the GitHub API.

Additional notes

When configuring the GitHub MCP server, make sure to set up your GitHub authentication tokens as environment variables to avoid permission issues. Common pitfalls include not having the correct scopes for API access, which can lead to failed requests. Always check your API limits and ensure your application handles rate limiting gracefully.

Available tools

create_or_update_file

Create or update a file in a repository

search_repositories

Search for GitHub repositories

create_repository

Create a new repository

get_file_contents

Get contents of a file or directory

push_files

Push multiple files in a single commit

create_issue

Create a new issue

create_pull_request

Create a new pull request

fork_repository

Fork a repository

create_branch

Create a new branch

list_commits

List commits in a repository

list_issues

List issues in a repository

update_issue

Update an existing issue

add_issue_comment

Add a comment to an issue

search_code

Search for code across GitHub

search_issues

Search for issues and PRs

search_users

Search for users

get_issue

Get details of a specific issue

get_pull_request

Get details of a pull request

list_pull_requests

List pull requests

create_pull_request_review

Create a review on a PR

merge_pull_request

Merge a pull request

get_pull_request_files

Get files changed in a PR

get_pull_request_status

Get combined status of a PR

update_pull_request_branch

Update PR branch with base

get_pull_request_comments

Get review comments on a PR

get_pull_request_reviews

Get reviews on a PR

Related MCP Servers

Sponsor this space

Reach thousands of developers