home / mcp / supabase mcp server

Supabase MCP Server

Provides access to Supabase data sources and management tools for AI assistants via MCP

Installation
Add the following to your MCP client configuration file.

Configuration

View docs
{
  "mcpServers": {
    "supabase-community-supabase-mcp": {
      "url": "https://mcp.supabase.com/mcp"
    }
  }
}

You can connect your Supabase projects to AI assistants using the MCP server to let the models manage tables, fetch configurations, and query data. This enables automated workflows and smarter data interactions while keeping control over access and scope.

How to use

You interact with the MCP server through an MCP client. Start by configuring the client to point at the Supabase MCP server URL. You can tailor what the AI can do by adjusting project scoping, read-only mode, and enabled tool groups.

Key usage patterns include: limiting the server to a specific project so the AI only accesses resources within that project; enabling read-only mode to prevent data modification; and selecting tool groups to expose only the necessary capabilities (for example, database and docs tools). The server exposes tools across account management, database operations, documentation search, edge functions, deployment and branching tasks, and storage configuration, among others. You should review tool access regularly to minimize risk and ensure the AI performs only intended actions.

When you enable a client, you’ll typically log in to your Supabase organization during setup and select the project you want the AI to work with. The server URL to use for the client, by default, is the public MCP endpoint provided for Supabase users.

How to install

Prerequisites you should have on hand before integrating the MCP server with your MCP client: a modern web environment and access to your Supabase account. Ensure you have the MCP client ready to configure with a server URL and optional query parameters.

Step 1: Prepare the MCP client configuration. Include the MCP server URL and any optional settings you want applied, such as read_only, project_ref, and features that enable specific tool groups.

Step 2: Supply the configuration to your MCP client so it can prompt you to log in to Supabase and select the organization and project to use.

Step 3: Start using the MCP client to issue requests to the Supabase MCP server. Validate that the AI can access the intended project and that only the allowed tools are available.

Configuration and tools

Configuration options you can apply via the MCP server URL include read_only to restrict operations, project_ref to scope access to a single project, and features to enable or disable tool groups such as account, docs, database, debugging, development, functions, storage, and branching. If you omit project_ref, the server can access all projects in your Supabase account, so applying project scoping is recommended for safety.

Tool groups expose a range of capabilities. For example:

Account tools handle project and organization management tasks like listing projects, getting project details, creating projects, and managing organizations.

Knowledge base tools enable searching the Supabase documentation.

Database tools include listing tables, listing extensions, applying migrations, and executing SQL.

Debugging tools retrieve logs and advisory notices for security or performance.

Development tools provide access to project URLs and API keys, and generate TypeScript types from the database schema.

Edge Functions tools manage deployment and retrieval of edge function files.

Branching tools (experimental, requires a paid plan) manage development branches for migrations and code.

Storage tools (disabled by default) can list storage buckets and get or update storage configuration.

Security notes

Prompts can attempt to inject untrusted instructions into tool calls. Always review tool call details before execution and enable per-call authorization in your MCP client whenever possible.

Recommendations include using read_only mode for real data, scoping the server to a single project, using branching for development work, and selectively enabling feature groups to minimize surface area for unintended actions.

Available tools

list_projects

Lists all Supabase projects for the user.

get_project

Gets details for a project.

create_project

Creates a new Supabase project.

pause_project

Pauses a project.

restore_project

Restores a project.

list_organizations

Lists all organizations that the user is a member of.

get_organization

Gets details for an organization.

get_cost

Gets the cost of a new project or branch for an organization.

confirm_cost

Confirms the user's understanding of new project or branch costs.

search_docs

Searches the Supabase documentation for up-to-date information.

list_tables

Lists all tables within the specified schemas.

list_extensions

Lists all extensions in the database.

list_migrations

Lists all migrations in the database.

apply_migration

Applies a SQL migration to the database.

execute_sql

Executes raw SQL in the database.

get_logs

Gets logs for a Supabase project by service type.

get_advisors

Gets advisory notices for a Supabase project.

get_project_url

Gets the API URL for a project.

get_publishable_keys

Gets the anonymous API keys for a project.

generate_typescript_types

Generates TypeScript types based on the database schema.

list_edge_functions

Lists all Edge Functions in a Supabase project.

get_edge_function

Retrieves file contents for an Edge Function.

deploy_edge_function

Deploys a new Edge Function to a Supabase project.

create_branch

Creates a development branch with migrations from production.

list_branches

Lists all development branches.

delete_branch

Deletes a development branch.

merge_branch

Merges migrations and edge functions from a development branch to production.

reset_branch

Resets migrations of a development branch to a prior version.

rebase_branch

Rebases development branch on production to handle migration drift.

list_storage_buckets

Lists all storage buckets in a Supabase project.

get_storage_config

Gets the storage config for a Supabase project.

update_storage_config

Updates the storage config for a Supabase project.