GitHub MCP Detailed Setup

Advanced configuration and detailed documentation for the GitHub MCP server.

For basic setup, see MCP Setup - GitHub MCP.

PAT Scope Options

The quick start uses public_repo scope which is sufficient for Apache Maven repositories. For additional access:

repo

Full control of private repositories (if you work with private forks)

read:org

Read organization membership (optional, for org-level queries)

Manual JSON Configuration

For project-level configuration without using the CLI, add to .mcp.json in your project root:

{
  "mcpServers": {
    "github": {
      "command": "npx",
      "args": ["-y", "@modelcontextprotocol/server-github"],
      "env": {
        "GITHUB_PERSONAL_ACCESS_TOKEN": "<your-github-token>"
      }
    }
  }
}

Available Tools

Once configured, the following MCP tools are available:

Issues

search_issues

Search issues across repositories using GitHub’s search syntax.

issue_read

Get details of a specific issue including comments and labels.

Pull Requests

list_pull_requests

List PRs in a repository with optional filters.

pull_request_read

Get PR details including diff, status, and review comments.

Code

search_code

Search code across repositories.

get_file_contents

Retrieve file content from a repository.

Repository

list_commits

List commits in a repository or branch.

get_commit

Get details of a specific commit including diff.

Maven Repositories

Key Apache Maven repositories on GitHub:

Repository Description

apache/maven

Maven Core

apache/maven-resolver

Artifact Resolver

apache/maven-compiler-plugin

Compiler Plugin

apache/maven-surefire

Surefire Plugin

Search for apache/maven-* to find all Maven-related repositories.

Example Queries

# Search for issues about Maven 4
> Search GitHub issues in apache/maven about "Maven 4"

# Get a specific issue
> Get details of issue #1234 in apache/maven

# Find recent PRs
> List open pull requests in apache/maven-compiler-plugin