PatchLabs MCP server
Commit 15 Nov 2026Melakukan pengecekan kebocoran keamanan dan menyediakan perbaikan otomatis untuk aplikasi yang dibangun dengan AI, dengan fokus pada RLS, headers, dan eksposur data.
Juga dikenal sebagai manra399/patchlabs
- Stars
- 0
- Tools
- —
- Unduhan, 30 hari
- —
- Versi terbaru
- 3.1.0
- Commit terakhir
- 15 Nov 2026
- Lisensi
- —
Apa itu PatchLabs MCP?
PatchLabs adalah MCP server. Melakukan pengecekan kebocoran keamanan dan menyediakan perbaikan otomatis untuk aplikasi yang dibangun dengan AI, dengan fokus pada RLS, headers, dan eksposur data.
Ringkasan dibuat dari README proyek
Tentang PatchLabs MCP server
PatchLabs menyediakan deteksi kebocoran keamanan dan remediasi otomatis untuk aplikasi yang dibangun menggunakan AI. Layanan ini berfokus pada identifikasi kerentanan terkait Row Level Security (RLS), header yang tidak tepat, dan eksposur data yang tidak disengaja. Developer menggunakan layanan ini untuk memindai repositori GitHub guna memastikan data pribadi tidak dapat diakses oleh pengguna yang tidak berwenang.
Sistem ini bekerja dengan membangun ulang database dari migrasi repositori di dalam lingkungan lab yang terkendali. Sistem menggunakan pipeline yang melibatkan Docker dan Claude Code untuk menemukan kebocoran dan menghasilkan perbaikan. Layanan ini menggunakan berbagai model Claude dalam prosesnya, dimulai dari Haiku dan meningkat ke Sonnet atau Opus jika bukti lab awal gagal.
Pengguna dapat berinteraksi dengan layanan ini melalui antarmuka web atau melalui MCP server. Implementasi MCP menyediakan tool spesifik seperti rls_check, start_check, get_check, list_apps, dan run_check. Integrasi memerlukan repositori GitHub dan email untuk pengecekan awal, sementara akses API untuk workflow CI/CD menggunakan autentikasi X-API-Key.
Apa yang bisa Anda lakukan dengannya
- 1Verifikasi Row Level SecurityClient AI dapat menggunakan tool RLS khusus untuk memeriksa kerentanan akses database.
Ditulis berdasarkan README proyek. Setiap use case diperiksa terhadap kutipan dari README tersebut.
Cara menginstal PatchLabs MCP
Format diverifikasi 10 Nov 2026Tambahkan ke CursorTambahkan ke GooseInstal PatchLabs MCP di Claude Code
$ claude mcp add --transport http patchlabs https://api.patchlabs.dev/mcpInstal PatchLabs MCP di Cursor
~/.cursor/mcp.json
{
"mcpServers": {
"patchlabs": {
"url": "https://api.patchlabs.dev/mcp"
}
}
}Instal PatchLabs MCP di VS Code
.vscode/mcp.json
{
"servers": {
"patchlabs": {
"type": "http",
"url": "https://api.patchlabs.dev/mcp"
}
}
}Instal PatchLabs MCP di VS Code CLI
$ code --add-mcp '{"name":"patchlabs","type":"http","url":"https://api.patchlabs.dev/mcp"}'Instal PatchLabs MCP di Codex
$ codex mcp add patchlabs --url https://api.patchlabs.dev/mcpInstal PatchLabs MCP di Codex config.toml
~/.codex/config.toml
[mcp_servers.patchlabs] url = "https://api.patchlabs.dev/mcp"
Instal PatchLabs MCP di Gemini CLI
$ gemini mcp add -s user --transport http patchlabs https://api.patchlabs.dev/mcpInstal PatchLabs MCP di Gemini settings.json
~/.gemini/settings.json
{
"mcpServers": {
"patchlabs": {
"url": "https://api.patchlabs.dev/mcp",
"type": "http"
}
}
}Pengecekan otomatis
Berjalan 15 Nov 2026Laporan lengkap →Belum diverifikasi. Sebuah server memerlukan skor 80, tidak ada temuan serius, dan data yang cukup untuk kami periksa. Cara kerja checks · Yang perlu diperbaiki untuk menambah poin
- Source repository terhubung dan dapat dijangkaumanra399/patchlabs is public and reachablegithub.com/manra399/patchlabs ↗Lolos
- Nama paket mencantumkan repositori ini sebagai sumbernyaTidak diperiksa
- Provenance build (atestasi Sigstore)Tidak diperiksa
- Lisensi open source (OSI)No licenseTemuan
- Ada commit atau release dalam satu tahun terakhirLast commit or release 2026-11-15github.com/manra399/patchlabs ↗Lolos
- OpenSSF ScorecardTidak diperiksa
- Nama package tidak mirip dengan package populerTidak diperiksa
- Tidak ada advisory kritis pada paket atau dependensinyaTidak diperiksa
- Tidak ada instruksi tersembunyi untuk model0 tool descriptions and the README read; no override phrases, credential paths or hidden charactersLolos
- Tools yang bersifat destruktif telah diberi labelTidak diperiksa
- Endpoint remote merespons handshake MCPinitialize answered with protocol 2025-06-18 in 428 msLolos
README
Lihat di GitHubPatchLabs
Leak checks and tested fixes for AI-built apps: https://patchlabs.dev
| Part | Where | Runs on |
|---|---|---|
docs/ |
Website: landing page, check status and report page, privacy | GitHub Pages (patchlabs.dev) |
api/ |
FastAPI: checks, accounts, workspaces, monitored apps, receipts, free RLS tool, MCP (see API below) | Azure Container Apps (api.patchlabs.dev) |
db/schema.sql |
Postgres schema, idempotent and additive; applied by the API on start | Azure Database for PostgreSQL, database patchlabs |
worker/ |
Takes verified checks, runs the lab pipeline (Docker + Claude Code), posts reports; deletes run folders older than 30 days | Manraj's Mac, kept alive by launchd |
Flow
- Visitor enters a GitHub repo and email on patchlabs.dev →
POST /checks. - They prove the repo is theirs by committing
patchlabs-verify.txtwith a one-time code →POST /checks/{id}/verify. - The worker claims the check (
POST /worker/claim), rebuilds the database from the repo's migrations in a lab, finds personal data the wrong people can read, has the fix agent write a fix (Haiku first, escalating to Sonnet then Opus only if the lab proof fails), and posts the report (POST /worker/checks/{id}/result). - The check page shows the report, the proof table and the fix, and offers the fix as a download. An email goes out at each step once SMTP is configured.
API
Contract: SPEC.md. JSON everywhere; errors are {"detail": "..."}. Signed-in calls send Authorization: Bearer <session>,
CI calls send X-API-Key: pl_live_..., worker and admin calls send their bearer tokens.
| Module | Endpoints |
|---|---|
app.py |
GET /health, POST /checks, GET /checks/{id}, POST /checks/{id}/verify, POST /worker/heartbeat|claim (claim also runs the scheduler), POST /worker/checks/{id}/result, GET /admin/checks |
accounts.py |
POST /workspaces/{wid}/webhook/rotate-secret, POST /auth/start|finish|logout, POST /invites/accept, GET|PATCH|DELETE /me, GET /me/export, GET /me/checks, GET|PATCH /workspaces/{wid}, POST /workspaces/{wid}/webhook/test, POST /workspaces/{wid}/invites, DELETE /workspaces/{wid}/invites/{id}, PATCH|DELETE /workspaces/{wid}/members/{uid}, GET|POST /workspaces/{wid}/api-keys, DELETE /workspaces/{wid}/api-keys/{kid}, POST /workspaces/{wid}/upgrade-request, GET /admin/workspaces, PATCH /admin/workspaces/{wid}, GET /admin/upgrade-requests |
monitor.py |
GET|POST /workspaces/{wid}/apps, GET|PATCH|DELETE /apps/{aid}, POST /apps/{aid}/verify, POST /apps/{aid}/checks, GET /badge/{aid}.svg, GET /public/apps/{aid}, GET /stats, POST /v1/apps/{aid}/checks, GET /v1/checks/{cid} |
receipts.py |
POST /checks/{id}/decision, POST /checks/{id}/answers, GET /checks/{id}/decisions (members), GET /receipts/{id}, GET /.well-known/patchlabs-receipt-key |
rls.py |
POST /tools/rls-check |
mcp_server.py |
POST /mcp (tools: rls_check, start_check, get_check, list_apps, run_check) |
Env: DATABASE_URL, WORKER_TOKEN, ADMIN_TOKEN, SITE_URL, CORS_ORIGINS, SMTP_*, RECEIPT_PRIVATE_KEY (required: base64
of a 32-byte Ed25519 seed, python3 -c "import os,base64;print(base64.b64encode(os.urandom(32)).decode())"; the API refuses to
start without it unless PATCHLABS_DEV=1), optional GITHUB_TOKEN, FOUNDER_EMAIL. Test hooks: EMAIL_OUTBOX, GITHUB_API,
RAW_GITHUB. Security rules (rate limits, verification, masking): see "Security rules" in SPEC.md.
Webhooks are signed: X-PatchLabs-Signature: v1=<hex HMAC-SHA256 of "<timestamp>.<raw body>"> with the workspace's
whsec_ secret and X-PatchLabs-Timestamp; verification snippet at https://patchlabs.dev/docs/webhooks#security.
Verify a receipt (signed bytes are the receipt as JSON with sorted keys and (",", ":") separators):
import base64, json, urllib.request
from cryptography.hazmat.primitives.asymmetric.ed25519 import Ed25519PublicKey
API, CHECK = "https://api.patchlabs.dev", "<check id>"
r = json.load(urllib.request.urlopen(f"{API}/receipts/{CHECK}"))
k = json.load(urllib.request.urlopen(f"{API}/.well-known/patchlabs-receipt-key"))
assert r["key_id"] == k["key_id"], "signed with a different key"
msg = json.dumps(r["receipt"], sort_keys=True, separators=(",", ":")).encode()
pub = Ed25519PublicKey.from_public_bytes(base64.b64decode(k["public_key"]))
pub.verify(base64.b64decode(r["signature"]), msg) # raises InvalidSignature if anything was changed
print("receipt is genuine:", r["receipt"]["status"], r["receipt"]["tables_leaking"])
Tests: tools/test-api.sh runs the whole suite in Docker (throwaway postgres:17 + python:3.13-slim) and cleans up after
itself; extra arguments go to pytest, e.g. tools/test-api.sh -k webhook -x.
Deploy the API
TAG=$(date +%Y%m%d%H%M)
az acr build -r sponsorjobsregistry -t patchlabs-api:$TAG -f api/Dockerfile .
az containerapp update -g ics-rg -n patchlabs-api --image sponsorjobsregistry.azurecr.io/patchlabs-api:$TAG
Before the first v2 deploy, set RECEIPT_PRIVATE_KEY as a secret on the container app: without it the new image won't start.
Pertanyaan tentang PatchLabs MCP
Bagaimana cara menambahkan PatchLabs MCP ke Claude Code?
Jalankan claude mcp add --transport http patchlabs https://api.patchlabs.dev/mcp di terminal Anda. Tambahkan --scope user agar tersedia di semua proyek.
Bagaimana cara menambahkan PatchLabs MCP ke Cursor?
Buka ~/.cursor/mcp.json dan tambahkan server di bawah mcpServers, menggunakan config Cursor yang ditunjukkan di bagian instalasi di atas.
Bagaimana cara memverifikasi bahwa saya adalah pemilik repositori GitHub untuk melakukan pengecekan?
Anda harus membuktikan kepemilikan dengan melakukan commit file bernama patchlabs-verify.txt yang berisi kode sekali pakai ke dalam repositori tersebut.
Tool apa saja yang tersedia melalui MCP server?
MCP server menyediakan tool untuk RLS checks, start_check, get_check, list_apps, dan run_check.