Supabase MCP, without handing over your database
Most time lost to a database is spent ferrying things about. You paste your schema into a chat. You copy an error back. You describe a table from memory and get it slightly wrong, so the answer is slightly wrong too. Supabase MCP removes the ferrying. Your AI tool can look at your schema itself, run a query, read your logs and search the Supabase docs, without you in the middle.
Two settings do nearly all the work, and both go in the URL you connect to. read_only=true means every query runs as a Postgres user that cannot write. The AI can look at anything and change nothing. Start here, always. project_ref=YOUR_PROJECT_REF ties the connection to one project. Without it, the AI can see every project in your Supabase account. With it, one. You will find your project ref in the Supabase dashboard under Project Settings, and it is also the random-looking part of your project URL.
Connect it in
One command. Replace YOUR_PROJECT_REF with your own before running it.
bash
claude mcp add --scope project --transport http supabase "https://mcp.supabase.com/mcp?project_ref=YOUR_PROJECT_REF&read_only=true"What you should see
A line confirming the server was added, and a .mcp.json file in your project. A browser window opens so you can sign in to Supabase and approve access.--scope project puts it in a .mcp.json you commit, so your team connects to the same thing. For yourself only, leave --scope off and it stays in this project, private to you.
Create .cursor/mcp.json in your project, with your own project ref:
json
{
"mcpServers": {
"supabase": {
"url": "https://mcp.supabase.com/mcp?project_ref=YOUR_PROJECT_REF&read_only=true"
}
}
}What you should see
Supabase appears in Cursor's MCP list. A browser window opens for you to sign in and approve access.Create .vscode/mcp.json in your project, with your own project ref:
json
{
"servers": {
"supabase": {
"type": "http",
"url": "https://mcp.supabase.com/mcp?project_ref=YOUR_PROJECT_REF&read_only=true"
}
}
}What you should see
Supabase appears in the MCP servers list, and a browser window opens for you to sign in and approve access.Check it works. Ask for something read-only and specific:
Copy this into your AI tool
Using Supabase, list the tables in my database and tell me what each one appears to be for. Do not change anything.
Open it in your AI tool. Clicking copies the prompt, and ChatGPT and Grok open with it already filled in.
- Claude(opens in a new tab)
- ChatGPT(opens in a new tab)
- Qwen(opens in a new tab)
- DeepSeek(opens in a new tab)
- Kimi(opens in a new tab)
- Grok(opens in a new tab)
More tools
App builders, in your browser:
Code editors on your computer. Open app only works once it is installed, so use Get it first if you do not have it.
- CursorOpen appGet it(opens in a new tab)
- VS CodeOpen appGet it(opens in a new tab)
- Antigravity IDEOpen appGet it(opens in a new tab)
- Antigravity 2.0Open appGet it(opens in a new tab)
Want the full list? Browse all app builders and coding editors (IDEs).
You should get back a real list of your own tables. If it describes tables you do not recognise, or apologises and guesses, it is not connected. Check the MCP list in your tool.
When you do need writes, turn read-only off for that piece of work and turn it back on afterwards, rather than leaving it off. Review the SQL before you approve it. Migrations are worth extra care, because undoing one usually means restoring a backup. If that sounds like a lot of ceremony, it is a sign the task belongs in a development database rather than a live one.
One habit keeps it cheap. Schemas are large, and a tool that dumps your whole database structure into the conversation costs you context on every question. Ask for the table you care about rather than everything. And if you only ever use it for one thing, narrow the tool set with the features parameter: database, docs, debugging, development, functions, account, branching and storage are the groups.
bash
claude mcp add --scope project --transport http supabase "https://mcp.supabase.com/mcp?project_ref=YOUR_PROJECT_REF&read_only=true&features=database,docs"What you should see
The same confirmation. Your tool now has the database and docs tools only, which is a smaller menu and a smaller context cost.When it goes wrong, it is usually one of three things. It answers about tables you do not have. It is not connected and is working from memory. Check the MCP list in your tool and restart it. It says it cannot write, when you meant it to. read_only=true is doing its job. That is the setting, not a bug. It can see projects you did not expect. You are missing project_ref, so the connection covers your whole account. Add it and reconnect.