supabase-security-mcp

supabase-security-mcp

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.

Category
Visit Server

README

supabase-security-mcp

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.

Tools

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.

Install

Claude Desktop / Claude Code

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).

Cursor

Settings → MCP → Add new MCP server → paste the same JSON object as above.

Cline / Continue / etc.

Anything that supports MCP stdio servers will work — point it at npx -y @perufitlife/supabase-security-mcp@latest with the env var set.

Safety model

  • Never auto-applies. Every apply_fix and apply_all_fixes call requires confirm: true.
  • Preview before apply. preview_fix runs the SQL inside BEGIN; ... ROLLBACK; so you see if it would error before touching state.
  • All-or-nothing bulk apply. apply_all_fixes runs everything in a single transaction. If any statement fails, the entire change rolls back.
  • Re-audit after apply. Every apply_fix re-runs the audit and reports whether the finding is actually gone — protects against fix-that-doesn't-fix.
  • Read-only by default for audit_project. Token can be a read-only PAT if you only want to scan, never remediate. (For apply_fix, you need write access.)

What it scans

Inherits all checks from supabase-security-skill:

  • Tables with RLS disabled and direct anon grants
  • SECURITY DEFINER functions executable by anon
  • Public storage buckets
  • Default privileges still granting CRUD to anon
  • Auth signups with autoconfirm enabled
  • Defense-in-depth: RLS-locked tables with stale anon grants

Why MCP and not just a CLI

CLIs 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:

  1. "Add a subscriptions table to my schema." → agent does it
  2. "Now scan for security issues." → agent calls audit_project
  3. Agent notices the new table has no RLS.
  4. "Want to fix?"preview_fix, then apply_fix after you say yes.

That round-trip is the actual product. The audit is just step 2.

Roadmap

  • [ ] Cron job audit (pg_cron)
  • [ ] Edge function secrets scan
  • [ ] Storage object-level RLS scan
  • [ ] HTML report generation as a tool (returns base64 + filename)
  • [ ] CORS configuration check

License

MIT.

Recommended Servers

playwright-mcp

playwright-mcp

A Model Context Protocol server that enables LLMs to interact with web pages through structured accessibility snapshots without requiring vision models or screenshots.

Official
Featured
TypeScript
Magic Component Platform (MCP)

Magic Component Platform (MCP)

An AI-powered tool that generates modern UI components from natural language descriptions, integrating with popular IDEs to streamline UI development workflow.

Official
Featured
Local
TypeScript
Audiense Insights MCP Server

Audiense Insights MCP Server

Enables interaction with Audiense Insights accounts via the Model Context Protocol, facilitating the extraction and analysis of marketing insights and audience data including demographics, behavior, and influencer engagement.

Official
Featured
Local
TypeScript
VeyraX MCP

VeyraX MCP

Single MCP tool to connect all your favorite tools: Gmail, Calendar and 40 more.

Official
Featured
Local
graphlit-mcp-server

graphlit-mcp-server

The Model Context Protocol (MCP) Server enables integration between MCP clients and the Graphlit service. Ingest anything from Slack to Gmail to podcast feeds, in addition to web crawling, into a Graphlit project - and then retrieve relevant contents from the MCP client.

Official
Featured
TypeScript
Kagi MCP Server

Kagi MCP Server

An MCP server that integrates Kagi search capabilities with Claude AI, enabling Claude to perform real-time web searches when answering questions that require up-to-date information.

Official
Featured
Python
E2B

E2B

Using MCP to run code via e2b.

Official
Featured
Neon Database

Neon Database

MCP server for interacting with Neon Management API and databases

Official
Featured
Exa Search

Exa Search

A Model Context Protocol (MCP) server lets AI assistants like Claude use the Exa AI Search API for web searches. This setup allows AI models to get real-time web information in a safe and controlled way.

Official
Featured
Qdrant Server

Qdrant Server

This repository is an example of how to create a MCP server for Qdrant, a vector search engine.

Official
Featured