← MCP directory

Supabase MCP server

official

Supabase's own MCP server lets an agent work with the database, Edge Functions and project settings of a Supabase project, hosted by Supabase or locally through the Supabase CLI. Access can be limited to one project, to read-only and to selected tool groups through URL parameters.

What an agent can do

  • → Run SQL and read table schemas
  • → Create and apply migrations
  • → Deploy Edge Functions
  • → Generate TypeScript types
  • → Search the Supabase documentation

The server acts with the developer's permissions, so Supabase recommends read-only mode, a single project and manual approval of tool calls. It asks for confirmation before destructive SQL and actions that cost money, but Supabase calls this a guardrail and not a guarantee, and the Storage tool group is off by default.

About the Supabase MCP server

The Supabase MCP server is built by Supabase and hosted by them at mcp.supabase.com. It connects an AI assistant to your Supabase account, so the assistant can work with the database, Edge Functions, logs and project settings of your projects. Supabase lists it as generally available. A local version runs with the Supabase CLI, and self-hosted Supabase installations are supported as well.

It is a tool for the people building the app, not for end users. A developer can ask the assistant to list tables, write and apply a migration, run a SQL query, generate TypeScript types, deploy an Edge Function or read the logs when something fails. It can also fetch security and performance advice for a project, search the Supabase documentation, and create or pause projects.

The server acts with the signed-in developer's own permissions, so Supabase advises against giving it to customers. Three settings in the server address narrow it down: one project only, read-only mode where queries run as a read-only database user, and a chosen list of tool groups. Supabase warns that text stored in your data can try to steer the assistant, and recommends keeping manual approval of each tool call switched on.

Things to ask

  • Run the security advisors for this project and explain each finding and how we fix it.
  • Write a migration that adds a status column to the orders table, and show me the SQL before you apply it.
  • Go through the logs from the last hour and find out why the signup function returns errors.
  • Generate TypeScript types for the current database schema.
  • How many users signed up per week over the last two months?

Tools the server exposes

  • list_tables
  • list_extensions
  • list_migrations
  • apply_migration
  • execute_sql
  • query_logs
  • get_advisors
  • get_project_url
  • get_publishable_keys
  • generate_typescript_types
  • list_edge_functions
  • get_edge_function
  • deploy_edge_function
  • list_projects
  • get_project
  • create_project
  • search_docs
  • create_branch
  • list_branches
  • merge_branch

How to connect Supabase

  1. Decide the limits first. Supabase recommends a single project and read-only mode, for example the address https://mcp.supabase.com/mcp?project_ref=<project-id>&read_only=true.
  2. Add the address as an MCP server in your client. Supabase has instructions for Claude, ChatGPT, Cursor, VS Code, Claude Code and Codex, among others.
  3. Sign in to Supabase in the browser window that opens and choose the organization. No personal access token is needed.
  4. Keep manual approval of tool calls switched on in the client and review each call before it runs.
  5. For CI without a browser, create a personal access token with as few permissions as possible and send it in the Authorization: Bearer header.

Part of these packages

Supabase is part of these Walma packages.

Data and analyticsDevelopers

Questions about Supabase MCP

Is the Supabase MCP server free?+

Supabase states no price for the server and does not state that it needs a particular plan. The branching tools are experimental and require a paid plan. When the assistant wants to create a project or a branch, which can cost money, the server asks for a confirmation of the cost first.

What is the Supabase MCP server URL?+

The hosted server is at https://mcp.supabase.com/mcp. If you run Supabase locally with the Supabase CLI, the server is at http://localhost:54321/mcp. The source code is at github.com/supabase/mcp. Settings such as project, read-only mode and tool groups are added as parameters to the address.

How does sign-in work?+

By default with OAuth: you sign in to Supabase in the browser and choose an organization, and the client registers itself. No personal access token is needed. For CI you create a token and send it in an Authorization header. Clients that require a client ID and secret can use a manually created OAuth app.

Is it read-only, or can it change the database?+

With no settings it can write: run SQL, apply migrations, deploy Edge Functions and create projects. Adding read_only=true to the address makes all queries run as a read-only Postgres user. Outside read-only mode the server asks for confirmation before destructive SQL, but Supabase says this is a guardrail, not a guarantee of human review.

Which AI assistants does it work with?+

Supabase documents Claude.ai, ChatGPT and Goose on the web, Cursor, VS Code, Antigravity, Kiro and Warp as editors, and Claude Code, Codex, Gemini CLI, GitHub Copilot and OpenCode, among others. Not every client supports custom headers, which matters if you want to sign in with a token.

Is it safe to connect it to a production database?+

Supabase advises connecting production data only when needed, and then with a single project, read-only mode, few tool groups and narrow queries. The reason is that content in the data, a support ticket for example, can carry instructions that trick the assistant. SQL results are wrapped to counter this, but Supabase says the protection is not foolproof.

How do you limit which tools the assistant gets?+

The features parameter in the address, for example features=database,docs, loads only those groups. The groups are database, debugging, development, Edge Functions, account management, docs, branching and storage, with storage switched off from the start. The project_ref parameter locks the server to one project and also turns off the account tools, such as creating and pausing projects.

Missing a connection?

We build and review MCP servers for teams that need them, and run them behind the same policy and log as the rest of the gateway.