GitHub MCP Server

Official

Manage repos, issues, PRs, and code directly from your AI chat

GitHub8.2k
githubgitcodeissuespull-requestsofficial

The official GitHub MCP server gives your AI assistant full access to the GitHub API. Create issues, open pull requests, review code, search repositories, manage branches, and read file contents — all without leaving your AI client. Authenticated via a personal access token with scopes you control. Ideal for automating repetitive GitHub workflows, reviewing codebases, and keeping track of open issues.

Install Config

Config file: ~/Library/Application Support/Claude/claude_desktop_config.json· Windows: %APPDATA%\Claude\claude_desktop_config.json

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

Required environment variables:

  • GITHUB_PERSONAL_ACCESS_TOKENGitHub personal access token with repo and issues scopes(e.g. ghp_xxxxxxxxxxxxxxxxxxxx)

Available Tools (9)

Tool nameDescription
create_issueOpen a new GitHub issue
create_pull_requestCreate a pull request
get_file_contentsRead a file from any repository
push_filesPush one or more files to a repository
create_repositoryCreate a new GitHub repository
search_repositoriesSearch for repositories on GitHub
list_issuesList issues with optional filters
create_branchCreate a new branch in a repository
fork_repositoryFork a repository to your account

Example Prompts

  • List all open issues in my repository
  • Create an issue titled 'Fix login bug' in my project
  • What files are in the src directory of my repo?
  • Open a pull request from feature/login to main
  • Search for repositories about MCP servers

Pros & Cons

Pros

  • Official Anthropic server with full GitHub API access
  • Create, read, and manage issues, PRs, and code
  • Fine-grained token scopes — give only the permissions you need

Cons

  • GitHub only — not GitLab or Bitbucket
  • Requires a personal access token

Who Is This For?

  • ·Developers automating repetitive GitHub tasks
  • ·Open source maintainers managing large issue backlogs
  • ·Teams who want AI-assisted code review workflows

When to use: Use when you spend significant time on GitHub tasks that don't require the full GitHub UI — creating issues, reviewing code, searching repos, or managing branches.

Supported Clients

Related Use Cases