trackmcp
Back to directory
armor-ai-onboarding

github-mcp-server-test-2

View on GitHub

GitHub's official MCP Server

0 stars GoServers & Infrastructure Updated Jun 24, 2025

Documentation

GitHub MCP Server

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.

Install with Docker in VS Code
Install with Docker in VS Code Insiders

Use Cases

  • Automating GitHub workflows and processes.
  • Extracting and analyzing data from GitHub repositories.
  • Building AI powered tools and applications that interact with GitHub's ecosystem.

Prerequisites

1. To run the server in a container, you will need to have Docker installed.

2. Once Docker is installed, you will also need to ensure Docker is running. The image is public; if you get errors on pull, you may have an expired token and need to `docker logout ghcr.io`.

3. Lastly you will need to Create a GitHub Personal Access Token.

The MCP server can use many of the GitHub APIs, so enable the permissions that you feel comfortable granting your AI tools (to learn more about access tokens, please check out the documentation).

Installation

Usage with VS Code

For quick installation, use one of the one-click install buttons at the top of this README. Once you complete that flow, toggle Agent mode (located by the Copilot Chat text input) and the server will start.

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)`.

json
{
  "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}"
        }
      }
    }
  }
}

Optionally, you can add a similar example (i.e. without the mcp key) to a file called `.vscode/mcp.json` in your workspace. This will allow you to share the configuration with others.

json
{
  "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.

Usage with Claude Desktop

json
{
  "mcpServers": {
    "github": {
      "command": "docker",
      "args": [
        "run",
        "-i",
        "--rm",
        "-e",
        "GITHUB_PERSONAL_ACCESS_TOKEN",
        "ghcr.io/github/github-mcp-server"
      ],
      "env": {
        "GITHUB_PERSONAL_ACCESS_TOKEN": ""
      }
    }
  }
}

Build from source

If you don't have Docker, you can use `go build` to build the binary in the

`cmd/github-mcp-server` directory, and use the `github-mcp-server stdio` command with the `GITHUB_PERSONAL_ACCESS_TOKEN` environment variable set to your token. To specify the output location of the build, use the `-o` flag. You should configure your server to use the built executable as its `command`. For example:

JSON
{
  "mcp": {
    "servers": {
      "github": {
        "command": "/path/to/github-mcp-server",
        "args": ["stdio"],
        "env": {
          "GITHUB_PERSONAL_ACCESS_TOKEN": ""
        }
      }
    }
  }
}

Tool Configuration

The GitHub MCP Server supports enabling or disabling specific groups of functionalities via the `--toolsets` flag. This allows you to control which GitHub API capabilities are available to your AI tools. Enabling only the toolsets that you need can help the LLM with tool choice and reduce the context size.

Available Toolsets

The following sets of tools are available (all are on by default):

ToolsetDescription
`repos`Repository-related tools (file operations, branches, commits)
`issues`Issue-related tools (create, read, update, comment)
`users`Anything relating to GitHub Users
`pull_requests`Pull request operations (create, merge, review)
`code_security`Code scanning alerts and security features
`experiments`Experimental features (not considered stable)

Specifying Toolsets

To specify toolsets you want available to the LLM, you can pass an allow-list in two ways:

1. Using Command Line Argument:

bash
github-mcp-server --toolsets repos,issues,pull_requests,code_security

2. Using Environment Variable:

bash
GITHUB_TOOLSETS="repos,issues,pull_requests,code_security" ./github-mcp-server

The environment variable `GITHUB_TOOLSETS` takes precedence over the command line argument if both are provided.

Using Toolsets With Docker

When using Docker, you can pass the toolsets as environment variables:

bash
docker run -i --rm \
  -e GITHUB_PERSONAL_ACCESS_TOKEN= \
  -e GITHUB_TOOLSETS="repos,issues,pull_requests,code_security,experiments" \
  ghcr.io/github/github-mcp-server

The "all" Toolset

The special toolset `all` can be provided to enable all available toolsets regardless of any other configuration:

bash
./github-mcp-server --toolsets all

Or using the environment variable:

bash
GITHUB_TOOLSETS="all" ./github-mcp-server

Dynamic Tool Discovery

Note: This feature is currently in beta and may not be available in all environments. Please test it out and let us know if you encounter any issues.

Instead of starting with all tools enabled, you can turn on dynamic toolset discovery. Dynamic toolsets allow the MCP host to list and enable toolsets in response to a user prompt. This should help to avoid situations where the model gets confused by the sheer number of tools available.

Using Dynamic Tool Discovery

When using the binary, you can pass the `--dynamic-toolsets` flag.

bash
./github-mcp-server --dynamic-toolsets

When using Docker, you can pass the toolsets as environment variables:

bash
docker run -i --rm \
  -e GITHUB_PERSONAL_ACCESS_TOKEN= \
  -e GITHUB_DYNAMIC_TOOLSETS=1 \
  ghcr.io/github/github-mcp-server

GitHub Enterprise Server and Enterprise Cloud with data residency (ghe.com)

The flag `--gh-host` and the environment variable `GITHUB_HOST` can be used to set

the hostname for GitHub Enterprise Server or GitHub Enterprise Cloud with data residency.

  • For GitHub Enterprise Server, prefix the hostname with the `https://` URI scheme, as it otherwise defaults to `http://`, which GitHub Enterprise Server does not support.
  • For GitHub Enterprise Cloud with data residency, use `https://YOURSUBDOMAIN.ghe.com` as the hostname.
json
"github": {
    "command": "docker",
    "args": [
    "run",
    "-i",
    "--rm",
    "-e",
    "GITHUB_PERSONAL_ACCESS_TOKEN",
    "-e",
    "GITHUB_HOST",
    "ghcr.io/github/github-mcp-server"
    ],
    "env": {
        "GITHUB_PERSONAL_ACCESS_TOKEN": "${input:github_token}",
        "GITHUB_HOST": "https://"
    }
}

i18n / Overriding Descriptions

The descriptions of the tools can be overridden by creating a

`github-mcp-server-config.json` file in the same directory as the binary.

The file should contain a JSON object with the tool names as keys and the new

descriptions as values. For example:

json
{
  "TOOL_ADD_ISSUE_COMMENT_DESCRIPTION": "an alternative description",
  "TOOL_CREATE_BRANCH_DESCRIPTION": "Create a new branch in a GitHub repository"
}

You can create an export of the current translations by running the binary with

the `--export-translations` flag.

This flag will preserve any translations/overrides you have made, while adding

any new translations that have been added to the binary since the last time you

exported.

sh
./github-mcp-server --export-translations
cat github-mcp-server-config.json

You can also use ENV vars to override the descriptions. The environment

variable names are the same as the keys in the JSON file, prefixed with

`GITHUB_MCP_` and all uppercase.

For example, to override the `TOOL_ADD_ISSUE_COMMENT_DESCRIPTION` tool, you can

set the following environment variable:

sh
export GITHUB_MCP_TOOL_ADD_ISSUE_COMMENT_DESCRIPTION="an alternative description"

Tools

Users

  • get_me - Get details of the authenticated user
    • No parameters required

Issues

  • get_issue - Gets the contents of an issue within a repository
    • get_issue_comments - Get comments for a GitHub issue
      • create_issue - Create a new issue in a GitHub repository
        • add_issue_comment - Add a comment to an issue
          • list_issues - List and filter repository issues
            • update_issue - Update an existing issue in a GitHub repository
              • search_issues - Search for issues and pull requests
                • `query`: Search query (string, required)
                • `sort`: Sort field (string, optional)
                • `order`: Sort order (string, optional)
                • `page`: Page number (number, optional)
                • `perPage`: Results per page (number, optional)

              Pull Requests

              • get_pull_request - Get details of a specific pull request
                • list_pull_requests - List and filter repository pull requests
                  • merge_pull_request - Merge a pull request
                    • get_pull_request_files - Get the list of files changed in a pull request
                      • get_pull_request_status - Get the combined status of all status checks for a pull request
                        • update_pull_request_branch - Update a pull request branch with the latest changes from the base branch
                          • get_pull_request_comments - Get the review comments on a pull request
                            • get_pull_request_reviews - Get the reviews on a pull request
                              • create_pull_request_review - Create a review on a pull request review
                                • create_pull_request - Create a new pull request
                                  • add_pull_request_review_comment - Add a review comment to a pull request or reply to an existing comment
                                    • update_pull_request - Update an existing pull request in a GitHub repository
                                      • request_copilot_review - Request a GitHub Copilot review for a pull request (experimental; subject to GitHub API support)

                                        Repositories

                                        • create_or_update_file - Create or update a single file in a repository
                                          • `owner`: Repository owner (string, required)
                                          • `repo`: Repository name (string, required)
                                          • `path`: File path (string, required)
                                          • `message`: Commit message (string, required)
                                          • `content`: File content (string, required)
                                          • `branch`: Branch name (string, optional)
                                          • `sha`: File SHA if updating (string, optional)
                                        • list_branches - List branches in a GitHub repository
                                          • `owner`: Repository owner (string, required)
                                          • `repo`: Repository name (string, required)
                                          • `page`: Page number (number, optional)
                                          • `perPage`: Results per page (number, optional)
                                        • push_files - Push multiple files in a single commit
                                          • `owner`: Repository owner (string, required)
                                          • `repo`: Repository name (string, required)
                                          • `branch`: Branch to push to (string, required)
                                          • `files`: Files to push, each with path and content (array, required)
                                          • `message`: Commit message (string, required)
                                        • search_repositories - Search for GitHub repositories
                                          • `query`: Search query (string, required)
                                          • `sort`: Sort field (string, optional)
                                          • `order`: Sort order (string, optional)
                                          • `page`: Page number (number, optional)
                                          • `perPage`: Results per page (number, optional)
                                        • create_repository - Create a new GitHub repository
                                          • `name`: Repository name (string, required)
                                          • `description`: Repository description (string, optional)
                                          • `private`: Whether the repository is private (boolean, optional)
                                          • `autoInit`: Auto-initialize with README (boolean, optional)
                                        • get_file_contents - Get contents of a file or directory
                                          • `owner`: Repository owner (string, required)
                                          • `repo`: Repository name (string, required)
                                          • `path`: File path (string, required)
                                          • `ref`: Git reference (string, optional)
                                        • fork_repository - Fork a repository
                                          • `owner`: Repository owner (string, required)
                                          • `repo`: Repository name (string, required)
                                          • `organization`: Target organization name (string, optional)
                                        • create_branch - Create a new branch
                                          • `owner`: Repository owner (string, required)
                                          • `repo`: Repository name (string, required)
                                          • `branch`: New branch name (string, required)
                                          • `sha`: SHA to create branch from (string, required)
                                        • list_commits - Get a list of commits of a branch in a repository
                                          • `owner`: Repository owner (string, required)
                                          • `repo`: Repository name (string, required)
                                          • `sha`: Branch name, tag, or commit SHA (string, optional)
                                          • `path`: Only commits containing this file path (string, optional)
                                          • `page`: Page number (number, optional)
                                          • `perPage`: Results per page (number, optional)
                                        • get_commit - Get details for a commit from a repository
                                          • `owner`: Repository owner (string, required)
                                          • `repo`: Repository name (string, required)
                                          • `sha`: Commit SHA, branch name, or tag name (string, required)
                                          • `page`: Page number, for files in the commit (number, optional)
                                          • `perPage`: Results per page, for files in the commit (number, optional)
                                        • search_code - Search for code across GitHub repositories
                                          • `query`: Search query (string, required)
                                          • `sort`: Sort field (string, optional)
                                          • `order`: Sort order (string, optional)
                                          • `page`: Page number (number, optional)
                                          • `perPage`: Results per page (number, optional)

                                        Users

                                        • search_users - Search for GitHub users
                                          • `q`: Search query (string, required)
                                          • `sort`: Sort field (string, optional)
                                          • `order`: Sort order (string, optional)
                                          • `page`: Page number (number, optional)
                                          • `perPage`: Results per page (number, optional)

                                        Code Scanning

                                        • get_code_scanning_alert - Get a code scanning alert
                                          • list_code_scanning_alerts - List code scanning alerts for a repository
                                            • `owner`: Repository owner (string, required)
                                            • `repo`: Repository name (string, required)
                                            • `ref`: Git reference (string, optional)
                                            • `state`: Alert state (string, optional)
                                            • `severity`: Alert severity (string, optional)
                                            • `tool_name`: The name of the tool used for code scanning (string, optional)

                                          Secret Scanning

                                          • get_secret_scanning_alert - Get a secret scanning alert
                                            • list_secret_scanning_alerts - List secret scanning alerts for a repository
                                              • `owner`: Repository owner (string, required)
                                              • `repo`: Repository name (string, required)
                                              • `state`: Alert state (string, optional)
                                              • `secret_type`: The secret types to be filtered for in a comma-separated list (string, optional)
                                              • `resolution`: The resolution status (string, optional)

                                            Notifications

                                            • list_notifications – List notifications for a GitHub user
                                              • `filter`: Filter to apply to the response (`default`, `include_read_notifications`, `only_participating`)
                                              • `since`: Only show notifications updated after the given time (ISO 8601 format)
                                              • `before`: Only show notifications updated before the given time (ISO 8601 format)
                                              • `owner`: Optional repository owner (string)
                                              • `repo`: Optional repository name (string)
                                              • `page`: Page number (number, optional)
                                              • `perPage`: Results per page (number, optional)
                                            • get_notification_details – Get detailed information for a specific GitHub notification
                                              • `notificationID`: The ID of the notification (string, required)
                                            • dismiss_notification – Dismiss a notification by marking it as read or done
                                              • `threadID`: The ID of the notification thread (string, required)
                                              • `state`: The new state of the notification (`read` or `done`)
                                            • mark_all_notifications_read – Mark all notifications as read
                                              • `lastReadAt`: Describes the last point that notifications were checked (optional, RFC3339/ISO8601 string, default: now)
                                              • `owner`: Optional repository owner (string)
                                              • `repo`: Optional repository name (string)
                                            • manage_notification_subscription – Manage a notification subscription (ignore, watch, or delete) for a notification thread
                                              • `notificationID`: The ID of the notification thread (string, required)
                                              • `action`: Action to perform: `ignore`, `watch`, or `delete` (string, required)
                                            • manage_repository_notification_subscription – Manage a repository notification subscription (ignore, watch, or delete)
                                              • `owner`: The account owner of the repository (string, required)
                                              • `repo`: The name of the repository (string, required)
                                              • `action`: Action to perform: `ignore`, `watch`, or `delete` (string, required)

                                            Resources

                                            Repository Content

                                            • Get Repository Content

                                            Retrieves the content of a repository at a specific path.

                                              • Get Repository Content for a Specific Branch

                                              Retrieves the content of a repository at a specific path for a given branch.

                                                • Get Repository Content for a Specific Commit

                                                Retrieves the content of a repository at a specific path for a given commit.

                                                  • Get Repository Content for a Specific Tag

                                                  Retrieves the content of a repository at a specific path for a given tag.

                                                    • Get Repository Content for a Specific Pull Request

                                                    Retrieves the content of a repository at a specific path for a given pull request.

                                                      Library Usage

                                                      The exported Go API of this module should currently be considered unstable, and subject to breaking changes. In the future, we may offer stability; please file an issue if there is a use case where this would be valuable.

                                                      License

                                                      This project is licensed under the terms of the MIT open source license. Please refer to MIT for the full terms.

                                                      Frequently asked questions

                                                      What is github-mcp-server-test-2?

                                                      github-mcp-server-test-2 is GitHub's official MCP Server

                                                      How do I install github-mcp-server-test-2?

                                                      Open the GitHub repository and follow its README. Most MCP servers are added to your client's MCP config, then called by your agent.

                                                      Is github-mcp-server-test-2 open source?

                                                      Yes — it is hosted on GitHub at https://github.com/armor-ai-onboarding/github-mcp-server-test-2.

                                                      Related MCP tools

                                                      Run your own MCP server? See who uses it and what to fix.

                                                      Measure it with TrackMCP