loading…
Search for a command to run...
loading…
MCP server that lets AI coding agents (Claude Code, Cursor, Cline) audit Supabase projects for security misconfigurations AND apply the fixes — without leaving
MCP server that lets AI coding agents (Claude Code, Cursor, Cline) audit Supabase projects for security misconfigurations AND apply the fixes — without leaving the agent. Tools: audit_project, list_findings, preview_fix (BEGIN/ROLLBACK safety), apply_fix (with confirmation), apply_all_fixes (transactional bulk). Closes the audit-fix loop entirely in the agent — other Supabase scanners only report.
The only Supabase security tool that closes the loop in your AI agent. Audit, preview the fix, and apply it — without leaving Claude / Cursor / Cline.
You: audit my supabase project rkmrsefraqssuyuniyco
Claude: Found 17 critical leaks. Want me to apply all SQL fixes?
Run preview_fix on each first?
You: preview them all, then apply if safe.
Claude: [previews each]
All 17 fixes preview cleanly. Applying...
Done. Re-audited: 0 critical findings remaining.
Other Supabase scanners (SupaExplorer, AuditYourApp, Vibe App Scanner) report. None of them remediate. This one does.
| Tool | What it does |
|---|---|
audit_project |
Scan a project. Returns JSON findings. Caches for follow-up tools. |
list_findings |
List cached findings, optionally filter by severity. |
preview_fix |
Wrap the fix SQL in BEGIN; ... ROLLBACK; and verify it would run. Safe. |
apply_fix |
Actually apply one finding's fix. Requires confirm: true. Re-audits to verify. |
apply_all_fixes |
Bulk-apply at or above a severity. Single transaction — all or nothing. |
Add to your MCP config (~/.claude.json or claude_desktop_config.json):
{
"mcpServers": {
"supabase-security": {
"command": "npx",
"args": ["-y", "@perufitlife/supabase-security-mcp@latest"],
"env": {
"SUPABASE_ACCESS_TOKEN": "sbp_your_personal_access_token"
}
}
}
}
Get a token at https://supabase.com/dashboard/account/tokens (read+write to your projects).
Settings → MCP → Add new MCP server → paste the same JSON object as above.
Anything that supports MCP stdio servers will work — point it at npx -y @perufitlife/supabase-security-mcp@latest with the env var set.
apply_fix and apply_all_fixes call requires confirm: true.preview_fix runs the SQL inside BEGIN; ... ROLLBACK; so you see if it would error before touching state.apply_all_fixes runs everything in a single transaction. If any statement fails, the entire change rolls back.apply_fix re-runs the audit and reports whether the finding is actually gone — protects against fix-that-doesn't-fix.audit_project. Token can be a read-only PAT if you only want to scan, never remediate. (For apply_fix, you need write access.)Inherits all checks from supabase-security-skill:
SECURITY DEFINER functions executable by anonCLIs are great. They're not in your AI agent's context. When you're vibing with Claude in your IDE, asking "is my supabase tight?" should get an actual scan, not a "you should run this command on your laptop."
The flow this enables:
subscriptions table to my schema." → agent does itaudit_projectpreview_fix, then apply_fix after you say yes.That round-trip is the actual product. The audit is just step 2.
pg_cron)MIT.
Run in your terminal:
claude mcp add supabase-security-mcp -- npx