Back to Skill Directory

MCP Server

OfficialMost PopularMIT License

GitHub MCP Server

by GitHub · github.com/modelcontextprotocol/servers

GitHub MCP Server is the most widely adopted MCP integration in the ecosystem. It connects AI coding assistants like Claude Code, Cursor, and Codex CLI directly to the GitHub API, enabling agents to create issues, review pull requests, search code across repositories, manage branches, and read file contents — all through natural language without switching context.

For development teams, this means your AI assistant becomes a true GitHub-native collaborator. Instead of copy-pasting between your IDE and browser, the agent can read a bug report, locate the relevant code, draft a fix, and open a PR in a single conversational flow. It is the foundational MCP server that most developers install first.

40+
API Coverage
GitHub endpoints
5K/hr
Rate Limit
authenticated
<2min
Setup Time
npx one-liner
10+
Clients
Claude, Cursor...

Quick Install

claude mcp add github -- npx @modelcontextprotocol/server-github

Key Features

Issue Management

Create, read, update, and close issues. Add labels, assign reviewers, and comment on issues directly from your AI assistant.

Pull Request Workflows

Open PRs, review diffs, add comments, request changes, and merge — all through natural language commands in your coding session.

Code Search

Search across repositories, organizations, and code content using GitHub search syntax. Find files, functions, and patterns without leaving your editor.

Branch Management

Create, list, and delete branches. Check branch protection rules and compare branches for merge readiness.

File Operations

Read file contents, create new files, update existing files, and delete files in any repository your token can access.

Repository Insights

List repositories, check stars, forks, open issues count, recent commits, and contributor activity for project analysis.

Execution Brief

Use this page as a rollout checklist, not just reference text.

Suggest update

Tool Mapping Lens

Organize Tools by Workflow Phase

Catalog-oriented pages work best when users can map discovery, evaluation, and rollout in a clear path instead of reading an undifferentiated list.

  • Define the job-to-be-done first
  • Group tools by stage
  • Prioritize by adoption friction

Actionable Utility Module

Skill Implementation Board

Use this board for GitHub MCP Server before rollout. Capture inputs, apply one decision rule, execute the checklist, and log outcome.

Input: Objective

Deliver one measurable improvement with github mcp server claude code setup review

Input: Baseline Window

20-30 minutes

Input: Fallback Window

8-12 minutes

Decision TriggerActionExpected Output
Input: one workflow objective and release owner are definedRun preview execution with fixed acceptance criteria.Go or hold decision backed by repeatable evidence.
Input: output quality below baseline or retries increaseLimit scope, isolate root issue, and rerun controlled test.One confirmed correction path before wider rollout.
Input: checks pass for two consecutive replay windowsPromote to broader traffic with fallback path active.Stable rollout with low operational surprise.

Execution Steps

  1. Record objective, owner, and stop condition.
  2. Execute one controlled preview run.
  3. Measure quality, latency, and correction burden.
  4. Promote only when pass criteria are stable.

Output Template

tool=github mcp server claude code setup review
objective=
preview_result=pass|fail
primary_metric=
next_step=rollout|patch|hold

What Is GitHub MCP Server?

GitHub MCP Server is a Model Context Protocol integration that exposes the GitHub API as a set of tools accessible to AI coding assistants. It transforms your AI assistant from a code-only helper into a full development workflow partner that can interact with GitHub issues, pull requests, code search, and repository management without requiring manual context switching.

The server implements the MCP stdio transport protocol, meaning your client (Claude Code, Cursor, Codex CLI, VS Code) starts the server as a subprocess and communicates through structured JSON messages. Authentication uses a GitHub personal access token, and all operations respect the same permission boundaries as the GitHub API itself.

GitHub MCP Server is the single most popular MCP integration in the ecosystem, and for good reason — nearly every developer workflow touches GitHub at some point. Installing it is the equivalent of giving your AI assistant a GitHub account. It can triage incoming issues, review pull requests with contextual code understanding, create branches for new features, and push changes — all while you focus on the high-level decisions.

The competitive advantage over manual GitHub CLI usage is contextual awareness. The gh CLI requires you to type specific commands with exact flags. GitHub MCP Server lets the agent read an issue, understand the context, search for related code, and take action in a single conversational turn. The agent handles the API surface; you handle the intent.

How to Calculate Better Results with github mcp server claude code setup review

Install the server with Claude Code: claude mcp add github -- npx @modelcontextprotocol/server-github. For Cursor, add the server configuration to your .cursor/mcp.json file. For Codex CLI, run: codex mcp add github npx "@modelcontextprotocol/server-github".

Set your GitHub token as an environment variable: export GITHUB_PERSONAL_ACCESS_TOKEN=ghp_your_token_here. Create a fine-grained token at github.com/settings/tokens with the minimum required permissions for your workflow.

Verify the connection by asking your AI assistant to list your repositories or check recent issues. If the server is correctly configured, it will return real data from your GitHub account.

For team setups, each developer uses their own token. The MCP server runs locally on each machine and never stores tokens — it reads the environment variable on every startup. For CI environments, set the token as a secret in your pipeline configuration.

Treat this page as a decision map. Build a shortlist fast, then run a focused second pass for security, ownership, and operational fit.

When a team keeps one shared selection rubric, tool adoption speeds up because evaluators stop debating criteria every time a new option appears.

Worked Examples

Automated bug triage workflow

  1. Ask Claude: "Check the open issues in our repo that are labeled as bugs"
  2. Agent calls GitHub MCP to list issues with label:bug filter
  3. Agent summarizes each issue with severity assessment
  4. Ask: "The login timeout issue looks critical — assign it to me and add the P0 label"
  5. Agent updates the issue via MCP: adds P0 label, assigns your username
  6. Ask: "Create a branch fix/login-timeout and I will start working on it"
  7. Agent creates the branch via GitHub API and confirms it is ready

Outcome: A complete triage session executed through conversation. No browser tabs opened, no manual label clicking, no context switching. The agent handled all GitHub API interactions while you made the decisions.

Cross-repository code search and PR creation

  1. Ask: "Search all our repos for any usage of the deprecated validateToken function"
  2. Agent searches across organization repos via GitHub MCP code search
  3. Returns: found in 3 repositories, 7 files total
  4. Fix the code locally, then ask: "Open a PR with these changes, reference issue #234"
  5. Agent creates PR via MCP with the fix, links to the issue, and adds a descriptive body
  6. Ask: "Request review from the security team"
  7. Agent adds the security team as reviewers on the PR

Outcome: A multi-step development workflow from discovery to PR creation, executed without leaving your IDE. The agent coordinated search, context, and GitHub operations seamlessly.

Frequently Asked Questions

What is the GitHub MCP Server?

GitHub MCP Server is an official Model Context Protocol server that bridges AI coding assistants like Claude Code, Cursor, and Codex CLI to the GitHub API. It lets your agent create issues, open pull requests, review code diffs, search repositories, manage branches, and read file contents — all through natural language commands without switching to the GitHub UI.

How do I set up GitHub MCP Server with Claude Code?

Run: claude mcp add github -- npx @modelcontextprotocol/server-github. Then set your GITHUB_PERSONAL_ACCESS_TOKEN environment variable with a token that has repo scope. Claude Code will automatically detect the server and expose GitHub tools in your session.

What permissions does the GitHub token need?

At minimum, your personal access token needs the "repo" scope for full repository access (read/write issues, PRs, code). For organization repositories, you may also need "read:org". For fine-grained tokens, enable: Contents (read/write), Issues (read/write), Pull requests (read/write), and Metadata (read). Use the narrowest scope that covers your workflow.

Can I use GitHub MCP Server with private repositories?

Yes. As long as your personal access token has the "repo" scope, the MCP server can access all repositories your GitHub account can see — including private repos and organization repos. The server respects GitHub API permissions, so it cannot access anything your token cannot.

How does GitHub MCP Server compare to using the gh CLI directly?

The gh CLI is a standalone command-line tool you invoke manually. GitHub MCP Server integrates directly into your AI assistant, letting the agent read context, make decisions, and execute GitHub operations in a single conversational flow. For example, the agent can read a bug report, search the codebase for the relevant file, create a fix, and open a PR — all without you typing separate gh commands.

What are the rate limits for GitHub MCP Server?

GitHub MCP Server uses the standard GitHub API rate limits: 5,000 requests per hour for authenticated requests with a personal access token. For heavy automation workflows, monitor your rate limit headers. The server does not add any additional rate limiting beyond what GitHub enforces.

Missing a better tool match?

Send the exact workflow you are solving and we will prioritize a new comparison or rollout guide.