This project provides a [Model Context Protocol (MCP)](https://github.com/modelcontextprotocol/specification) server designed specifically for
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.
Being a remote server, there is no local install. You register the endpoint with your client, authorise it once, and the tools appear.
Once Selfhosted Supabase MCP Basic Auth is connected, these are the calls the assistant has available:
list_tables — Lists tables in the database schemaslist_extensions — Lists installed PostgreSQL extensionslist_migrations — Lists applied Supabase migrationsapply_migration — Applies a SQL migration scriptexecute_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 URLget_anon_key — Returns the configured Supabase anon keyget_service_key — Returns the configured Supabase service role key (if provided)verify_jwt_secret — Checks if the JWT secret is configured and returns a previewgenerate_typescript_types — Generates TypeScript types from the database schemaYou 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.
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.
| Tool | What it does |
|---|---|
| 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. |
| rebuild_hooks | Attempts to restart the pg_net worker (if used). |
| list_auth_users | Lists users from auth.users. |
{
"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.
| Variable | Description | Required |
|---|---|---|
| SUPABASE_URL | Endpoint or connection string the server talks to. | Yes |
| SUPABASE_ANON_KEY | Credential the server authenticates with. | Yes |
| SUPABASE_SERVICE_ROLE_KEY | Credential the server authenticates with. | Yes |
| DATABASE_URL | Endpoint or connection string the server talks to. | Yes |
| SUPABASE_AUTH_JWT_SECRET | Credential the server authenticates with. | Yes |
Read-only SQL access to Postgres — let your assistant inspect schemas and answer questions from real data.
Manage your whole Supabase project in conversation — database, auth, storage, Edge Functions and branches.
Query, modify and analyse local SQLite databases in conversation — the fastest way to chat with a data file.
Metabase ships its own MCP endpoint — search your BI content, build and run queries, and save questions and dashboards without leaving the chat.
Official MongoDB server covering data, schemas and Atlas management — from find queries to spinning up clusters.
Serverless Postgres with database branching — point your assistant at Neon and let it work on disposable copies.