GitHub MCP Server

Official
Developer Tools
stdio
Featured

Connect your AI agent to GitHub to manage repositories, create and review pull requests, search code, manage issues and labels, and automate workflows. The official GitHub MCP server provides read and write access to the GitHub API through a standardized MCP interface.

Quick Install

$ npx -y @modelcontextprotocol/server-github

Environment Variables

VariableDescriptionRequired
GITHUB_PERSONAL_ACCESS_TOKENGitHub Personal Access Token with repo scopeYes

In-Depth Setup Guide

Complete setup walkthrough & security best practices

Read Guide

Configuration by Client

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

Need a different client? Use the Config Generator for Windsurf, Cline, Antigravity, and more.

Available Tools (7)

create_or_update_filesearch_repositoriescreate_issuecreate_pull_requestget_file_contentslist_commitspush_files

GitHub FAQ

What is the GitHub MCP server?

Connect your AI agent to GitHub to manage repositories, create and review pull requests, search code, manage issues and labels, and automate workflows. The official GitHub MCP server provides read and write access to the GitHub API through a standardized MCP interface.

How do I install the GitHub MCP server?

Run: npx -y @modelcontextprotocol/server-github

Which AI clients support the GitHub MCP server?

The GitHub MCP server works with Claude Desktop, Cursor, Codex CLI, Antigravity, Windsurf, and any MCP-compatible client using stdio transport.

What tools does the GitHub MCP server provide?

The server provides 7 tools: create_or_update_file, search_repositories, create_issue, create_pull_request, get_file_contents, list_commits, push_files.