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?

Selfhosted Supabase MCP Basic Auth MCP server is a hosted integration for AI assistants that speak the Model Context Protocol. This project provides a Model Context Protocol (MCP) server designed specifically for interacting with self-hosted Supabase instances. It bridges the gap between MCP clients.

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 —

Setting it up

Being a remote server, there is no local install. You register the endpoint with your client, authorise it once, and the tools appear.

What the assistant can call

Once Selfhosted Supabase MCP Basic Auth is connected, these are the calls the assistant has available:

  • 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
  • execute_sql — Executes an arbitrary SQL query (via RPC or direct connection)
  • get_database_connections — Shows active database connections (pg_stat_activity)
  • get_database_stats — Retrieves database statistics (pg_stat_*)
  • get_project_url — Returns the configured Supabase URL
  • get_anon_key — Returns the configured Supabase anon key
  • get_service_key — Returns the configured Supabase service role key (if provided)
  • verify_jwt_secret — Checks if the JWT secret is configured and returns a preview
  • generate_typescript_types — Generates TypeScript types from the database schema

Configuration and credentials

You will need 5 environment variables: SUPABASE_URL, SUPABASE_ANON_KEY, SUPABASE_SERVICE_ROLE_KEY, DATABASE_URL, SUPABASE_AUTH_JWT_SECRET. The server will not start without them, which is usually why the tools fail to appear on a first run. Keep credentials in your client's env block or a secrets manager rather than in a file you might commit.

  • 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).

Before you rely on it

  • Your data travels to the provider's service, so the usual questions apply about what you send and what they retain.
  • With 14 tools registered it takes up a noticeable share of the context window; turn it off in projects that never touch Selfhosted Supabase MCP Basic Auth.
  • Missing credentials fail quietly in some clients — if no tools show up, check the environment block first.
  • MCP clients confirm each tool call by default. Leave that on until you have watched what the selfhosted supabase mcp basic auth mcp server does with a few real requests.

Choosing this one

This sits in the database access group, where several servers overlap in what they claim to do but differ sharply once you actually set them up. Selfhosted Supabase MCP Basic Auth's toolset — list_tables, list_extensions, list_migrations and 11 more — is a fair guide to whether it matches your workflow. It is maintained by abushadab; worth a glance at recent repository activity before you build anything load-bearing on it.

This entry was verified against Selfhosted Supabase MCP Basic Auth's own documentation before publication; SyncDev keeps the directory reviewed rather than auto-generated.

Available tools

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.

How to install the Selfhosted Supabase MCP Basic Auth MCP server

{
  "mcpServers": {
    "selfhosted-supabase-mcp-basic-auth": {
      "command": "npx",
      "args": ["-y", "@smithery/cli"],
      "env": {
        "SUPABASE_URL": "your-value",
        "SUPABASE_ANON_KEY": "your-value",
        "SUPABASE_SERVICE_ROLE_KEY": "your-value",
        "DATABASE_URL": "your-value",
        "SUPABASE_AUTH_JWT_SECRET": "your-value"
      }
    }
  }
}

Add to claude_desktop_config.json, then restart Claude Desktop.

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

It connects Selfhosted Supabase MCP Basic Auth to MCP-compatible AI assistants such as Claude and Cursor, exposing 14 tools (list_tables, list_extensions, list_migrations, and more) that the assistant can call on your behalf. Instead of copying data back and forth by hand, the assistant works with Selfhosted Supabase MCP Basic Auth directly.