All How-To Guides

3 Ways to Create Pull Requests with Claude Code

How to create pull requests with Claude Code?

3 MCP servers featured

Creating and managing pull requests is a core development workflow. While Claude Code can run git commands directly, MCP servers provide richer GitHub integration for creating PRs, adding reviewers, and managing the full PR lifecycle. Here are the best options for PR automation.

Recommended MCP Servers

GitHub MCP Server

github/github-mcp-server

>25k

Official GitHub server for full repository management including PRs, issues, code review, and Actions.

Key Features

  • Create and manage pull requests
  • Add reviewers and labels
  • Merge and close PRs
  • Full GitHub API access

Installation

Remote server: https://api.githubcopilot.com/mcp/

The official GitHub MCP Server is the definitive choice for PR management. Create PRs, request reviews, respond to comments, and merge—all through Claude. The remote server means zero local setup, just OAuth authentication.

Best for: Full PR workflow automation View on GitHub

Git MCP Server (Anthropic)

anthropics/mcp-server-git

>2k

Official git integration for repository operations, commits, branches, and diffs.

Key Features

  • Git operations (commit, branch, diff)
  • Repository status and history
  • Official Anthropic support
  • Works with any git remote

Installation

npx @modelcontextprotocol/server-git

The official Git MCP handles the git operations that precede PR creation: committing changes, creating branches, viewing diffs. Use this alongside the GitHub MCP for a complete workflow from code to PR.

Best for: Git operations before PR creation View on GitHub

Serena

oraios/serena

>500

AI-powered code review and PR management with semantic understanding of code changes.

Key Features

  • Semantic code understanding
  • Automated PR descriptions
  • Code review assistance
  • Change impact analysis

Installation

See GitHub for setup

Serena adds AI intelligence to the PR process. It can generate meaningful PR descriptions based on actual code changes and assist with code review by understanding the semantic impact of changes.

Best for: Automated code review View on GitHub

Quick Comparison

MCPStarsBest ForProsCons
GitHub MCP>25kFull PR workflowOfficial, complete APIGitHub only
Git MCP>2kGit operationsAny git providerNo PR creation
Serena>500AI-enhanced PRsSmart descriptionsAdditional setup

Getting Started

To create pull requests with Claude Code:

  1. Set up GitHub MCP for PR management:

    {
      "mcpServers": {
        "github": {
          "type": "http",
          "url": "https://api.githubcopilot.com/mcp/"
        }
      }
    }
    
  2. Authenticate via OAuth when prompted.

  3. Ask Claude to create PRs with context:

Example prompt: "Create a pull request for my current branch with a description summarizing the changes I made to the authentication system."

Related Guides