npm package discovery and stats viewer.

Discover Tips

  • General search

    [free text search, go nuts!]

  • Package details

    pkg:[package-name]

  • User packages

    @[username]

Sponsor

Optimize Toolset

I’ve always been into building performant and accessible sites, but lately I’ve been taking it extremely seriously. So much so that I’ve been building a tool to help me optimize and monitor the sites that I build to make sure that I’m making an attempt to offer the best experience to those who visit them. If you’re into performant, accessible and SEO friendly sites, you might like it too! You can check it out at Optimize Toolset.

About

Hi, 👋, I’m Ryan Hefner  and I built this site for me, and you! The goal of this site was to provide an easy way for me to check the stats on my npm packages, both for prioritizing issues and updates, and to give me a little kick in the pants to keep up on stuff.

As I was building it, I realized that I was actually using the tool to build the tool, and figured I might as well put this out there and hopefully others will find it to be a fast and useful way to search and browse npm packages as I have.

If you’re interested in other things I’m working on, follow me on Twitter or check out the open source projects I’ve been publishing on GitHub.

I am also working on a Twitter bot for this site to tweet the most popular, newest, random packages from npm. Please follow that account now and it will start sending out packages soon–ish.

Open Software & Tools

This site wouldn’t be possible without the immense generosity and tireless efforts from the people who make contributions to the world and share their work via open source initiatives. Thank you 🙏

© 2026 – Pkg Stats / Ryan Hefner

pr-mcp

v1.0.1

Published

AI-powered GitHub PR creation MCP server for Cursor, Claude Desktop, Windsurf, etc.

Downloads

192

Readme

PR MCP

AI-powered GitHub PR creation for Cursor, Claude Desktop, Windsurf, and other MCP-compatible editors.

Why MCP?

Unlike the CLI version where you run commands manually, the MCP server lets your AI IDE directly create PRs:

You: "Create a PR for my changes"
Cursor: [analyzes diff, generates description, creates PR]
        ✅ PR created: https://github.com/you/repo/pull/42

No copy/paste. No switching windows. Just ask.

Quick Install

# Clone and install
git clone https://github.com/USER/pr-mcp.git
cd pr-mcp
npm install

# Or install globally
npm install -g pr-mcp

Setup for Cursor

Add to your Cursor MCP config (~/.cursor/mcp.json or project .cursor/mcp.json):

{
  "mcpServers": {
    "pr-mcp": {
      "command": "node",
      "args": ["/path/to/pr-mcp/index.js"]
    }
  }
}

Or if installed globally via npm:

{
  "mcpServers": {
    "pr-mcp": {
      "command": "npx",
      "args": ["pr-mcp"]
    }
  }
}

Restart Cursor after adding the config.

Setup for Claude Desktop

Add to Claude Desktop config:

macOS: ~/Library/Application Support/Claude/claude_desktop_config.json Windows: %APPDATA%\Claude\claude_desktop_config.json Linux: ~/.config/Claude/claude_desktop_config.json

{
  "mcpServers": {
    "pr-mcp": {
      "command": "node",
      "args": ["/path/to/pr-mcp/index.js"]
    }
  }
}

Setup for Windsurf / Continue / Others

Most MCP-compatible editors use similar config. Add the server with:

  • Command: node (or npx)
  • Args: path to index.js (or pr-mcp if installed via npm)

Available Tools

| Tool | Description | |------|-------------| | analyze_changes | Analyze git diff, commits, changed files | | generate_pr_description | Get context for AI to generate PR description | | create_pr | Create the GitHub PR | | preview_pr | Preview PR without creating | | get_repo_config | Show .pr-mcp.json settings |

Usage Examples

Basic PR Creation

You: Create a PR for my changes

AI: I'll analyze your changes and create a PR.
    [calls analyze_changes]
    [calls create_pr with generated description]
    
    ✅ PR Created!
    Title: [TK-1234] add user authentication
    URL: https://github.com/you/repo/pull/42

With Specific Options

You: Create a draft PR targeting main, add @alice as reviewer

AI: [calls create_pr with draft=true, target=main, reviewers=alice]
    ✅ Draft PR created...

Preview First

You: Show me what the PR would look like

AI: [calls preview_pr]
    ## PR Preview
    Title: [TK-1234] add user auth
    Branch: feature/tk-1234-auth → develop
    ...

Analyze Changes

You: What changes am I about to PR?

AI: [calls analyze_changes]
    ## Git Analysis
    Commits: 3
    - abc123 add login endpoint
    - def456 add auth middleware
    - ghi789 add tests
    ...

Per-Repo Configuration (Optional)

Create .pr-mcp.json in your repo root:

{
  "reviewers": ["alice", "bob"],
  "targetBranch": "main",
  "draft": false,
  "customPrompt": "Focus on security implications",
  "excludeFiles": ["package-lock.json"]
}

The MCP server automatically reads this and applies:

  • Default reviewers
  • Default target branch
  • Custom AI instructions
  • Draft PR by default

Requirements

  • Node.js >= 18
  • GitHub CLI (gh) installed and authenticated
  • Git repository with GitHub remote

How It Works

┌─────────────────┐
│   Your IDE      │
│ (Cursor/Claude) │
└────────┬────────┘
         │ MCP Protocol
         ▼
┌─────────────────┐
│  PR MCP Server  │
│  (this tool)    │
└────────┬────────┘
         │ Git + GitHub CLI
         ▼
┌─────────────────┐
│    GitHub       │
└─────────────────┘
  1. You ask your AI to create a PR
  2. AI calls MCP tools to analyze changes
  3. AI generates description based on diff
  4. AI calls create_pr tool
  5. Server uses gh CLI to create PR
  6. You get the PR URL

"Not in a git repository"

Make sure you have a file open from a git repository, or specify working_directory.

"gh: command not found"

Install GitHub CLI: https://cli.github.com/

Then authenticate: gh auth login

PR creation fails

Check:

# Is gh authenticated?
gh auth status

# Can you create PR manually?
gh pr create --help

License

MIT