🔌

GitHub MCP

Interact with GitHub repositories, issues, pull requests, and actions

anthropic Repository January 15, 2025
npx @anthropic/mcp-github

The GitHub MCP server provides Claude with the ability to interact with GitHub repositories, issues, pull requests, and more.

Features

  • Repository Management: Create, clone, and manage repositories
  • Issues: Create, read, update, and close issues
  • Pull Requests: Create PRs, review changes, merge
  • Actions: Trigger and monitor GitHub Actions workflows
  • Code Search: Search across repositories

Installation

npx @anthropic/mcp-github

Configuration

Add to your Claude configuration:

{
  "mcpServers": {
    "github": {
      "command": "npx",
      "args": ["@anthropic/mcp-github"],
      "env": {
        "GITHUB_TOKEN": "your-github-token"
      }
    }
  }
}

Available Tools

create_issue

Create a new issue in a repository.

{
  "repo": "owner/repo",
  "title": "Bug: Login fails",
  "body": "Description of the issue",
  "labels": ["bug"]
}

create_pull_request

Create a pull request with changes.

{
  "repo": "owner/repo",
  "title": "Add new feature",
  "head": "feature-branch",
  "base": "main",
  "body": "Description of changes"
}

search_code

Search for code across repositories.

{
  "query": "function authenticate",
  "repo": "owner/repo"
}

Authentication

Generate a personal access token at GitHub Settings > Developer settings > Personal access tokens with appropriate scopes.