npm package discovery and stats viewer.

Discover Tips

  • General search

    [free text search, go nuts!]

  • Package details

    pkg:[package-name]

  • User packages

    @[username]

Sponsor

Optimize Toolset

I’ve always been into building performant and accessible sites, but lately I’ve been taking it extremely seriously. So much so that I’ve been building a tool to help me optimize and monitor the sites that I build to make sure that I’m making an attempt to offer the best experience to those who visit them. If you’re into performant, accessible and SEO friendly sites, you might like it too! You can check it out at Optimize Toolset.

About

Hi, 👋, I’m Ryan Hefner  and I built this site for me, and you! The goal of this site was to provide an easy way for me to check the stats on my npm packages, both for prioritizing issues and updates, and to give me a little kick in the pants to keep up on stuff.

As I was building it, I realized that I was actually using the tool to build the tool, and figured I might as well put this out there and hopefully others will find it to be a fast and useful way to search and browse npm packages as I have.

If you’re interested in other things I’m working on, follow me on Twitter or check out the open source projects I’ve been publishing on GitHub.

I am also working on a Twitter bot for this site to tweet the most popular, newest, random packages from npm. Please follow that account now and it will start sending out packages soon–ish.

Open Software & Tools

This site wouldn’t be possible without the immense generosity and tireless efforts from the people who make contributions to the world and share their work via open source initiatives. Thank you 🙏

© 2026 – Pkg Stats / Ryan Hefner

dual-review-mcp-workspace

v0.1.0

Published

Dual-Review MCP (Cursor + Claude Code)

Readme

Dual-Review MCP (Cursor + Claude Code)

Overview

This repository provides a production-grade MCP (Model Context Protocol) server for Cursor that performs a dual code review over the current Git diff:

  • Gets the current Git diff (staged by default)
  • Requests a JSON review from Cursor’s model (via a Cursor Project Rule)
  • Requests a second JSON review from Claude Code CLI (headless, JSON-only)
  • Merges both results into a single Markdown report and computes a 1–10 score

The scoring is severity-weighted and tuned for NestJS/Event-driven architectures.

Quickstart

  1. Install prerequisites
  • Node.js 18+ and pnpm 9+
  • Anthropic Claude Code CLI installed and ANTHROPIC_API_KEY set
  • Git repo with staged changes to review
  1. Install and build
pnpm i
pnpm lint
pnpm build
pnpm test
  1. Start MCP server (for local manual run)

This command runs the server over stdio. Normally Cursor launches this automatically based on .cursor/mcp.json.

pnpm start
  1. Configure Cursor

Cursor will pick up the MCP config from .cursor/mcp.json in this repo. Ensure the path to servers/dual-review/dist/index.js remains valid.

  1. Use the Project Rule

The rule in .cursor/rules/dual-review.mdc orchestrates the workflow inside Cursor chat: it fetches the Git diff, asks Cursor’s model for a JSON review, calls the MCP tool to ask Claude for a second JSON review, then merges and renders the combined report.

Workspace structure

.
├─ .cursor/
│  ├─ mcp.json
│  └─ rules/
│     └─ dual-review.mdc
├─ servers/
│  └─ dual-review/
│     ├─ src/
│     │  ├─ index.ts
│     │  ├─ merge.ts
│     │  ├─ constants.ts
│     │  └─ env.ts
│     ├─ test/
│     │  └─ merge.test.ts
│     ├─ package.json
│     ├─ tsconfig.json
│     └─ eslint.config.mjs
└─ README.md

Environment variables

  • ANTHROPIC_API_KEY must be set for the Claude Code CLI to work.
  • Optional:
    • DUAL_REVIEW_STDIO_MAX_BUFFER (bytes) to override default stdio buffer size (default: 10 MiB)
    • DUAL_REVIEW_DEFAULT_MODEL to set a default Claude model when not provided in the tool call

Running in Cursor

  1. Open this repository in Cursor
  2. Ensure MCP is enabled and the dual-review server is detected
  3. Trigger the project rule “Dual Review” from the chat or run it per your Cursor setup

Notes

  • The Claude CLI is invoked in non-interactive mode with JSON-only output. Make sure the CLI is on your PATH and authenticated.
  • The report’s weighting emphasizes security/correctness/reliability for NestJS/CQRS/event-driven stacks.

Tutorial: Using Dual-Review MCP in Cursor

  1. Prerequisites
  • Cursor (latest) with MCP enabled
  • Node 18+ and pnpm 9+
  • Claude Code CLI installed and ANTHROPIC_API_KEY set
  • A Git repo with staged changes
  1. Install and build
pnpm i
pnpm build
  1. Open in Cursor and verify MCP
  • Open the repo folder in Cursor
  • Check the Tools panel: you should see a server named dual-review with tools enabled
  • .cursor/mcp.json is already configured to launch servers/dual-review/dist/index.js
  1. Run the standard dual review (Cursor + Claude)
  • In Cursor chat, run the Project Rule “Dual Review” (from .cursor/rules/dual-review.mdc). The rule:
    • Fetches the staged git diff (dual-review:git_diff)
    • Asks Cursor’s model to produce a JSON review (schema enforced in the rule)
    • Calls dual-review:review_with_claude to get Claude’s JSON review
    • Calls dual-review:compare_reviews to compute score and render the Markdown report
  1. Reverse direction or other CLIs (Claude + Cursor/Codex/OpenAI)
  • Use the generic tool dual-review:review_with_command to run any CLI in JSON-only mode. Example:
Tool: dual-review:review_with_command
Args:
{
  "diff": "<your-diff-string>",
  "command": "cursor",             // or "codex" / "openai" / other
  "promptArgName": "-p",
  "outputJsonArgs": ["--output-format", "json"],
  "modelArgName": "--model",
  "model": "<model-id>",
  "extraArgs": []
}
  • Then pass the resulting JSON alongside Claude’s JSON into dual-review:compare_reviews.
  1. Local manual run (optional)
pnpm start

This starts the MCP stdio server; Cursor normally manages this automatically.

Troubleshooting

  • “claude: command not found”: ensure Claude CLI is installed and on PATH; ensure ANTHROPIC_API_KEY is set and valid.
  • “Invalid JSON” in reviews: re-run the reviewer step; the rule enforces a strict schema, so any deviation will be rejected.
  • “No issues found / empty diff”: ensure you have staged changes; try git add -p and re-run.
  • MCP server not visible in Cursor: close and reopen the project or reload MCP Tools; ensure .cursor/mcp.json path is valid.