All projects

MCP Server

ReviewLens MCP

An MCP server that gives AI coding assistants structured, deterministic facts about a GitHub pull request so they can judge merge-readiness before anyone reads the diff line by line.

TypeScriptNode.jsModel Context ProtocolOctokitZodVitest
In progress

The Problem

Every time I opened a PR, I'd ask Claude or my AI editor to review it — and get a response that was mostly guesswork. The AI had no idea how many files changed, whether tests were included, what the risk surface looked like, or whether the PR followed the team's standards. It was reasoning from the diff alone, which is like reading a building's blueprints without knowing which floor you're on.

I wanted the AI to start with facts, not inference.

What I Built

ReviewLens is a Model Context Protocol (MCP) server that exposes clean, rule-based PR data to whatever AI client is in use — Claude, Cursor, or any MCP-compatible editor. It never calls an LLM itself; it only supplies facts. All reasoning stays with the host AI.

Three MCP tools:

  • summarize_pr — File and line stats, risk flags (large diffs, no tests, config changes), author and timeline.
  • check_against_standards — Runs user-configurable rulesets (.reviewlens.json) checking for test-coverage gaps, TODO markers, naming drift, and swallowed errors.
  • generate_review_checklist — Produces a risk-driven checklist tailored to what actually changed in this PR.

Key Decisions

No LLM calls in the server. The whole point is to be a reliable fact source. The moment the server starts reasoning, it becomes another opinion layer on top of an opinion layer. Deterministic checks only.

Dual transport from one codebase. stdio for local use (Claude Desktop, Cursor), Streamable HTTP for anything that needs a network endpoint. Selected via env var or CLI flag — no separate builds.

User-configurable rulesets. A .reviewlens.json file in the repo lets teams define what "good" looks like for their codebase. The server enforces the team's rules, not mine.

Stack

TypeScript, Node.js, Octokit (GitHub API), Zod for schema validation, Vitest for testing. The MCP SDK handles protocol framing.