mcp servers · featured

Supabase MCP Server

Official Supabase MCP. Remote at `https://mcp.supabase.com/mcp` (OAuth), local via `@supabase/[email protected]` (npm, 109,666 weekly downloads). Apache-2.0. `supabase/mcp` repo (2.9k stars) holds the TypeScript source.
by Supabase updated Sep 10, 2026 Apache-2.0
← back to shelf
install via your agent of choice
❯ https://mcp.supabase.com/mcp

## what it does

tl;dr: Supabase’s official MCP supports both remote and local. The remote https://mcp.supabase.com/mcp is the easiest install and gets new tools first. The local TypeScript server is @supabase/mcp-server-supabase (v0.12.0 at the time of writing, 109,666 weekly downloads, Apache-2.0). The Supabase repo is supabase/mcp (2.9k stars).

{
  "mcpServers": {
    "supabase": {
      "type": "http",
      "url": "https://mcp.supabase.com/mcp"
    }
  }
}

OAuth consent happens in your MCP client the first time. You’ll be asked which Supabase org to authorize.

Install (local)

For self-hosted Supabase or strict-network environments, the local server reads the same env-driven options.

npx -y @supabase/mcp-server-supabase@latest

or, in a Supabase dashboard:

  1. Open your project → Connect → top tab MCP.
  2. Copy the URL the dashboard generates (it pre-fills project_ref and a default feature set).

URL parameters

The remote URL accepts these query params; the local server reads the matching env vars.

ParamEnvEffect
project_refPROJECT_REFLock the server to one project — removes project_id from tool inputs and excludes account-level tools.
read_onlyREAD_ONLYExclude mutating tools. Default false.
featuresFEATURESComma list of feature groups (e.g. database,docs).

Example: https://mcp.supabase.com/mcp?project_ref=<ref>&read_only=true&features=database,docs.

AI SDK integration

The package exports createToolSchemas() so Vercel AI SDK’s MCP client can populate typed input/output schemas client-side. Use the matching options (features, projectScoped, readOnly) to filter.

import { createMCPClient } from '@ai-sdk/mcp';
import { createToolSchemas } from '@supabase/mcp-server-supabase';

const mcpClient = await createMCPClient({
  transport: { type: 'http', url: 'https://mcp.supabase.com/mcp' }
});

const tools = await mcpClient.tools({
  schemas: createToolSchemas({ features: ['database', 'docs'], readOnly: true })
});

Self-hosting

The package exports createSupabaseMcpHandler() so you can serve the same tools behind your own endpoint. The handler speaks the current protocol revision only (legacy: 'reject'). When platform carries a per-request credential, create a handler per request and close() it on res.close — sharing one handler across requests forces every request through that single credential.

CLI Supabase (supabase start) exposes MCP at http://localhost:54321/mcp with a limited subset of tools and no OAuth 2.1.

Gotchas

  • Read Supabase’s security best practices before pointing the agent at production. The default feature set includes destructive tools.
  • Self-hosted Supabase MCP is a limited subset today (no OAuth 2.1).
  • The server does not send structuredContent in tool results; the AI SDK falls back to JSON-parsing the content text.

## compatibility

claude-desktop ✓
claude-code ✓
cursor ✓
windsurf ✓

## exposed tools

→ unspecified

## embed this badge

cache ✓ in cache.directory
![cached](https://cache.directory/badge/supabase-mcp.svg)