Skip to main content
Glama
README.md
# deltaprobe šŸ”

[![CI](https://github.com/Deepthi-04/deltaprobe/actions/workflows/ci.yml/badge.svg)](https://github.com/Deepthi-04/deltaprobe/actions/workflows/ci.yml)
[![npm](https://img.shields.io/npm/v/deltaprobe.svg)](https://www.npmjs.com/package/deltaprobe)
[![MCP Registry](https://img.shields.io/badge/MCP_Registry-io.github.Deepthi--04%2Fdeltaprobe-blue)](https://registry.modelcontextprotocol.io/v0.1/servers?search=deltaprobe)
[![License: MIT](https://img.shields.io/badge/license-MIT-blue.svg)](LICENSE)

> Give your AI assistant x-ray vision into pull requests.

**deltaprobe** is a [Model Context Protocol (MCP)](https://modelcontextprotocol.io) server that lets AI assistants like Claude, Cursor and VS Code Copilot probe GitHub pull requests: list them, read their diffs, summarize changes, flag risky patches and post review comments.

Available on [npm](https://www.npmjs.com/package/deltaprobe) and the [official MCP Registry](https://registry.modelcontextprotocol.io/v0.1/servers?search=deltaprobe) as `io.github.Deepthi-04/deltaprobe`.

## Tools

| Tool | Status | Description |
|---|---|---|
| `list_open_prs` | āœ… | List open PRs in a repo, most recently updated first |
| `summarize_pr` | āœ… | Overview of a PR: description, size, file types, most-touched areas, review status and CI results |
| `get_pr_diff` | āœ… | Fetch changed files and diff hunks, trimmed to whole hunks within a character budget |
| `check_pr_risk` | āœ… | Rule-based risk checks: secrets in added lines (masked), sensitive files, large diffs, missing tests, CI/migration/dependency changes, debug code |
| `post_review_comment` | āœ… | Post a review with inline comments; every line is checked against the diff first, with a `dryRun` preview |

## How it works

```
You: "Review PR #42 in acme/app"
        │
        ā–¼
AI assistant ──(MCP over stdio)──► deltaprobe ──► GitHub API
        ā–²                               │
        └──── structured PR data ā—„ā”€ā”€ā”€ā”€ā”€ā”€ā”˜
```

The assistant decides which deltaprobe tools to call, deltaprobe fetches and trims the data from GitHub, and the assistant writes the review.

## Quick start

### Prerequisites
- Node.js 20+ (22.12+ for development)
- A GitHub token ([create one](https://github.com/settings/personal-access-tokens)). Optional for reading public repos, but it raises the rate limit from 60 to 5,000 requests/hour. `post_review_comment` needs one with **Pull requests: Read and write** permission.

### Use with Claude Code

```bash
# public repos, read-only (no token)
claude mcp add deltaprobe -- npx -y deltaprobe

# with a token (higher rate limit, private repos, posting reviews)
claude mcp add deltaprobe -e GITHUB_TOKEN=<your-token> -- npx -y deltaprobe
```

### Use with Claude Desktop / Cursor

Add to your MCP config:

```json
{
  "mcpServers": {
    "deltaprobe": {
      "command": "npx",
      "args": ["-y", "deltaprobe"],
      "env": { "GITHUB_TOKEN": "<your-token>" }
    }
  }
}
```

Then ask: *"What are the open PRs in modelcontextprotocol/typescript-sdk?"*

## Development

```bash
git clone https://github.com/Deepthi-04/deltaprobe.git
cd deltaprobe
npm install
npm test          # run unit tests
npm run build     # compile TypeScript to dist/
npm run dev       # run the server from source
```

### Project structure

```
src/
ā”œā”€ā”€ index.ts          # MCP server entry: registers tools, connects over stdio
ā”œā”€ā”€ github.ts         # GitHub API client
ā”œā”€ā”€ diff.ts           # hunk splitting, budget fitting, commentable lines
ā”œā”€ā”€ files.ts          # file type and area classification
ā”œā”€ā”€ risk/rules.ts     # risk rules: each takes the PR's files and returns findings
└── tools/            # one file per tool
test/                 # vitest unit tests
```

## Roadmap

- [x] `list_open_prs`
- [x] `get_pr_diff` with smart truncation
- [x] `summarize_pr`
- [x] `check_pr_risk` rules
- [x] `post_review_comment`
- [x] CI on GitHub Actions
- [x] Publish to npm and the MCP Registry
- [ ] List on Smithery
- [ ] GitHub Action that reviews PRs automatically

## License

[MIT](LICENSE)

TDQS

A4.2/5.0

Scored across 5 tools

Disambiguation5/5

Each tool targets a distinct stage of PR review: listing (list_open_prs), overview metadata (summarize_pr), code content (get_pr_diff), heuristic risk scanning (check_pr_risk), and writing feedback (post_review_comment). Descriptions explicitly state sequencing and warn against confusing heuristics with actual code reading, leaving no ambiguity.

Naming Consistency5/5

All five names follow a consistent snake_case verb_noun pattern (list_, get_, summarize_, check_, post_) with a shared 'pr' domain noun. No mixed conventions or vague verbs.

Tool Count5/5

Five tools map cleanly onto a coherent review workflow with no redundancy or filler. Each tool covers a necessary and non-overlapping step from discovery to posting a review.

Completeness4/5

The surface covers the core review lifecycle: discover PRs, understand them, read diffs, assess risk, and post comments with inline feedback. Minor gaps remain around reading existing review threads/replies and retrieving CI log details, but agents can work around these.

Maintenance

ActivityMaintained
ResponsivenessNo recent community issues