Supabase MCP server
MCP server for interacting with the Supabase platform
How it connects
New to MCP? What is an MCP server?
- Runs on
- Supabase's own MCP endpoint
- Connects with
- Your Supabase account, connected once for your org
- Category
- Developer Tools
What it does
Supabase runs this server at https://mcp.supabase.com/mcp. Through it an agent can run SQL against your Postgres database, apply migrations, read logs and security advisors, deploy Edge Functions and manage development branches. Unless you scope it to one project, it also sees every organization and project the signed-in Supabase account belongs to, and can create new projects on your bill.
Tools
These 29 tools come from version 0.14.0 of the open-source server, with its default feature groups. The groups match the features URL option described under setup. Storage tools are off by default and not listed here, and Supabase's docs list a create_edge_function_secret tool that this list did not include.
Account
| Tool | What it does | Reads or changes |
|---|---|---|
list_organizations | Lists the organizations the user belongs to. | Reads |
get_organization | Gets one organization, including its subscription plan. | Reads |
list_projects | Lists every project the user can see. | Reads |
get_project | Gets one project's details. | Reads |
get_cost | Quotes the cost of a new project or branch for an organization. | Reads |
confirm_cost | Returns a confirmation ID once the user has agreed to a quoted cost. | Reads |
create_project | Creates a project, which can add to the organization's bill. | Changes |
pause_project | Pauses a project, which takes its database and APIs offline until restored. | Changes |
restore_project | Restores a paused project. | Changes |
Database
| Tool | What it does | Reads or changes |
|---|---|---|
list_tables | Lists tables in one or more schemas, with columns and keys when verbose is set. | Reads |
list_extensions | Lists installed Postgres extensions. | Reads |
list_migrations | Lists the migrations applied to the database. | Reads |
apply_migration | Runs DDL as a named migration. Destructive statements can drop tables and data. | Changes |
execute_sql | Runs any SQL you pass it, including UPDATE, DELETE and DROP. Results can contain untrusted user data. | Changes |
Debugging
| Tool | What it does | Reads or changes |
|---|---|---|
query_logs | Runs a read-only ClickHouse SQL query over the project's unified logs, defaulting to the last 24 hours. | Reads |
get_advisors | Lists security and performance advisories, such as tables missing RLS policies. | Reads |
Development
| Tool | What it does | Reads or changes |
|---|---|---|
get_project_url | Gets the project's API URL. | Reads |
get_publishable_keys | Gets the project's publishable and legacy anon keys. | Reads |
generate_typescript_types | Generates TypeScript types from the database schema. | Reads |
Edge Functions
| Tool | What it does | Reads or changes |
|---|---|---|
list_edge_functions | Lists the project's Edge Functions. | Reads |
get_edge_function | Gets the source files of one function. | Reads |
deploy_edge_function | Deploys a function. If one with that name exists, the new version replaces it and serves traffic at once. | Changes |
Branching
| Tool | What it does | Reads or changes |
|---|---|---|
list_branches | Lists development branches and their status. | Reads |
create_branch | Creates a development branch, which bills hourly compute. | Changes |
delete_branch | Deletes a development branch. | Changes |
merge_branch | Merges a branch's migrations and Edge Functions into production. | Changes |
reset_branch | Resets a branch's migrations. Untracked data and schema changes on the branch are lost. | Changes |
rebase_branch | Runs newer production migrations onto a branch. | Changes |
Docs
| Tool | What it does | Reads or changes |
|---|---|---|
search_docs | Searches the Supabase documentation with a GraphQL query. | Reads |
Set it up
Directly
Supabase's MCP guide gives this for Claude Code:
claude mcp add --scope project --transport http supabase "https://mcp.supabase.com/mcp"Then run /mcp, pick supabase and authenticate. The sign-in page asks which organization to grant, so choose the one that holds your project. You don't need a personal access token. In Cursor, put the URL in .cursor/mcp.json for one project or ~/.cursor/mcp.json for all of them:
{
"mcpServers": {
"supabase": {
"url": "https://mcp.supabase.com/mcp?project_ref=<project-ref>&read_only=true"
}
}
}The URL takes options you can combine:
project_ref=<ref>limits the server to one project and drops the Account tools.read_only=trueruns every query as a read-only Postgres user. In the 0.14.0 code it also hides the write tools such asapply_migrationanddeploy_edge_function, andexecute_sqlstays available for reads.features=database,docsturns on only the groups you name. The group names in the code areaccount,database,debugging,development,functions,branching,docsandstorage.
How to add MCP servers to Claude Code and How to set up MCP servers in Cursor cover the general client steps.
Through Statio
Install Supabase from the catalog and press Connect. Supabase's own sign-in page opens, and you approve access for an organization there. Statio registers itself as the OAuth client, so there is no app for you to create, and the connection is shared by the members you grant it to. Grant each tool under Permissions.
The desktop app configures Claude Code and Cursor for you. To do it by hand, Cursor's mcp.json entry points at the local proxy, http://127.0.0.1:7777/<server-name>/mcp, with the server name as your dashboard shows it, and Claude Code is set up with mcphub config claude-code. If the tools don't show, restart the session and then try How to debug an MCP server that won't connect.
What to hold back
The hard part with Supabase is that execute_sql is one tool. A SELECT and a DELETE FROM users go through the same name, so a grant on that tool is a grant on every statement the database role allows. Per-tool grants decide whether an agent gets SQL at all. For read-only SQL, connect directly with read_only=true.
A coding agent on a feature branch is well served by list_tables, list_migrations, generate_typescript_types, get_advisors, query_logs, search_docs and the function reads. Keep these back unless a person is watching each call:
merge_branchpushes migrations and Edge Functions to production. An agent that thinks its branch is done can ship it.deploy_edge_functionreplaces a live function the moment it runs. A bad deploy to your auth webhook or payment handler breaks it for real users with no review step.apply_migrationagainst a production project can drop a column your app still reads.reset_branchanddelete_branchthrow away work on a branch someone else may be using.
A support or analytics agent that answers questions from your data should not get execute_sql unless it runs in read-only mode. Supabase's docs give the reason: rows in your tables can carry text written by your users, such as a support ticket that tells the model to run a query. The server wraps SQL results with a warning to ignore instructions in the data, and Supabase says plainly this is not foolproof. An agent that reads a poisoned row and also holds a write tool is the case described in The lethal trifecta: how AI agents leak data.
Keep create_project, create_branch and pause_project from every unattended agent. The first two spend money, and the server's cost check expects a person to agree to the quoted price, which nobody does in an unattended run. Pausing a project takes your app offline. If the agent only works on one project, scoping with project_ref also removes the Account tools from its reach. MCP permissions covers how per-tool grants work.
Questions
What Statio adds
- You choose which of its tools each agent may call. A tool you hold back is removed from that agent's tool list, and a call to it is refused.
- Agents get a Statio token, never the Supabase one.
- Every call is recorded with the agent that made it, when, how long it took and whether it succeeded.
Lock down your first tool in minutes.
Three MCP servers, one of them hosted, and 10,000 calls a month, free and without a card. If you outgrow it the next plan is $19.
Two steps: create your account, then install the desktop app on each machine that runs an AI client.
- Keys encrypted at rest, never handed to an agent
- Cancel anytime, nothing is deleted
- How Statio handles credentials