Selfhosted Supabase MCP Basic Auth MCP Server

This project provides a [Model Context Protocol (MCP)](https://github.com/modelcontextprotocol/specification) server designed specifically for

Remote serverstreamable-httpTypeScript

What is the Selfhosted Supabase MCP Basic Auth MCP Server?

This project provides a Model Context Protocol (MCP) server designed specifically for interacting with

What you get

  • Schema & Migrations —
  • list_tables: Lists tables in the database schemas
  • list_extensions: Lists installed PostgreSQL extensions
  • list_migrations: Lists applied Supabase migrations
  • apply_migration: Applies a SQL migration script
  • Database Operations & Stats —

Configuration and credentials

  • Node.js (Version 18.x or later recommended) * npm (usually included with Node.js) * Access to your self-hosted Supabase instance (URL, keys, potentially direct DB connection string).

More MCP options

Compare MCP servers by category, or browse hosted MCP servers if you prefer an endpoint over a local process.

Maintainer setup documentation.

Recorded tools

Check the linked publisher documentation and your connected client's tool list. Names and availability can vary with the server version and account permissions.

ToolWhat it does
list_tablesLists tables in the database schemas.
list_extensionsLists installed PostgreSQL extensions.
list_migrationsLists applied Supabase migrations.
apply_migrationApplies a SQL migration script.
execute_sqlExecutes an arbitrary SQL query (via RPC or direct connection).
get_database_connectionsShows active database connections (pg_stat_activity).
get_database_statsRetrieves database statistics (pg_stat_*).
get_project_urlReturns the configured Supabase URL.
get_anon_keyReturns the configured Supabase anon key.
get_service_keyReturns the configured Supabase service role key (if provided).
verify_jwt_secretChecks if the JWT secret is configured and returns a preview.
generate_typescript_typesGenerates TypeScript types from the database schema.
rebuild_hooksAttempts to restart the pg_net worker (if used).
list_auth_usersLists users from auth.users.

Configuration

  • Node.js (Version 18.x or later recommended) * npm (usually included with Node.js) * Access to your self-hosted Supabase instance (URL, keys, potentially direct DB connection string).
VariableDescriptionRequired
SUPABASE_URLEndpoint or connection string the server talks to.Yes
SUPABASE_ANON_KEYCredential the server authenticates with.Yes
SUPABASE_SERVICE_ROLE_KEYCredential the server authenticates with.Yes
DATABASE_URLEndpoint or connection string the server talks to.Yes
SUPABASE_AUTH_JWT_SECRETCredential the server authenticates with.Yes

Example prompts to try

  • “Use Selfhosted Supabase MCP Basic Auth to list tables.”
  • “Use Selfhosted Supabase MCP Basic Auth to list extensions.”
  • “Use Selfhosted Supabase MCP Basic Auth to list migrations.”

Frequently asked questions

This project provides a [Model Context Protocol (MCP)](https://github.com/modelcontextprotocol/specification) server designed specifically for interacting with Confirm the tools offered by your installed version in the connected client. Tool availability and permissions depend on the server and account configuration.