# github-pr-automation [Health: Active]

**Category:** 🔄 Version Control  
**Repository:** https://github.com/jmalicki/github-pr-automation-mcp  
**GitHub Stars:** 0  
**Views:** 0  
**Installs:** 0  
**Upvotes:** 0  
**Directory Page:** https://allmcps.com/mcp/github-pr-automation

## Description
MCP server and CLI for automated GitHub PR management, review resolution, and workflow optimization

## Claude Desktop Quick Installation
No generated config for this server: it installs through its own setup steps.

The project's own setup steps (from https://github.com/jmalicki/github-pr-automation-mcp), copied verbatim. Run them in order; they are not an mcpServers config.

1. Install:

```sh
git clone https://github.com/jmalicki/github-pr-automation-mcp.git
```

2. Install:

```sh
cd github-pr-automation-mcp
```

3. Install:

```sh
npm install && npm run build
```

4. Install:

```sh
npm run install:cli:npm-link
```

5. Install:

```sh
npm install
```

6. Run:

```sh
npm run build
```

## Documentation

## What github-pr-automation MCP server does

github-pr-automation coordinates common GitHub pull request maintenance tasks through MCP tools and a companion CLI. It works with PR identifiers in the `owner/repository#number` format and uses a GitHub token to access repository and pull request data.

Its main workflows include inspecting failed CI tests, finding unresolved review conversations, managing dependencies between stacked pull requests, checking merge conflicts, validating merge readiness, rebasing after an upstream squash merge, and resolving individual review threads. Review analysis can extract actionable suggestions from review bodies, including comments produced by tools such as CodeRabbit.

## How it works

The MCP implementation communicates over stdio rather than HTTP. An MCP client starts the compiled Node.js process as a subprocess and exchanges JSON-RPC messages through standard input and output. It does not open a port or run as a persistent daemon.

The server uses GitHub API clients for pull request and review operations. Git is required for stacked PR workflows and related rebase operations. The CLI provides direct access to the same operations and can emit JSON for scripts, CI/CD pipelines, or other analysis tools.

## Setup and configuration

Node.js 20 or newer is required, and the project is configured around Node.js 22 LTS. Git must also be available for operations that manipulate local history or stacked pull requests.

Build the project from its repository with:

```bash
npm install
npm run build
```

Set `GITHUB_TOKEN` in the environment. The documented token permissions include `repo` for private repository control and `read:org` for organization membership access. The server can also read this value from a `.env` file when used through the CLI.

For MCP use, configure the client to launch `node` with the path to `dist/index.js`, and pass `GITHUB_TOKEN` in the process environment. The CLI can be installed with the project's npm-link, global, or interactive installer commands.

## Tools and capabilities

- `get_failing_tests` reads failed PR checks and returns targeted fix guidance. It can wait for CI, stop at the first failure, and paginate large result sets.
- `find_unresolved_comments` locates unresolved review comments and conversations, optionally includes bot comments, extracts suggestions, and produces response commands. Results support pagination and sorting.
- `manage_stacked_prs` checks dependency chains, identifies changes that need propagation, creates rebase or automation commands, and can connect test failures to automated fix loops.
- `detect_merge_conflicts` checks for conflicts before merging, reports affected files, and suggests resolution approaches.
- `check_merge_readiness` evaluates CI, approvals, branch protection, and other merge requirements, then reports missing conditions.
- `rebase_after_squash_merge` uses a `git rebase --onto` strategy to skip commits represented by an upstream squash merge and rebase only the dependent work.
- `resolve_review_thread` resolves a review thread or comment using its GraphQL node ID, with support for choosing a preferred target when both are supplied.

## Limitations and notes

The server is designed for GitHub pull request workflows and requires a token with suitable repository permissions. MCP operation depends on a client that can launch stdio servers. Stacked PR and rebase features additionally depend on Git being installed and on the local repository state being suitable for the requested operation. Tool inputs include pagination and behavior options, so large check or review result sets may need multiple requests.

_Full upstream README: https://allmcps.com/mcp/github-pr-automation/readme_

