GitHub - github/github-mcp-server
GitHub's official MCP Server
Description
The GitHub MCP Server is a Model Context Protocol (MCP) server that provides seamless integration with GitHub APIs, enabling advanced automation and interaction capabilities for developers and tools.
Usage
With VS Code
For quick installation, use one of the one-click install buttons at the top of this README.
For manual installation, add the following JSON block to your User Settings (JSON) file in VS Code. You can do this by pressing Ctrl + Shift + P
and typing Preferences: Open User Settings (JSON)
.
Optionally, you can add it to a file called .vscode/mcp.json
in your workspace. This will allow you to share the configuration with others.
{
"mcp": {
"inputs": [
{
"type": "promptString",
"id": "github_token",
"description": "GitHub Personal Access Token",
"password": true
}
],
"servers": {
"github": {
"command": "docker",
"args": [
"run",
"-i",
"--rm",
"-e",
"GITHUB_PERSONAL_ACCESS_TOKEN",
"ghcr.io/github/github-mcp-server"
],
"env": {
"GITHUB_PERSONAL_ACCESS_TOKEN": "${input:github_token}"
}
}
}
}
}
More about using MCP server tools in VS Code's agent mode documentation.
With Claude Desktop
{
"mcpServers": {
"github": {
"command": "docker",
"args": [
"run",
"-i",
"--rm",
"-e",
"GITHUB_PERSONAL_ACCESS_TOKEN",
"ghcr.io/github/github-mcp-server"
],
"env": {
"GITHUB_PERSONAL_ACCESS_TOKEN": ""
}
}
}
}
Tools
get_me
: Get details of the authenticated userget_issue
: Gets the issuecreate_or_update_file
: Create or update a single file in a repositorypush_files
: Push multiple files in a single commitsearch_repositories
: Search for GitHub repositoriescreate_repository
: Create a new GitHub repositoryget_file_contents
: Get contents of a file or directoryfork_repository
: Fork a repositorycreate_branch
: Create a new branchlist_commits
: Gets commits of a branch in a repositorysearch_code
: Search for code across GitHub repositoriessearch_users
: Search for GitHub usersget_code_scanning_alert
: Get a code scanning alertlist_code_scanning_alerts
: List code scanning alerts for a repository
Resources
License
This project is licensed under the terms of the MIT open source license. Please refer to MIT for the full terms.