schema-guard-mcp

schema-guard-mcp

Audits PostgreSQL/Supabase schemas for security issues like missing RLS, permissive policies, and sensitive data exposure during AI conversations.

Category
Visit Server

README

Schema Guard — MCP server

A Model Context Protocol server that gives an AI agent (Claude Desktop, Claude Code, or any MCP client) tools to audit Postgres / Supabase SQL for security issues — mid-conversation, with structured results. Point it at a schema and it flags missing RLS, permissive policies, broad grants, SECURITY DEFINER search_path gaps, and secrets in client-readable tables.

Built to show MCP / agent tool-use, and tuned to the exact mistakes that no-code exports ship with.

Tools it exposes

Tool What it does
audit_sql Full audit of a SQL schema → ranked findings (severity, rule, line, fix) + verdict.
rls_coverage Quick per-table yes/no of whether RLS is enabled.
list_rules The checks it runs, with rationale.

Checks

RLS-001 table without RLS · RLS-002 RLS on but no policy · POL-001 USING (true) policy · GRANT-001 broad grant to anon/public · SECDEF-001 SECURITY DEFINER without pinned search_path · COL-001 sensitive column in a client-readable table.

Run the live demo

npm install
npm run demo    # spawns the server, does the MCP handshake, audits a sample schema
npm test        # 10 assertions on the audit engine

The demo is a real MCP client (@modelcontextprotocol/sdk) speaking to the server over stdio — the same handshake Claude performs. It finds 7 issues (2 critical) in fixtures/vulnerable-schema.sql and prints the fix for each.

Wire it into Claude

Claude Desktopclaude_desktop_config.json:

{
  "mcpServers": {
    "schema-guard": {
      "command": "node",
      "args": ["C:/path/to/35-schema-guard-mcp/src/server.js"]
    }
  }
}

Claude Code.mcp.json in your project:

{
  "mcpServers": {
    "schema-guard": { "command": "node", "args": ["./src/server.js"] }
  }
}

Then just ask Claude: “audit this schema for RLS gaps” and paste your SQL — it calls audit_sql and reports back.

Stack

Node (ESM) · @modelcontextprotocol/sdk (stdio transport) · zod · zero external services, deterministic output.

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