pr-mcp-server

pr-mcp-server

MCP server to automate Pull Request creation with AI. Analyzes Git branches, generates descriptions, titles, suggests reviewers, and performs code reviews.

Category
Visit Server

README

pr-mcp-server

MCP (Model Context Protocol) server to automate Pull Request creation with AI. Analyzes Git branches, generates descriptions, titles, suggests reviewers, and performs code reviews. Designed to speed up reviews and improve PR quality.

✨ Features

  • πŸš€ Unified PR Workflow - Complete PR creation with one command ("Create a PR")
  • 🧠 AI-Powered Code Review - Context-aware review integrated into PR description
  • πŸ” Project Context Analysis - Detects TypeScript, i18n, state management, styling, testing frameworks
  • πŸ“ PR Generation - Generate PR descriptions (standard, detailed, minimal templates | EN/FR)
  • 🏷️ Conventional Titles - Generate conventional PR titles (feat, fix, docs, etc.)
  • 🎨 Smart GIFs - Automatically adds relevant GIFs based on work type
  • πŸ‘₯ Auto Reviewers - Suggest and add reviewers based on contribution history
  • πŸ”Ž Code Review - Automated code review with actionable feedback
  • πŸ€– AI-Ready - Works with MCP Inspector, Cursor, and Claude Desktop

πŸ“š Documentation

πŸš€ Quick Start

Requirements

  • Node.js 18+
  • A Git repository

Installation

Local development:

npm install
npm run build

Global installation (recommended):

npm link

This makes the pr-mcp-server command available globally.

Test with MCP Inspector

After npm link, run:

npx @modelcontextprotocol/inspector pr-mcp-server

The Inspector will list all available tools. Run it inside a Git repository for full functionality.

Use with Cursor

Add to ~/.cursor/mcp.json:

{
  "mcpServers": {
    "pr-mcp-server": {
      "command": "pr-mcp-server",
      "cwd": "{workspaceFolder}"
    }
  }
}

Restart Cursor, then ask:

  • "Create a PR" - Uses the unified workflow (recommended)
  • "GΓ©nΓ¨re le titre de ma PR"
  • "Analyse ma branche et gΓ©nΓ¨re la description de la PR"
  • "CrΓ©e une PR sur GitHub avec des reviewers"

See Configuration Guide for more details.

🎯 Unified PR Creation Workflow (AI-Powered)

When you say "Create a PR", Claude (the AI) orchestrates an intelligent workflow:

How It Works

  1. Call review tool - Gathers comprehensive project context:

    • Detects language/framework (TypeScript, PHP, Python, Go, Rust, etc.)
    • Identifies technologies (i18n, state management, styling, testing)
    • Extracts full diff and commit history
    • Returns structured prompt with all context
  2. Claude analyzes and generates review - True AI-powered analysis:

    • Understands project conventions automatically
    • Identifies issues specific to YOUR tech stack
    • Provides intelligent, context-aware suggestions
    • Works for ANY language/framework (not just TypeScript!)
  3. Call create_pr_complete with review - Creates complete PR:

    • Generates conventional commit-style title
    • Creates comprehensive description
    • Includes Claude's intelligent review
    • Adds smart GIF based on PR type
    • Creates/updates GitHub PR
    • Assigns reviewers from Git history

What Makes It Intelligent

Unlike rule-based tools, this uses Claude's intelligence to:

  • βœ… Adapt to ANY project (PHP Laravel, Python Django, Go, Rust, etc.)
  • βœ… Understand complex patterns and context
  • βœ… Provide project-specific recommendations
  • βœ… Detect violations of YOUR project's conventions

Example: In a PHP Laravel project, it will flag SQL injection vulnerabilities and suggest Eloquent ORM. In a React i18n project, it will catch hardcoded strings. All automatically!

Example Usage

# In Cursor or Claude Desktop, simply say:
"Create a PR"

# Claude will automatically:
# 1. Call 'review' to get project context
# 2. Analyze the context and generate intelligent review
# 3. Call 'create_pr_complete' with the review
# 4. Return the PR URL

# With specific options:
"Create a PR in English with the detailed template"
"Create a draft PR without reviewers"

See AI_POWERED_REVIEW.md for technical details on how the AI review works.

πŸ› οΈ Available Tools

Tool Description Recommended
create_pr_complete πŸš€ Unified workflow - Complete PR creation with AI review ⭐ YES
create_pr Create PR on GitHub with auto-reviewers (no AI review)
analyze_branch Analyze differences between branches
generate_pr_title Generate conventional PR title
generate_pr_description Generate PR description
generate_pr_complete Generate both title and description
suggest_reviewers Suggest reviewers based on Git history
review Automated code review (context-aware)

Recommendation: Use create_pr_complete for the best experience. It combines all features with intelligent, context-aware code review.

See Tools Reference for detailed documentation.

πŸ“¦ Useful Scripts

npm run build        # Compile TypeScript to dist/
npm start            # Start the MCP server
npm test             # Run tests
npm run test:watch   # Run tests in watch mode
npm run test:ui      # Run tests with UI
npm run dev          # Run in development mode

πŸ› Troubleshooting

  • "Not a git repository": Run the server inside a Git repo
  • ESM import issues: Use Node 18+ and build the project (npm run build)
  • Permission errors: Ensure your shell has access to the repo
  • "GitHub token is required": Set GITHUB_TOKEN environment variable
  • "Branch does not exist on remote": Push your branch first

See GitHub Integration for more troubleshooting.

πŸ“„ License

MIT

Recommended Servers

playwright-mcp

playwright-mcp

A Model Context Protocol server that enables LLMs to interact with web pages through structured accessibility snapshots without requiring vision models or screenshots.

Official
Featured
TypeScript
Magic Component Platform (MCP)

Magic Component Platform (MCP)

An AI-powered tool that generates modern UI components from natural language descriptions, integrating with popular IDEs to streamline UI development workflow.

Official
Featured
Local
TypeScript
Audiense Insights MCP Server

Audiense Insights MCP Server

Enables interaction with Audiense Insights accounts via the Model Context Protocol, facilitating the extraction and analysis of marketing insights and audience data including demographics, behavior, and influencer engagement.

Official
Featured
Local
TypeScript
VeyraX MCP

VeyraX MCP

Single MCP tool to connect all your favorite tools: Gmail, Calendar and 40 more.

Official
Featured
Local
graphlit-mcp-server

graphlit-mcp-server

The Model Context Protocol (MCP) Server enables integration between MCP clients and the Graphlit service. Ingest anything from Slack to Gmail to podcast feeds, in addition to web crawling, into a Graphlit project - and then retrieve relevant contents from the MCP client.

Official
Featured
TypeScript
Kagi MCP Server

Kagi MCP Server

An MCP server that integrates Kagi search capabilities with Claude AI, enabling Claude to perform real-time web searches when answering questions that require up-to-date information.

Official
Featured
Python
E2B

E2B

Using MCP to run code via e2b.

Official
Featured
Neon Database

Neon Database

MCP server for interacting with Neon Management API and databases

Official
Featured
Qdrant Server

Qdrant Server

This repository is an example of how to create a MCP server for Qdrant, a vector search engine.

Official
Featured
Exa Search

Exa Search

A Model Context Protocol (MCP) server lets AI assistants like Claude use the Exa AI Search API for web searches. This setup allows AI models to get real-time web information in a safe and controlled way.

Official
Featured