PatchLabs MCPサーバー
コミット 2026年11月15日AIで構築されたアプリケーションのセキュリティ漏洩チェックを行い、RLS、ヘッダー、データ露出に焦点を当てた自動修正を提供します。
別名 manra399/patchlabs
- スター
- 0
- ツール
- —
- ダウンロード数(30日間)
- —
- 最新バージョン
- 3.1.0
- 最終コミット
- 2026年11月15日
- ライセンス
- —
PatchLabs MCPとは
PatchLabsはMCPサーバーです。 AIで構築されたアプリケーションのセキュリティ漏洩チェックを行い、RLS、ヘッダー、データ露出に焦点を当てた自動修正を提供します。.
プロジェクトのREADMEから生成された概要
PatchLabs MCP server について
PatchLabsは、AIで構築されたアプリケーションに対して、セキュリティ漏洩の検出と自動修復を提供します。Row Level Security (RLS)、不適切なヘッダー、および意図しないデータ露出に関連する脆弱性の特定に重点を置いています。開発者はこのサービスを使用してGitHubリポジトリをスキャンし、個人データが権限のないユーザーからアクセスされないようにします。
このシステムは、管理されたラボ環境内でリポジトリのマイグレーションからデータベースを再構築することで動作します。DockerとClaude Codeを含むパイプラインを利用して、漏洩箇所を特定し、修正案を生成します。このプロセスでは、まずHaikuを使用し、初期のラボ検証に失敗した場合にはSonnetやOpusへと段階的にClaudeモデルを切り替えて実行します。
ユーザーはWebインターフェースまたはMCP serverを通じてサービスを利用できます。MCPの実装では、rls_check、start_check、get_check、list_apps、run_checkなどの特定のツールが提供されます。初回チェックにはGitHubリポジトリとメールアドレスが必要であり、CI/CDワークフロー向けのAPIアクセスにはX-API-Key認証を使用します。
できること
- 1Row Level Securityの検証AIクライアントは、専用のRLSツールを使用してデータベースのアクセス脆弱性をチェックできます。
プロジェクトの README から作成されています。すべてのユースケースは、その引用と照らし合わせて確認されています。
PatchLabs MCPのインストール方法
フォーマット検証日 2026年11月10日Cursor に追加Gooseに追加Claude CodeにPatchLabs MCPをインストール
$ claude mcp add --transport http patchlabs https://api.patchlabs.dev/mcpCursorにPatchLabs MCPをインストール
~/.cursor/mcp.json
{
"mcpServers": {
"patchlabs": {
"url": "https://api.patchlabs.dev/mcp"
}
}
}VS CodeにPatchLabs MCPをインストール
.vscode/mcp.json
{
"servers": {
"patchlabs": {
"type": "http",
"url": "https://api.patchlabs.dev/mcp"
}
}
}VS Code CLIにPatchLabs MCPをインストール
$ code --add-mcp '{"name":"patchlabs","type":"http","url":"https://api.patchlabs.dev/mcp"}'CodexにPatchLabs MCPをインストール
$ codex mcp add patchlabs --url https://api.patchlabs.dev/mcpCodex config.tomlにPatchLabs MCPをインストール
~/.codex/config.toml
[mcp_servers.patchlabs] url = "https://api.patchlabs.dev/mcp"
Gemini CLIにPatchLabs MCPをインストール
$ gemini mcp add -s user --transport http patchlabs https://api.patchlabs.dev/mcpGemini settings.jsonにPatchLabs MCPをインストール
~/.gemini/settings.json
{
"mcpServers": {
"patchlabs": {
"url": "https://api.patchlabs.dev/mcp",
"type": "http"
}
}
}自動チェック
実行日 2026年11月15日完全なレポート →まだ検証されていません。サーバーには80点のスコア、重大な問題がないこと、および検証に必要な十分なデータが必要です。 チェックの仕組み · 点数を上げるための改善点
- ソースリポジトリがリンクされており、アクセス可能manra399/patchlabs is public and reachablegithub.com/manra399/patchlabs ↗合格
- パッケージがこのリポジトリをソースとして指定未チェック
- ビルドの来歴 (Sigstore 証明)未チェック
- オープンソースライセンス (OSI)No license検出事項
- 過去1年以内にコミットまたはリリースありLast commit or release 2026-11-15github.com/manra399/patchlabs ↗合格
- OpenSSF Scorecard未チェック
- パッケージ名が有名なパッケージに酷似していない未チェック
- パッケージおよびその依存関係に重大な勧告なし未チェック
- モデルへの隠れた指示がない0 tool descriptions and the README read; no override phrases, credential paths or hidden characters合格
- 破壊的なツールがラベル付けされている未チェック
- リモートエンドポイントが MCP ハンドシェイクに応答initialize answered with protocol 2025-06-18 in 428 ms合格
README
GitHubで見るPatchLabs
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.
PatchLabs MCPのよくある質問
PatchLabs MCPをClaude Codeに追加するには
ターミナルでclaude mcp add --transport http patchlabs https://api.patchlabs.dev/mcpを実行します。すべてのプロジェクトで利用するには--scope userを追加します。
PatchLabs MCPをCursorに追加するには
~/.cursor/mcp.jsonを開き、上記のインストールセクションに示すCursor設定を使ってmcpServersの下にサーバーを追加します。
チェック対象のGitHubリポジトリの所有権をどのように確認しますか?
ワンタイムコードを含む patchlabs-verify.txt という名前のファイルをリポジトリにコミットすることで、所有権を証明する必要があります。
MCP serverを通じてどのようなツールが利用できますか?
MCP serverは、RLSチェック、チェックの開始、チェックの取得、アプリの一覧表示、およびチェックの実行のためのツールを提供します。