← Back to MCP servers

GitHub

GitHub MCP Server

Access GitHub repositories, issues, pull requests, and code search directly from your AI coding assistant.

Token requiredGet credentials →

Last reviewed Mar 2, 2026

Install

claude mcp add github --transport stdio -- npx -y @modelcontextprotocol/server-github
Scope: project

Environment variables required:

GITHUB_PERSONAL_ACCESS_TOKEN=your-github-pat

Available tools

ToolDescription
get_file_contentsRead file contents from a repository
search_codeSearch for code across GitHub repositories
search_repositoriesFind repositories matching search criteria
create_pull_requestOpen a new pull request on a repository
create_issueCreate a new issue in a repository
create_branchCreate a new branch in a repository
push_filesPush file changes to a repository
list_commitsList recent commits on a branch
list_issuesList issues in a repository with filters
get_issueGet details of a specific issue

What it does

The GitHub MCP Server connects your AI coding assistant directly to the GitHub API, giving it the ability to read, search, and modify repositories without leaving your editor. It supports the full range of GitHub operations including file access, code search, issue management, and pull request workflows.

This is one of the most popular MCP servers in the ecosystem, enabling AI assistants to understand your codebase context by reading files directly from GitHub, searching across repositories, and even making changes through commits and pull requests.

Use cases

  • Search across all your GitHub repositories for specific code patterns or implementations
  • Create and manage issues and pull requests without switching to the browser
  • Read file contents from any repository to provide context for code generation
  • Automate branch creation, file pushes, and PR workflows from your editor
  • List and review recent commits to understand project history
  • Triage issues by reading, labeling, and commenting programmatically

Getting started

  1. Create a GitHub Personal Access Token at github.com/settings/tokens/new. Select the repo scope for full repository access, or use fine-grained tokens to limit access to specific repositories.
  2. Set the GITHUB_PERSONAL_ACCESS_TOKEN environment variable to your token value before running the MCP server.
  3. For organization repositories, ensure your token has the necessary org permissions. You may need to authorize the token for SSO-enabled organizations.
  4. The server uses the GitHub REST API under the hood, so standard rate limits apply. Authenticated requests get 5,000 requests per hour.