PR Viewer MCP Server
This server supports local Git development workflows with the following tools:
health_check: Confirm the server is running and reachable.open_review: Launch an external diff visualizer to compare changes between two Git refs in a given repository. The server blocks until the user accepts or rejects the changes, returning"accepted"or"rejected".repo_path(required): Absolute path to the Git repository.base_ref(optional, defaults tomain) andhead_ref(optional, defaults toHEAD): The refs to compare.
Provides tools for reviewing pull requests by launching a diff visualizer against a git repository and returning the review decision (accepted/rejected).
Click on "Deploy Server".
Wait a few minutes for the server to deploy. Once ready, it will show a "Started" state.
In the chat, type
@followed by the MCP server name and your instructions, e.g., "@PR Viewer MCP Server Review the diff between main and feature/add-greet in the current repo."
That's it! The server will respond to your query, and you can continue using it as needed.
Here is a step-by-step guide with screenshots.
Dev MCP Server
MCP server for local development workflows. Tools for branching and diff review, designed to be called by AI coding assistants.
Setup
uv sync --group devRelated MCP server: Universal Change Review
Tools
Tool | Description |
| Confirms the server is reachable. |
| Checks the working tree is clean, then creates a new branch. |
| Launches a diff visualizer and blocks until the user accepts or rejects. |
open_branch
Parameter | Default | Description |
| — | Absolute path to a git repo. |
| — | Name for the new branch. |
|
| Ref to branch from. |
Returns "Created branch '<name>' from <base_ref>" on success, or an error
string describing why it failed (dirty tree, branch already exists, bad ref).
open_review
Parameter | Default | Description |
| — | Absolute path to a git repo. |
|
| The base git ref (e.g. |
|
| The head ref to diff against base (branch name, commit SHA, etc.). |
Blocks until the user finishes reviewing. Returns "accepted" or "rejected".
Wiring in a visualizer
Create a shell script that receives the repo context via env vars, launches the visualizer, captures the user's decision, and signals the result back to the server via the provided IPC path:
#!/usr/bin/env bash
# Env vars provided by the server:
# REPO_PATH – absolute path to the git repo
# BASE_REF – base ref (e.g. main)
# HEAD_REF – head ref (e.g. feature/add-greet)
# RESULT_PATH – IPC path the script writes "accepted" or "rejected" to
# launch your visualizer, capture the decision, then signal the result:
echo "accepted" > "$RESULT_PATH"The default visualizer (scripts/launch-octorus.sh) opens octorus in a new
terminal window and prompts accept/reject after the user quits.
Connecting to AI coding assistants
Claude Code
Add to ~/.claude/mcp.json (global) or .mcp.json at a project root:
{
"mcpServers": {
"devflow": {
"command": "uv",
"args": ["run", "--directory", "/path/to/pr-viewer", "devflow-mcp"]
}
}
}OpenCode
opencode mcp add pr-viewerFollow the prompts: choose stdio, set command to uv, args to
run --directory /path/to/pr-viewer devflow-mcp. This writes to
~/.config/opencode/opencode.jsonc.
Codex
codex mcp add pr-viewer -- uv run --directory /path/to/pr-viewer devflow-mcpThis writes to ~/.codex/config.toml.
Example prompts
Create a branch called feature/add-login in /path/to/repo from main.Open a review of feature/add-greet in /path/to/repo against main.
If it's accepted, merge it with `gh pr merge --merge`.
If it's rejected, post a comment explaining what needs to change.Manual end-to-end test with a toy repo
1. Create the toy repo
./scripts/setup-toy-repo.shCreates ./toy-repo/ with a main branch and a feature/add-greet branch.
To remove it when done:
./scripts/teardown-toy-repo.sh2. Start the MCP inspector
uv run mcp dev src/devflow_mcp/server.pyOpen the inspector URL printed in the terminal (default: http://localhost:5173).
3. Test open_branch
In the MCP inspector, select open_branch and fill in:
{
"repo_path": "<absolute-path-to-project>/toy-repo",
"branch_name": "test-branch"
}4. Test open_review
Select open_review and fill in:
{
"repo_path": "<absolute-path-to-project>/toy-repo",
"base_ref": "main",
"head_ref": "feature/add-greet"
}The tool blocks — the inspector shows a spinner until the review is complete. A terminal window opens automatically; answer the accept/reject prompt when you quit octorus.
Programmatic use
import asyncio
from mcp.client.stdio import stdio_client, StdioServerParameters
from mcp.client.session import ClientSession
async def main() -> None:
server = StdioServerParameters(
command="uv",
args=["run", "--directory", "/path/to/pr-viewer", "devflow-mcp"],
)
async with stdio_client(server) as (read, write):
async with ClientSession(read, write) as session:
await session.initialize()
await session.call_tool("open_branch", {
"repo_path": "/path/to/repo",
"branch_name": "feature/my-feature",
})
result = await session.call_tool("open_review", {
"repo_path": "/path/to/repo",
"base_ref": "main",
"head_ref": "feature/my-feature",
})
print(result.content[0].text) # "accepted" or "rejected"
asyncio.run(main())Tests
uv run pytestAvailable Tools
2 toolshealth_checkA
Confirm the PR Viewer MCP server is running.
Inputs: no named parameters. Returns: result
open_reviewA
Open the diff visualizer for the given repo and refs.
Blocks until the user accepts or rejects the diff in the visualizer. Returns "accepted" or "rejected".
Inputs: repo_path (required), base_ref, head_ref. Returns: result
Tool Schema Changelog
Recent tool additions, removals, and schema changes observed during successful MCP inspections.
Loading tool schema changelog…
TDQS
Scored across 2 tools
The two tools have completely distinct purposes: one checks server health, the other initiates a review workflow. There is no overlap or ambiguity.
Both names use snake_case, but 'health_check' is a noun phrase while 'open_review' is a verb phrase, creating a minor inconsistency in grammatical pattern.
Only two tools for a 'PR Viewer' server is very thin. The scope appears limited, and typical MCP servers offer more operations for meaningful interaction.
The server lacks essential tools for a PR viewer, such as listing PRs, viewing details, or commenting. Only a health check and a single review tool are provided, leaving major gaps.
Maintenance
Related MCP Connectors
Review Happo's visual and accessibility diffs: inspect comparisons, accept or reject, report flakes.
Live PR/MR code reviews via review_url_code. OAuth or portal Bearer auth.
Screens public GitHub repos and PRs to generate risk maps, findings, and merge-readiness signals.
Git-native policy layer for AI agents: check_action verdicts against rules approved via PR.
Related MCP Servers
AlicenseNot gradedqualityDmaintenanceEnables AI-powered code review of Git diffs through natural language, supporting multiple AI models and Git workflows.28 PyPI36Apache 2.0- AlicenseNot gradedqualityDmaintenanceA local, read-only Git change review tool that provides total workspace diffs, staged/unstaged views, file-level inspection, and task-scoped snapshots for MCP-compatible clients like Codex, Claude Code, and Cursor.MIT
- AlicenseAqualityBmaintenanceEnables code-review gating by converting a git diff into a typed verdict with safety probabilities, severity, and recommended actions for auto-merge or human review.11MIT
- AlicenseAqualityBmaintenanceEnables humans to review AI-generated code changes through a GUI: agents freeze git diffs and add findings/diagrams, while reviewers annotate and save decisions returned as an exact correction prompt.17320 npmISC