supabase-schema-mcp
An MCP server that provides deep schema introspection for Supabase/Postgres, exposing tables, columns, views, enums, RLS policies, functions, and more.
README
supabase-schema-mcp

An MCP server that provides deep schema introspection for Supabase/Postgres. I built it because the official Supabase MCP focuses on project overview, branches, and API usage; it does not expose the kind of schema detail needed for migrations, RLS audits, relationship graphs, or RPC/trigger discovery.
Why this exists (limitations of Supabase’s MCP)
The official Supabase MCP is great for project-level and API workflows. It does not, however, give tools or agents fine-grained access to your database schema: tables, columns, views, enums, RLS policies, functions/RPCs, foreign keys, indexes, and triggers. If you want an AI or tool to reason about your schema (e.g. “which tables have RLS?”, “what does this RPC look like?”, “what FKs reference this table?”), you either run custom SQL yourself or use something that introspects the DB. This server fills that gap by connecting directly to your Supabase Postgres and exposing schema-only, read-only tools.
What this one does that Supabase’s doesn’t
- Schema introspection only: tables, columns, views, enums, RLS policies (and coverage), functions (including RPC candidates), foreign keys, indexes, triggers.
- No project/API scope: no branches, no API calls; just database structure. Use the official MCP for project management; use this one when you need schema metadata.
- Read-only: designed for introspection only; no writes or DDL. Suited to a read-only Postgres role.
Full tool list and parameters are in Tools reference.
Setup
- Clone the repo. All commands below must be run from the repo root (the directory that contains
pyproject.tomlandsrc/). - Create a virtual environment and install dependencies with uv:
uv sync --extra dev - Copy
.env.exampleto.envand set your Supabase Postgres connection:- Required:
SUPABASE_DB_HOST(e.g.db.<project_ref>.supabase.co),SUPABASE_DB_USER(usuallypostgres),SUPABASE_DB_PASSWORD(from Project Settings > Database) - Optional:
SUPABASE_DB_PORT,SUPABASE_DB_NAME
- Required:
- From the repo root, run the MCP server over stdio:
Or use the script entry point:uv run python -m supabase_schema_mcp.serveruv run supabase-schema-mcp
Adding as an MCP in Cursor
-
Open Cursor Settings (e.g. Cursor > Settings or
Cmd+,). -
Search for MCP or open Features > MCP.
-
Add this server via the JSON config. Edit
~/.cursor/mcp.json(or your project's.cursor/mcp.json) and add asupabase-schema-mcpentry undermcpServers. ReplacePATH_TO_SUPABASE_SCHEMA_MCPwith the full path to the repo root (the folder that containspyproject.tomlandsrc/):{ "mcpServers": { "supabase-schema-mcp": { "command": "uv", "args": [ "--directory", "PATH_TO_SUPABASE_SCHEMA_MCP", "run", "python", "-m", "supabase_schema_mcp.server" ] } } }Example with a real path (macOS):
{ "mcpServers": { "supabase-schema-mcp": { "command": "uv", "args": [ "--directory", "/Users/you/Developer/supabase-mcp", "run", "python", "-m", "supabase_schema_mcp.server" ] } } } -
Restart Cursor (MCP servers load at startup). When the server starts, you should see on stderr:
supabase-schema-mcp server started (stdio). Any config warnings appear in a yellow panel above that. -
You do not need to run the server in a terminal yourself. Cursor starts and manages the process when it needs to call the tools.
Read-only safety model
This MCP server is designed to read schema and metadata only. It does not execute arbitrary writes or DDL. Database access should use a read-only Postgres role where possible; the connection layer enforces that only introspection-style, read-only operations are performed. Management API usage is limited to reading project/config data as needed. Never put a role with write or DDL privileges into this server's configuration unless you explicitly require it for a future feature.
推荐服务器
Baidu Map
百度地图核心API现已全面兼容MCP协议,是国内首家兼容MCP协议的地图服务商。
Playwright MCP Server
一个模型上下文协议服务器,它使大型语言模型能够通过结构化的可访问性快照与网页进行交互,而无需视觉模型或屏幕截图。
Magic Component Platform (MCP)
一个由人工智能驱动的工具,可以从自然语言描述生成现代化的用户界面组件,并与流行的集成开发环境(IDE)集成,从而简化用户界面开发流程。
Audiense Insights MCP Server
通过模型上下文协议启用与 Audiense Insights 账户的交互,从而促进营销洞察和受众数据的提取和分析,包括人口统计信息、行为和影响者互动。
VeyraX
一个单一的 MCP 工具,连接你所有喜爱的工具:Gmail、日历以及其他 40 多个工具。
graphlit-mcp-server
模型上下文协议 (MCP) 服务器实现了 MCP 客户端与 Graphlit 服务之间的集成。 除了网络爬取之外,还可以将任何内容(从 Slack 到 Gmail 再到播客订阅源)导入到 Graphlit 项目中,然后从 MCP 客户端检索相关内容。
Kagi MCP Server
一个 MCP 服务器,集成了 Kagi 搜索功能和 Claude AI,使 Claude 能够在回答需要最新信息的问题时执行实时网络搜索。
e2b-mcp-server
使用 MCP 通过 e2b 运行代码。
Neon MCP Server
用于与 Neon 管理 API 和数据库交互的 MCP 服务器
Exa MCP Server
模型上下文协议(MCP)服务器允许像 Claude 这样的 AI 助手使用 Exa AI 搜索 API 进行网络搜索。这种设置允许 AI 模型以安全和受控的方式获取实时的网络信息。