Supabase MCP
MCP serversSupabase's hosted MCP server: query and migrate your database, read logs and advisors, search Supabase docs.
Install
$ claude mcp add --scope project --transport http supabase "https://mcp.supabase.com/mcp"
Works with Claude Code, Codex, Cursor, Gemini CLI, GitHub Copilot and any other MCP client.
Update
$ Nothing to run: Supabase updates the hosted server.
--scope project writes the entry to .mcp.json, so the team shares it. To change the URL's options, run claude mcp remove supabase first.
When to use it
- You want the agent to read your real schema before it writes queries, RLS policies or migrations.
- You are debugging a Supabase project and want its logs and the security and performance advisors in the conversation.
- You manage Edge Functions or development branches and want the agent to list, deploy or reset them.
Commands & flags
- claude /mcp
- Run in a regular terminal, select supabase, then Authenticate to sign in.
- ?project_ref=<id>&read_only=true
- Append to the URL to limit the server to one project and to read-only SQL.
- list_tables / execute_sql
- Inspect the schema and run SQL queries.
- apply_migration
- Apply a database migration; destructive SQL asks for confirmation when the client supports it.
- get_advisors / query_logs
- Read the security and performance advisors, and query project logs with read-only SQL.
- generate_typescript_types
- Generate TypeScript types from the database schema.
- search_docs
- Search the Supabase documentation.
How to use it
This is an MCP server. Add it to your project config:
claude mcp add --scope project --transport http supabase "https://mcp.supabase.com/mcp"
Then authenticate. In a regular terminal, not the IDE extension, run claude /mcp, select "supabase" and choose "Authenticate". Pick the organization that holds the project.
Scope it before real work. Append ?project_ref=<id> to limit it to one project, read_only=true to run SQL as a read-only Postgres user, and features=database,docs to load only some tool groups. Supabase's own advice: work on a development branch, connect to production only when the task needs production evidence, and keep manual tool approval on.
Running Supabase locally? The CLI serves a smaller tool set at http://localhost:54321/mcp, without OAuth.
Why it earns its place
It is Supabase's own server, so the tools follow the platform: schema, migrations, logs, advisors, Edge Functions, branches and docs in one place. Reading the actual tables and advisors stops the agent from writing SQL against a schema it imagined.
It acts with your developer permissions, so never hand it to customers or end users. Data the agent reads can contain text that tries to steer it, which is one more reason to keep it read-only and off production unless you need otherwise. Some tools, such as creating a project or a branch, cost money and stop for a cost confirmation.
Try it
> Using the Supabase MCP, list the tables in my project, check the security advisors, and draft a migration that enables RLS on every table missing it.