MCP server, by Supabase
Supabase MCP Server
Supabase MCP server that connects Supabase projects to AI assistants for table management, config access, and data queries.
Quick facts
What it does
The Supabase MCP Server connects Supabase projects to Cursor, Claude, Windsurf and other AI assistants. Through MCP, an assistant connects directly to a project and can manage tables, fetch config and query data. The hosted server is at https://mcp.supabase.com/mcp over Streamable HTTP, and most clients need type http and that URL. The client prompts you to log in to Supabase during setup, and the README says to choose the organization that contains the project you want to work with. A per-project URL can be generated in the MCP connection tab of the Supabase dashboard.
Tools are organized into feature groups, and groups your connection supports are enabled by default except Storage. The Supabase tools page lists them. Database: list_tables, list_extensions, list_migrations, apply_migration and execute_sql. Debugging: query_logs, a read-only SQL query against project logs, and get_advisors for security and performance advisors. Development: get_project_url, get_publishable_keys and generate_typescript_types. Edge Functions: list_edge_functions, get_edge_function, deploy_edge_function and create_edge_function_secret. Docs: search_docs. Account management covers listing and managing projects and organizations plus get_cost and confirm_cost. Branching, which needs a paid plan, and Storage, off by default, have their own tools.
Four URL query parameters control scope. read_only=true executes all queries as a read-only Postgres user. project_ref=<id> scopes the connection to one project and disables the account management tools. features=<groups> enables only the named groups, for example database,docs. skip_elicitations=<tools> skips form confirmations for the named tools: create_project, create_branch, execute_sql or apply_migration, case-sensitive, with invalid names rejected and no all switch. Parameters combine, as in ?project_ref=abc123&read_only=true. The feedback tools are disabled in read-only mode.
Elicitation is a guardrail layered on top of your client's own tool approval. The Supabase documentation says it can pause a tool call to ask for input, using forms for cost confirmation and destructive SQL confirmation, and URLs for Edge Function secret entry. It does not replace manual approval, and some clients support hooks or rules that answer elicitations automatically, so the documentation says to treat it as a guardrail rather than proof that a person approved each action. Cost confirmation applies to create_project and create_branch, and confirmations expire after a short time.
Other environments differ. With the Supabase CLI the server is at http://localhost:54321/mcp, and the README says CLI and self-hosted environments offer a limited subset of tools and no OAuth 2.1. The @supabase/mcp-server-supabase package exports createToolSchemas() to give the Vercel AI SDK MCP client static schemas, with features, projectScoped and readOnly options mirroring the URL parameters, and createSupabaseMcpHandler() to serve the tools from your own HTTP endpoint. The README says that handler speaks the current protocol revision only, so a client that speaks only the 2025-era protocol receives an HTTP 400, and that the server does not send structuredContent in tool results.
Configuration
Configure the MCP client with type http and url https://mcp.supabase.com/mcp, then log in to Supabase when prompted. A per-project MCP URL can be generated from the MCP connection tab in the Supabase dashboard. Local CLI access runs at http://localhost:54321/mcp with a limited tool subset and no OAuth 2.1.
{"mcpServers":{"supabase":{"type":"http","url":"https://mcp.supabase.com/mcp"}}}Source: https://github.com/supabase/mcp. Placeholders only. Replace them in your own environment, and never commit real keys to a repository.
The official documentation lists no required environment variables.
Tools and features on record
Database tools Config checked
list_tables, list_extensions, list_migrations, apply_migration and execute_sql. apply_migration and execute_sql can ask for confirmation when destructive SQL is detected and the client supports forms.
Debugging tools Config checked
query_logs runs a read-only SQL query against project logs. get_advisors returns security and performance advisors.
Development tools Config checked
get_project_url (input project_id, output url), get_publishable_keys and generate_typescript_types.
Edge Functions Config checked
list_edge_functions, get_edge_function, deploy_edge_function, and create_edge_function_secret, which requests secret entry in the Supabase Dashboard when available.
Account management Config checked
Project and organization tools plus get_cost and confirm_cost. Disabled when project_ref is set.
Docs and branching Config checked
search_docs searches Supabase documentation. Experimental branching tools create, list, delete, merge, reset and rebase branches and need a paid plan.
Storage (off by default) Config checked
list_storage_buckets, get_storage_config and update_storage_config, enabled only if you turn the group on.
read_only, project_ref, features Config checked
URL parameters that run queries as a read-only Postgres user, scope to one project, and enable only chosen feature groups.
skip_elicitations Config checked
Skips form confirmations for create_project, create_branch, execute_sql or apply_migration. Names are case-sensitive and there is no all switch.
AI SDK helpers Config checked
createToolSchemas() for typed AI SDK tools, and createSupabaseMcpHandler() for self-hosting the endpoint, which rejects 2025-era-only clients with HTTP 400.
Security notes
- The README's first setup step is to read Supabase's security best practices, which cover the risks of connecting an LLM to your projects and how to mitigate them. Follow that before connecting a project that holds real data.
- execute_sql and apply_migration run SQL against the project database. Without read_only=true they can change or delete data and schema. Use read_only=true, which executes queries as a read-only Postgres user, for any session that only needs to look.
- Scope the connection with project_ref so the agent sees one project, and the account management tools (create, pause and restore projects, organization tools) are disabled. Use the features parameter to enable only the groups you need, for example database and docs.
- Query results go into the model context. Rows can contain personal data, and text stored in your tables can contain instructions aimed at the model. Treat database content as untrusted input, and prefer a development or branch database over production.
- Elicitation confirmations for cost and destructive SQL are a guardrail, not proof of review. Some clients answer elicitations automatically, and skip_elicitations removes the prompt for named tools. Keep your client's own per-tool approval on.
- create_project and create_branch can incur charges. Cost confirmation exists, but the documentation says skipping the form does not approve the cost or avoid charges, and branching needs a paid plan.
- Login is OAuth through the hosted endpoint using dynamic client registration, so the access granted matches the Supabase account and organization you choose and no personal access token is needed for interactive use. The Supabase documentation says the server operates with your developer permissions and should not be given to customers or end users. For CI it documents a personal access token sent in an Authorization: Bearer header, scoped to the project with only the permissions the enabled tools need, and a manually created OAuth app currently has to be granted write access to all scopes. CLI and self-hosted servers offer a limited tool subset and no OAuth 2.1.
An MCP server runs with the permissions of the process you start it from. Scope credentials to the narrowest access the job needs, and review what the client will send before connecting anything sensitive.
Sources and freshness
Checked 2026-11-03. Config-checked means the configuration and feature list trace to the official source above; it does not mean AgentsUse ran the server. Send corrections through the contact page. Back to the MCP server index.