Supabase MCP is a Model Context Protocol server that connects AI assistants such as Cursor, Claude, and Windsurf to your Supabase projects, letting them manage tables, fetch configuration, and query data. MCP standardizes how LLMs talk to external services, and this server implements it for the Supabase platform.
The hosted endpoint at https://mcp.supabase.com/mcp uses OAuth 2.1, so an MCP client prompts you to log in to Supabase and choose an organization during setup. URL parameters restrict what the server exposes: projectref scopes it to one project, readonly=true removes mutating tools, and features limits it to feature groups such as database and docs. The Supabase CLI serves a local MCP endpoint, and self-hosted Supabase can enable one too. Both offer a reduced tool subset and no OAuth.
The @supabase/mcp-server-supabase package also works as a library. createToolSchemas() returns typed input and output schemas so the Vercel AI SDK can treat the tools as static tools with client-side validation, and createSupabaseMcpHandler() serves the tools over HTTP from your own endpoint with your own authentication, either per request with a per-request credential or as a long-lived handler backed by a shared service token. A separate @supabase/mcp-server-postgrest package exposes your app's REST API to your own users over MCP.
Features
- Project management tools: manage tables, fetch config, and query data from an AI assistant
- Hosted endpoint: OAuth 2.1 login flow with organization selection
- Scoping options: projectref, readonly, and features URL parameters, plus a dashboard URL builder
- Local and self-hosted modes: CLI and self-hosted endpoints with a limited tool subset
- AI SDK integration: createToolSchemas() with features, projectScoped, and readOnly filters for typed static tools
- Self-hosted handler: createSupabaseMcpHandler() for serving tools from your own HTTP server, current protocol revision only
- PostgREST server: a companion MCP server for exposing your own app's REST API
- Security guidance: documented risks and mitigations for connecting an LLM to a project


