mcpField
S
Swipr

Swipr

Local
github.com/nochinxxVersion Control1Updated 17w ago

About Swipr

SwiPR provides a swipe-based interface for reviewing GitHub pull requests and an MCP server that exposes PR context to agents. It combines heuristic risk scores with summaries, similar changes, contributor history, and test discovery.

Key features

  1. 01Swipe-based PR review
  2. 02Heuristic risk scores
  3. 03AI summaries and PR context
  4. 04Similar-change search
  5. 05Contributor history and test discovery
  6. 06Record review decisions

Use cases

  1. 01Triage open GitHub pull requests
  2. 02Check risk and related changes before merging
  3. 03Find tests covering changed files
  4. 04Review PR context from Claude Desktop or Cursor

MCP support

The MCP server exposes 12 tools for reading PR data, risk scores, related changes, contributor history, files, and tests, as well as recording review decisions and session summaries.

Configuration

Local server config is the same for every client. Copy it into your client’s MCP config file.

mcp.json · Universal config
{
"mcpServers": {
"SwiPR": {
"command": "npx",
"args": [
"-y",
"supergateway"
]
}
}
}
Run commandnpx -y supergateway

Local servers need a runtime on your machine (e.g. Node.js 18+). Config file locations differ by client; see your client’s docs.

Packages
npmsupergateway

Tools

No tool list yet

Local servers expose tools only once running on your machine, and the maintainer has not provided a tool list.

Details

From the project README

SwiPR

Swipe-to-review GitHub PRs with AI context. Works as a Claude MCP plugin.

Try the live demo → · Add to Claude Desktop ↓ · Listed on smithery.ai


Why this exists

Zeno Rocha (CEO of Resend) on X:

"the cost of opening a PR has dropped to zero. now, we have tons of draft PRs waiting for a finite (and ultra precious) resource: attention. turns out the bottleneck is no longer creation. it's reviewing." — Feb 2026

"before our main repo had an average of ~20–40 open PRs on any given day. now, we average ~130–200 open PRs." — May 2026

PR review is a context problem. Whether a maintainer is triaging or an AI agent is deciding whether to merge, the question is the same: is this safe to ship? Answering it well requires knowing the risk level, contributor history, similar past changes, and which tests cover the diff — not just reading the lines changed.

SwiPR surfaces that context as a swipe UI for humans and an MCP server for agents.


How it works

  1. Paste any public GitHub repo — SwiPR fetches open PRs and stores them with embeddings
  2. Swipe right to approve, left to request changes, down to skip — or use J / F / Space
  3. The right panel surfaces: risk score, AI summary, similar past PRs, contributor history
  4. Hit "Why is this risky?", "Show me callers", or "What tests cover this?" for deeper context on demand
  5. Ask anything in the chat — the AI has access to the full diff and codebase context

AI context is cached per PR — no repeated API calls on every card view.


MCP server

SwiPR exposes the same PR context as an MCP server. Add it to Claude Desktop or Cursor and review PRs directly from chat — no browser required.

Add to ~/Library/Application Support/Claude/claude_desktop_config.json:

{
  "mcpServers": {
    "swipr": {
      "command": "npx",
      "args": ["-y", "supergateway", "--streamableHttp", "https://v0-swipr-build.vercel.app/api/mcp"]
    }
  }
}

Then ask Claude:

  • "Look up resend/resend-node PR #1247 — what's the risk and are there similar past changes?"
  • "Which open PRs in vercel/next.js touch the router?"
  • "Find tests that cover the changed files in PR #892."

All 12 MCP tools are pure database reads — zero AI credits consumed when using the hosted server.

SwiPR is listed on smithery.ai and mcp.so.

Available tools
ToolWhat it returns
lookup_prResolve owner/repo#number → internal ID
analyze_prFull PR data: files, patches, risk score, contributor stats, cached AI summary
risk_score0–100 heuristic score with reasons
find_similar_changesPast PRs in the same repo with semantic similarity
get_contributor_historyPR count, merge rate, first contribution date
inspect_fileRaw file content at HEAD
find_callersSearch patches for usages of a function name
find_related_testsTest files that likely cover the changed code
git_blame_summaryRecent contributors to a file path
compare_withFile content at an arbitrary git ref
record_decisionCapture approve / changes / skip
summarize_sessionEnd-of-session stats

Bring your own AI key

The chat feature works with any of these free-tier providers — click the ⌘ button in the header and paste your key. It's stored in your browser's localStorage only, never sent to the server.

ProviderKey formatFree tier
Groqgsk_...Yes — Llama 3.3 70B
Google GeminiAIza...Yes — Gemini 2.0 Flash
Anthropicsk-ant-...Paid — Claude Sonnet 4.6

Customizing risk scoring

The risk heuristic lives entirely in lib/scoring.ts — plain TypeScript, no ML, no external calls. Edit it to match your team's standards.

Default rules:

SignalScore
Large diff (>500 lines)+20
Medium diff (200–500 lines)+10
Many files changed (>20)+15
Touches config/lock/CI files+20
No test files changed+10
Empty PR description+10
First-time contributor+15
New contributor (<3 prior PRs)+8
Low historical merge rate (<40%)+10

To add a rule, add an if block in computeRiskScore:

const touchesAuth = files.some((f) => f.filename.includes("lib/auth"));
if (touchesAuth) {
  score += 25;
  reasons.push("Touches auth module — requires security review");
}

Score is capped at 100. Color thresholds (green/yellow/red) are at 40 and 70 — adjust in app/swipe/_components/view-helpers.ts.


Self-hosting

Requires three services — all have free tiers.

1. Clone and install
git clone https://github.com/nochinxx/SwiPR.git
cd SwiPR
pnpm install
2. Create accounts
ServicePurposeFree tier
NeonPostgres + pgvector512 MB
Vercel AI GatewayClaude + embeddings$5 credits
GitHub PAT (optional)Higher API rate limitsFree
3. Configure environment
cp .env.example .env.local
DATABASE_URL=postgresql://...      # Neon pooled connection string
AI_GATEWAY_API_KEY=...             # Vercel AI Gateway key
GITHUB_TOKEN=...                   # Optional — raises GitHub rate limit to 5000/hr
4. Initialize the database
-- Run in Neon SQL editor
CREATE EXTENSION IF NOT EXISTS vector;
pnpm db:push
-- Add HNSW indexes for fast similarity search
CREATE INDEX IF NOT EXISTS prs_embedding_idx ON prs USING hnsw (embedding vector_cosine_ops);
CREATE INDEX IF NOT EXISTS pr_files_embedding_idx ON pr_files USING hnsw (embedding vector_cosine_ops);
5. Run and deploy
pnpm dev          # local dev
pnpm build        # verify before deploying
pnpm precache     # pre-load repos for a demo

Push to GitHub, connect to a Vercel project, set the same env vars in Vercel settings. Point your Claude Desktop config at your own deployment URL.


Storage limits

Neon's free tier holds ~512 MB. Each ingested PR uses ~100 KB. That's around 5,000 PRs or 40–50 mid-sized repos before needing an upgrade. Ingest is capped at 100 open PRs per repo.


Stack

  • Next.js 16 — App Router, React 19
  • Tailwind v4 + shadcn/ui — styling
  • Framer Motion — card animations
  • Neon Postgres + pgvector — PR storage and similarity search
  • Drizzle ORM — schema and queries
  • Vercel AI Gateway — Claude Sonnet 4.6 (analysis), text-embedding-3-small (vectors)
  • @ai-sdk/anthropic · @ai-sdk/google · @ai-sdk/groq — BYOK chat support
  • mcp-handler — MCP server at /api/mcp

Contributing

Issues and PRs welcome.

  • Stack is Next.js App Router + Drizzle + Neon + Vercel AI SDK — no other abstractions.
  • Risk scoring in lib/scoring.ts — heuristic improvements especially welcome.
  • Don't add GitHub OAuth or actual PR posting. Read-only access is intentional.
  • Run pnpm build before opening a PR.

Comments

Markdown supported

New to MCP?

From what the protocol is to installing your first server, these answers cover most first questions.

An open protocol that defines how AI applications connect to external tools and data in a uniform way. Clients talk to the model; MCP servers provide tools, resources and prompt templates. They exchange standard messages, so one server can be reused by many clients.