Cette page est affichée en anglais. Une traduction française est en cours.
MCP ConfigsApr 6, 2026·2 min de lecture

GitHub MCP — Repository Management for AI Agents

Official GitHub MCP server that gives AI agents access to repos, issues, PRs, code search, and Actions. Create branches, review PRs, and manage projects via natural language. 5,000+ stars.

GitHub
GitHub · Community
Prêt pour agents

Staging sûr pour cet actif

Cet actif est d'abord staged. Le prompt copié demande à l'agent d'inspecter les fichiers staged avant d'activer scripts, config MCP ou config globale.

Stage only · 17/100Policy : staging
Surface agent
Tout agent MCP/CLI
Type
Mcp Config
Installation
Stage only
Confiance
Confiance : Community
Point d'entrée
GitHub MCP — Repository Management for AI Agents
Commande de staging sûr
npx -y tokrepo@latest install d6e7f6a5-0243-4507-b119-132ec9253843 --target codex

Stage les fichiers d'abord; l'activation exige la revue du README et du plan staged.

TL;DR
Official GitHub MCP server providing AI agents with access to repos, issues, PRs, code search, Actions, and project management.
§01

What it is

The GitHub MCP server is the official Model Context Protocol integration for GitHub. It gives AI agents access to repositories, issues, pull requests, code search, GitHub Actions, and project management through natural language commands.

The server exposes GitHub's API as MCP tools, allowing AI coding assistants like Claude Code to create branches, open pull requests, review code changes, manage issues, and trigger workflows without the developer switching to the GitHub UI.

§02

How it saves time or tokens

GitHub operations like creating a PR, adding reviewers, and linking issues involve multiple UI steps or API calls. The MCP server wraps these into single tool invocations that AI agents can execute as part of their workflow.

For AI-assisted development, the GitHub MCP server enables end-to-end workflows: an agent writes code, creates a branch, opens a PR, and links related issues, all in one session.

§03

How to use

  1. Configure the GitHub MCP server in Claude Code:
{
  "mcpServers": {
    "github": {
      "command": "npx",
      "args": ["-y", "@modelcontextprotocol/server-github"],
      "env": {
        "GITHUB_PERSONAL_ACCESS_TOKEN": "ghp_your_token_here"
      }
    }
  }
}
  1. Use natural language commands in Claude Code:
> Create a new branch called 'feature/auth' and open a PR with these changes
> List all open issues labeled 'bug' in the repository
> Review the latest PR and suggest improvements
  1. The agent uses GitHub MCP tools to execute these operations.
§04

Example

# Example MCP tool calls the agent makes:
# 1. create_branch(repo='myorg/myapp', branch='feature/auth')
# 2. create_pull_request(
#      repo='myorg/myapp',
#      title='Add user authentication',
#      body='Implements JWT-based auth...',
#      head='feature/auth',
#      base='main'
#    )
# 3. add_labels(repo='myorg/myapp', issue_number=42, labels=['enhancement'])
§05

Related on TokRepo

§06

Common pitfalls

  • Using a personal access token with too broad permissions. Create a fine-grained token with only the permissions the agent needs (repo, issues, pull requests).
  • Not reviewing agent-created PRs before merging. The agent can open PRs automatically, but human review is still essential for code quality and correctness.
  • Forgetting rate limits. GitHub API has rate limits (5,000 requests/hour for authenticated users). Heavy agent usage can hit these limits. Monitor usage and implement caching.
  • Failing to review community discussions and changelogs before upgrading. Breaking changes in major versions can disrupt existing workflows. Pin versions in production and test upgrades in staging first.

Questions fréquentes

What GitHub operations can the MCP server perform?+

The server supports repository browsing, file reading, branch creation, commit creation, pull request management, issue management, code search, and GitHub Actions workflow triggering. It covers most GitHub API operations that developers use regularly.

Is the GitHub MCP server official?+

Yes. The GitHub MCP server is maintained in the official Model Context Protocol organization on GitHub. It uses the standard GitHub API and requires a personal access token for authentication.

Can the agent review pull requests?+

Yes. The agent can read PR diffs, file changes, and comments. It can add review comments, approve or request changes, and suggest code modifications. Human review should still be the final gate before merging.

Does it support GitHub Actions?+

Yes. The MCP server can list, trigger, and check the status of GitHub Actions workflows. An agent can trigger a CI pipeline, wait for results, and report back within a single conversation.

What permissions does the token need?+

For most operations, the token needs repo (full repository access), issues (read/write), and pull requests (read/write) scopes. For GitHub Actions, add the workflow scope. Use fine-grained tokens to limit access to specific repositories.

Sources citées (3)
🙏

Source et remerciements

Created by Anthropic and GitHub. Licensed under MIT.

server-github — ⭐ 5,000+

Thanks for making GitHub a first-class MCP integration.

Fil de discussion

Connectez-vous pour rejoindre la discussion.
Aucun commentaire pour l'instant. Soyez le premier à partager votre avis.

Actifs similaires