mcp servers · featured

GitHub MCP Server

Official GitHub MCP server by GitHub. Gives your agent access to repositories, issues, pull requests, code search, and GitHub Actions — authenticated via personal access token.
★ 8.9k ↓ 31.0k installs by GitHub updated Apr 1, 2025 MIT
← back to shelf
install via your agent of choice
npx -y @github/github-mcp-server

## what it does

What it does

The GitHub MCP server gives your AI agent direct programmatic access to GitHub. Your agent can read code, open issues, create pull requests, search repositories, and commit files — all through natural language.

This is GitHub’s official MCP server, published by GitHub, Inc.

Installation

# Requires a GitHub Personal Access Token
# Set it as an environment variable:
export GITHUB_PERSONAL_ACCESS_TOKEN=ghp_...

# Run via npx:
npx -y @github/github-mcp-server

Claude Desktop configuration

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

Token scopes required

Your PAT needs the following scopes depending on what you want your agent to do:

ScopePurpose
repoRead/write private repositories
public_repoRead/write public repositories
read:orgList organization repos
workflowTrigger GitHub Actions

Use a fine-grained PAT scoped to specific repositories for production use.

Key capabilities

  • Code read: get_file_contents retrieves file content at any ref
  • Search: search_code and search_repositories use GitHub’s search API
  • Issues: Create, list, get, comment on issues
  • Pull requests: Open PRs, read diffs, list reviews
  • Commits: List and inspect commits, push file changes

Rate limits

GitHub’s REST API allows 5,000 requests/hour for authenticated requests. Heavy agentic workflows (many search_code calls) can hit this limit — plan your agent’s usage accordingly.

## compatibility

claude-desktop
claude-code
cline
cursor

## exposed tools

get_file_contents
search_repositories
create_repository
get_issue
create_issue
list_issues
create_pull_request
get_pull_request
list_pull_requests
create_or_update_file
push_files
search_code
list_commits
get_commit

## embed this badge

cache ✓ in cache.directory
![cached](https://cache.directory/badge/github-mcp.svg)