Supabase MCP Server
Supabase ships an official MCP server with 20+ tools that let AI clients like Cursor and Claude create projects, manage tables via migrations, run SQL, create database branches, fetch config and logs, and generate TypeScript types. Setup is a JSON config running the npx package with a personal access token. MCP standardizes tool implementations so clients can use any compliant server, and it also defines resources and prompts, which most clients don't yet support. The roadmap covers deploying Edge Functions, OAuth-based authorization from the 2025-03-26 spec, more token-efficient schema discovery than querying information_schema, and confirmation before destructive operations.
Related posts
- Give your Supabase app its own MCP server
Supabase mediumAdeptSupabase apps can expose their own MCP server so customers use the app from ChatGPT, Claude or other MCP clients, signed in with their existing account. An installable MCP Server block generates an Edge Function with an MCP handler, OAuth middleware and per-file tools. Supabase Auth acts as the OAuth 2.1 server, and `withSupabase({ auth: 'user' })` gives each tool a user-scoped client, so Postgres RLS policies govern what an agent can reach without a service role key. Setup requires asymmetric signing keys, dynamic client registration, a consent page and `verify_jwt = false` on the function; MCP Apps can render reused React components inside the chat.
- Building ChatGPT Apps with Supabase Edge Functions and mcp-use
Supabase mediumAdeptChatGPT apps built on OpenAI's Apps SDK consist of an MCP server backend and an iframe-rendered web component, and mcp-use lets that MCP server run on Supabase Edge Functions by using Hono instead of the Express-based official SDK. The walkthrough builds a database explorer exposing list-tables, show-table, execute-SQL and Supabase-status tools, each returning React widgets. It distinguishes display-only widgets, which are auto-registered as tools and fetch data client-side, from data-returning widgets, where the server sends separate props to the UI and output to the LLM. It closes with deployment via an mcp-use script and connecting the endpoint in ChatGPT developer mode.
- Supabase CLI v1 and Management API Beta
Supabase mediumAdeptSupabase CLI v1 leaves beta with commands to manage organizations, projects and Edge Functions, plus database migration tooling, CI/CD workflows and TypeScript type generation. Schema diffing adds an experimental migra backend (`db diff --use-migra`), which runs faster and emits more concise DDL than the previous PgAdmin-based approach, which mishandled default privileges in role grants. Local database branching lets developers test manual migrations without data loss, and `db push` plus a GitHub Actions example cover releasing to staging and production. A beta REST Management API, already used by the CLI, exposes project and organization management for automation and future Terraform/Pulumi integrations.
- Supabase CLI v2: Config as Code
Supabase mediumAdeptSupabase CLI v2 adds configuration as code: a committed `config.toml` declares Auth redirect URLs, Edge Function settings, Storage buckets seeded from local files, Postgres settings and experimental database webhooks, and these are promoted across preview, staging and production environments. `supabase link` diffs local config against the remote project to detect drift. With Branching enabled, config syncs automatically to ephemeral branches, and `[remotes]` blocks keyed by project ID override settings for persistent branches. The Management API decides whether a Postgres setting needs a restart or can be applied with a reload signal. Edge Function secrets still have to be set manually on branches, and v2 has no breaking changes.
- Supabase Branching
Supabase mediumAdeptSupabase Branching gives each Git branch an isolated hosted Preview environment with its own Postgres database, Auth, Storage, Realtime, Edge Functions and APIs, plus separate credentials. A GitHub app runs migrations from ./supabase/migrations when a PR opens, applies new migration files incrementally on push, seeds from seed.sql, and runs the migrations against production on merge. It integrates with Vercel Preview deployments by auto-populating branch connection secrets. Early access is rolling out in batches to paid orgs, with copy-on-write snapshots, declarative config and automatic dashboard commits planned.