Supabase MCP
by Supabase
Supabase's official MCP server: query the database, run migrations, read logs, check security advisors, and generate TypeScript types directly from an agent, with read-only mode as a first-class safeguard.
Add the hosted server
claude mcp add --transport http supabase "https://mcp.supabase.com/mcp?read_only=true"
About
Supabase's hosted MCP server lets an agent query and migrate your Postgres database, read Edge Function and service logs, check security and performance advisors, and generate TypeScript types, all through browser-based OAuth rather than pasted access tokens.
Defense layers are built in for production use: a read_only flag restricts the server to safe SELECT queries, project scoping limits it to one project, and manual tool approval in your client stays as the final gate.
Key features
- Database queries, migrations, and schema inspection
- Security and performance advisor checks
- TypeScript type generation from your live schema
- Read-only mode and per-project scoping as URL parameters
Use cases
- Let an agent write and run a migration, then verify it against the security advisor
- Debug a slow query by reading Postgres logs directly through the agent
- Generate up-to-date TypeScript types after a schema change
Available tools
execute_sql
Runs a SQL query against the connected Supabase project.
apply_migration
Applies a database migration and records it in migration history.
get_advisors
Returns security or performance advisor warnings for the project.
generate_typescript_types
Generates TypeScript types from the current database schema.
Frequently asked questions
Is it safe to point this at a production database?
Supabase's own guidance is to avoid it: use development projects with non-production data, and add ?read_only=true when you do need to touch anything closer to real data.
Does it work with self-hosted Supabase?
The hosted MCP server targets Supabase-platform projects; self-hosted stacks can connect a generic Postgres MCP server instead, minus the platform-specific tools like advisors and Edge Functions.