Skip to main content
Glama
darenkeck-dev

PR Viewer MCP Server

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 dev

Related MCP server: GitHub Code Reviewer

Tools

Tool

Description

health_check

Confirms the server is reachable.

open_branch

Checks the working tree is clean, then creates a new branch.

open_review

Launches a diff visualizer and blocks until the user accepts or rejects.

open_branch

Parameter

Default

Description

repo_path

Absolute path to a git repo.

branch_name

Name for the new branch.

base_ref

main

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

repo_path

Absolute path to a git repo.

base_ref

main

The base git ref (e.g. main, origin/main).

head_ref

HEAD

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-viewer

Follow 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-mcp

This 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.sh

Creates ./toy-repo/ with a main branch and a feature/add-greet branch. To remove it when done:

./scripts/teardown-toy-repo.sh

2. Start the MCP inspector

uv run mcp dev src/devflow_mcp/server.py

Open 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 pytest

Available Tools

2 tools
health_checkA

Confirm the PR Viewer MCP server is running.

ParametersJSON Schema
NameRequiredDescriptionDefault

No parameters

Output Schema

ParametersJSON Schema
NameRequiredDescription
resultYes

TDQS

A3.9/5.0
Behavior2/5

Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?

No annotations are provided, so the description carries the full burden. It only states the purpose and does not disclose behavioral traits like read-only nature, side effects, or any constraints beyond what the name implies.

Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.

Conciseness5/5

Is the description appropriately sized, front-loaded, and free of redundancy?

The description is a single, front-loaded sentence with zero waste. Every word adds value.

Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.

Completeness5/5

Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?

For a simple health check with no parameters and an existing output schema, the description sufficiently conveys the tool's role. It does not need to explain return values because the output schema covers that.

Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.

Parameters4/5

Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?

The tool has zero parameters and schema coverage is 100%. With no parameters, the baseline is 4, and the description does not need to add parameter info.

Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.

Purpose5/5

Does the description clearly state what the tool does and how it differs from similar tools?

Description clearly states the tool confirms the server is running. Verb 'confirm' and resource 'PR Viewer MCP server' are specific, and the tool is distinct from sibling 'open_review'.

Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.

Usage Guidelines3/5

Does the description explain when to use this tool, when not to, or what alternatives exist?

The description implies usage for checking server health but does not explicitly state when to use vs alternatives or provide exclusions. Context suggests it's a prerequisite, but no direct guidance is given.

Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.

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".

ParametersJSON Schema
NameRequiredDescriptionDefault
repo_pathYes
base_refNomain
head_refNoHEAD

Output Schema

ParametersJSON Schema
NameRequiredDescription
resultYes

TDQS

A3.7/5.0
Behavior4/5

Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?

With no annotations provided, the description carries the full burden of behavioral disclosure. It accurately notes that the tool blocks until user action and returns 'accepted' or 'rejected', which are critical behavioral traits. However, it does not mention potential side effects or error conditions.

Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.

Conciseness5/5

Is the description appropriately sized, front-loaded, and free of redundancy?

The description is two sentences, front-loads the main action, and contains no extraneous information. Every sentence adds value.

Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.

Completeness4/5

Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?

Given the presence of an output schema and the tool's straightforward nature, the description covers key aspects: what the tool does, that it blocks, and what it returns. It could mention that it requires user interaction and potential timeouts, but is generally complete for a tool of this complexity.

Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.

Parameters1/5

Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?

The input schema has 0% description coverage for parameters, and the tool description adds no meaning beyond the parameter names. The description must compensate for the low schema coverage but fails to do so, leaving parameter semantics entirely to inference from names.

Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.

Purpose5/5

Does the description clearly state what the tool does and how it differs from similar tools?

The description clearly states the tool opens a diff visualizer for a given repo and refs, using specific verbs and resources. It distinguishes from the sibling 'health_check' tool, which has a different purpose.

Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.

Usage Guidelines3/5

Does the description explain when to use this tool, when not to, or what alternatives exist?

The description implies usage context by stating it blocks until user acceptance/rejection, but lacks explicit guidance on when to use this tool versus alternatives or prerequisites.

Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.

Tool Schema Changelog

Recent tool additions, removals, and schema changes observed during successful MCP inspections. Dates show when Glama detected each change.

  1. 2 tool updatesv0.1.0
    • First observedhealth_check
    • First observedopen_review

TDQS

A3.6/5.0
Disambiguation5/5

The two tools have completely distinct purposes: one checks server health, the other initiates a review workflow. There is no overlap or ambiguity.

Naming Consistency4/5

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.

Tool Count2/5

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.

Completeness1/5

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

ActivityStale
ResponsivenessNo issues

Resources

Unclaimed servers have limited discoverability.

Looking for Admin?

If you are the server author, to access and configure the admin panel.

Related MCP Connectors

Related MCP Servers

Latest Blog Posts

MCP directory API

We provide all the information about MCP servers via our MCP API.

curl -X GET 'https://glama.ai/api/mcp/v1/servers/darenkeck-dev/devflow-mcp'

If you have feedback or need assistance with the MCP directory API, please join our Discord server