{"slug": "built-swipr-swipe-to-review-github-prs-with-ai-context", "title": "Built SwiPR – swipe-to-review GitHub PRs with AI context", "summary": "A developer has built SwiPR, a tool that transforms GitHub pull request review into a swipe-based interface with AI context, addressing the bottleneck of PR review in an era of increased code creation. The tool, which works as a Claude MCP plugin, surfaces risk scores, contributor history, and similar past changes to help maintainers and AI agents determine whether code is safe to ship. SwiPR is available as a web demo and can be integrated into Claude Desktop or Cursor for reviewing PRs directly from chat without a browser.", "body_md": "**Swipe-to-review GitHub PRs with AI context. Works as a Claude MCP plugin.**\n\n[Try the live demo →](https://v0-swipr-build.vercel.app) · [Add to Claude Desktop ↓](#mcp-server) · [Listed on smithery.ai](https://smithery.ai/server/mariojillesca/swipr)\n\n## swipr_demo_small.mp4\n\nZeno Rocha (CEO of [Resend](https://resend.com)) on X:\n\n\"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\n\n\"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\n\nPR 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.\n\nSwiPR surfaces that context as a swipe UI for humans and an MCP server for agents.\n\n- Paste any public GitHub repo — SwiPR fetches open PRs and stores them with embeddings\n- Swipe right to approve, left to request changes, down to skip — or use\n`J`\n\n/`F`\n\n/`Space`\n\n- The right panel surfaces: risk score, AI summary, similar past PRs, contributor history\n- Hit\n**\"Why is this risky?\"**,**\"Show me callers\"**, or**\"What tests cover this?\"** for deeper context on demand - Ask anything in the chat — the AI has access to the full diff and codebase context\n\nAI context is cached per PR — no repeated API calls on every card view.\n\nSwiPR 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.\n\nAdd to `~/Library/Application Support/Claude/claude_desktop_config.json`\n\n:\n\n```\n{\n  \"mcpServers\": {\n    \"swipr\": {\n      \"command\": \"npx\",\n      \"args\": [\"-y\", \"supergateway\", \"--streamableHttp\", \"https://v0-swipr-build.vercel.app/api/mcp\"]\n    }\n  }\n}\n```\n\nThen ask Claude:\n\n*\"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.\"*\n\n**All 12 MCP tools are pure database reads — zero AI credits consumed when using the hosted server.**\n\nSwiPR is listed on [smithery.ai](https://smithery.ai/server/mariojillesca/swipr) and [mcp.so](https://mcp.so/server/swipr/nochinxx).\n\n| Tool | What it returns |\n|---|---|\n`lookup_pr` |\nResolve `owner/repo#number` → internal ID |\n`analyze_pr` |\nFull PR data: files, patches, risk score, contributor stats, cached AI summary |\n`risk_score` |\n0–100 heuristic score with reasons |\n`find_similar_changes` |\nPast PRs in the same repo with semantic similarity |\n`get_contributor_history` |\nPR count, merge rate, first contribution date |\n`inspect_file` |\nRaw file content at HEAD |\n`find_callers` |\nSearch patches for usages of a function name |\n`find_related_tests` |\nTest files that likely cover the changed code |\n`git_blame_summary` |\nRecent contributors to a file path |\n`compare_with` |\nFile content at an arbitrary git ref |\n`record_decision` |\nCapture approve / changes / skip |\n`summarize_session` |\nEnd-of-session stats |\n\nThe chat feature works with any of these free-tier providers — click the `⌘`\n\nbutton in the header and paste your key. It's stored in your browser's localStorage only, never sent to the server.\n\n| Provider | Key format | Free tier |\n|---|---|---|\n|\n\n`gsk_...`\n\n[Google Gemini](https://aistudio.google.com/apikey)`AIza...`\n\n[Anthropic](https://console.anthropic.com/settings/keys)`sk-ant-...`\n\nThe risk heuristic lives entirely in [ lib/scoring.ts](/nochinxx/SwiPR/blob/main/lib/scoring.ts) — plain TypeScript, no ML, no external calls. Edit it to match your team's standards.\n\nDefault rules:\n\n| Signal | Score |\n|---|---|\n| Large diff (>500 lines) | +20 |\n| Medium diff (200–500 lines) | +10 |\n| Many files changed (>20) | +15 |\n| Touches config/lock/CI files | +20 |\n| No test files changed | +10 |\n| Empty PR description | +10 |\n| First-time contributor | +15 |\n| New contributor (<3 prior PRs) | +8 |\n| Low historical merge rate (<40%) | +10 |\n\nTo add a rule, add an `if`\n\nblock in `computeRiskScore`\n\n:\n\n``` js\nconst touchesAuth = files.some((f) => f.filename.includes(\"lib/auth\"));\nif (touchesAuth) {\n  score += 25;\n  reasons.push(\"Touches auth module — requires security review\");\n}\n```\n\nScore is capped at 100. Color thresholds (green/yellow/red) are at 40 and 70 — adjust in [ app/swipe/_components/view-helpers.ts](/nochinxx/SwiPR/blob/main/app/swipe/_components/view-helpers.ts).\n\nRequires three services — all have free tiers.\n\n```\ngit clone https://github.com/nochinxx/SwiPR.git\ncd SwiPR\npnpm install\n```\n\n| Service | Purpose | Free tier |\n|---|---|---|\n|\n\n[Vercel AI Gateway](https://vercel.com/ai-gateway)\n\n```\ncp .env.example .env.local\nDATABASE_URL=postgresql://...      # Neon pooled connection string\nAI_GATEWAY_API_KEY=...             # Vercel AI Gateway key\nGITHUB_TOKEN=...                   # Optional — raises GitHub rate limit to 5000/hr\n-- Run in Neon SQL editor\nCREATE EXTENSION IF NOT EXISTS vector;\npnpm db:push\n-- Add HNSW indexes for fast similarity search\nCREATE INDEX IF NOT EXISTS prs_embedding_idx ON prs USING hnsw (embedding vector_cosine_ops);\nCREATE INDEX IF NOT EXISTS pr_files_embedding_idx ON pr_files USING hnsw (embedding vector_cosine_ops);\npnpm dev          # local dev\npnpm build        # verify before deploying\npnpm precache     # pre-load repos for a demo\n```\n\nPush 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.\n\nNeon'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.\n\n**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`\n\nIssues and PRs welcome.\n\n- Stack is Next.js App Router + Drizzle + Neon + Vercel AI SDK — no other abstractions.\n- Risk scoring in\n`lib/scoring.ts`\n\n— heuristic improvements especially welcome. - Don't add GitHub OAuth or actual PR posting. Read-only access is intentional.\n- Run\n`pnpm build`\n\nbefore opening a PR.", "url": "https://wpnews.pro/news/built-swipr-swipe-to-review-github-prs-with-ai-context", "canonical_source": "https://github.com/nochinxx/SwiPR", "published_at": "2026-06-12 01:49:26+00:00", "updated_at": "2026-06-12 02:50:05.832706+00:00", "lang": "en", "topics": ["ai-tools", "ai-agents", "ai-products", "ai-startups"], "entities": ["SwiPR", "Claude MCP", "Zeno Rocha", "Resend", "Smithery.ai"], "alternates": {"html": "https://wpnews.pro/news/built-swipr-swipe-to-review-github-prs-with-ai-context", "markdown": "https://wpnews.pro/news/built-swipr-swipe-to-review-github-prs-with-ai-context.md", "text": "https://wpnews.pro/news/built-swipr-swipe-to-review-github-prs-with-ai-context.txt", "jsonld": "https://wpnews.pro/news/built-swipr-swipe-to-review-github-prs-with-ai-context.jsonld"}}