About Selfhosted Supabase MCP
Selfhosted Supabase MCP is an MCP server published by HenkDz in the Data category: an MCP Server for your Self Hosted Supabase. Conduid read 43 tools from its source: apply_migration, create_auth_user, delete_auth_user, execute_sql, explain_query, generate_typescript_types and 37 more. No package is published for it, so it installs from a source checkout.
The repository has 137 stars and 46 forks, and its last commit was on 19 Feb 2026. Conduid has no tagged release on record for it. It passes 4 of the 6 static checks Conduid ran on the repository; it does not pass License declared and Scoped permissions. Its topics include data.
Install
git clone https://github.com/HenkDz/selfhosted-supabase-mcpTools (43)
apply_migrationApplies a SQL migration and records it in `supabase_migrations.schema_migrations`| Parameter | Type | Description |
|---|---|---|
| name | string | An optional descriptive name for the migration. |
| sql * | string | The SQL DDL content of the migration. |
| version * | string | The migration version string (e.g., '20240101120000'). |
create_auth_userCreates a new user in `auth.users` (password bcrypt-hashed via pgcrypto)| Parameter | Type | Description |
|---|---|---|
| app_metadata | object | Optional app metadata. |
| email * | string | The email address for the new user. |
| password * | string | Plain text password (min 6 chars). WARNING: Insecure. |
| role | string | User role. |
| user_metadata | object | Optional user metadata. |
delete_auth_userDeletes a user from `auth.users`| Parameter | Type | Description |
|---|---|---|
| user_id * | string | The UUID of the user to delete. |
execute_sqlExecutes an arbitrary SQL query| Parameter | Type | Description |
|---|---|---|
| read_only | boolean | Hint for the RPC function whether the query is read-only (best effort). |
| sql * | string | The SQL query to execute. |
explain_queryRuns `EXPLAIN ANALYZE` on a query| Parameter | Type | Description |
|---|---|---|
| analyze | boolean | Actually execute the query to get real timing. WARNING: This WILL execute the query and modify data for write operations! |
| buffers | boolean | Include buffer usage statistics (requires ANALYZE). |
| costs | boolean | Include estimated costs. |
| format | string | Output format for the plan. |
| settings | boolean | Include non-default configuration settings. |
| sql * | string | The SQL query to analyze. |
| timing | boolean | Include actual timing (requires ANALYZE). |
| verbose | boolean | Include additional details in the plan. |
generate_typescript_typesGenerates TypeScript types from the database schema| Parameter | Type | Description |
|---|---|---|
| included_schemas | array | Database schemas to include in type generation. |
| output_filename | string | Filename to save the generated types to in the workspace root. |
| output_path * | string | Absolute path where to save the file. If provided, output_filename will be ignored. |
get_advisorsRetrieves security and performance advisory noticesget_auth_userRetrieves details for a specific user| Parameter | Type | Description |
|---|---|---|
| user_id * | string | The UUID of the user to retrieve. |
get_cron_job_historyShows recent execution history for a cron job| Parameter | Type | Description |
|---|---|---|
| jobid | number | Filter by specific job ID. |
| jobname | string | Filter by job name pattern. |
| limit | number | Maximum number of records to return. |
| status | string | Filter by execution status. |
get_database_connectionsShows active connections (`pg_stat_activity`)get_database_statsRetrieves database statistics (`pg_stat_*`)get_edge_function_detailsGets details and metadata for an Edge Function| Parameter | Type | Description |
|---|---|---|
| function_identifier * | string | The function ID (UUID) or slug to look up |
get_function_definitionGets the source definition of a function| Parameter | Type | Description |
|---|---|---|
| argument_types | string | Argument types to disambiguate overloaded functions (e.g., "integer, text"). |
| function_name * | string | Name of the function. |
| schema | string | Schema name (defaults to public). |
get_index_statsShows index usage statistics| Parameter | Type | Description |
|---|---|---|
| index_name * | string | Name of the index. |
| schema | string | Schema name (defaults to public). |
get_logsRetrieves recent log entries (analytics stack or CSV fallback)| Parameter | Type | Description |
|---|---|---|
| limit | number | Maximum number of log entries to return (default: 100, max: 1000) |
get_project_urlReturns the configured Supabase URLget_rls_statusShows RLS enabled/disabled status for tables| Parameter | Type | Description |
|---|---|---|
| schema | string | Filter by schema name. |
| table | string | Filter by table name. |
get_storage_configRetrieves storage bucket configuration| Parameter | Type | Description |
|---|---|---|
| bucket_id | string | Optional bucket ID to get config for a specific bucket. If omitted, returns all buckets. |
get_trigger_definitionGets the source definition of a trigger| Parameter | Type | Description |
|---|---|---|
| include_function | boolean | Include the trigger function source code. |
| schema | string | Schema name (defaults to public). |
| table * | string | Table name the trigger is on. |
| trigger_name * | string | Name of the trigger. |
get_vector_index_statsShows pgvector index statistics| Parameter | Type | Description |
|---|---|---|
| indexname | string | Filter by index name. |
| schema | string | Filter by schema name. |
| table | string | Filter by table name. |
list_auth_usersLists users from `auth.users`| Parameter | Type | Description |
|---|---|---|
| limit | number | Max number of users to return |
| offset | number | Number of users to skip |
list_available_extensionsLists all available (installable) extensions| Parameter | Type | Description |
|---|---|---|
| name_pattern | string | Filter by extension name pattern (SQL LIKE). |
| show_installed | boolean | Include already installed extensions. |
list_constraintsLists constraints for a specific table| Parameter | Type | Description |
|---|---|---|
| constraint_type | string | Filter by constraint type. |
| include_system | boolean | Include constraints in system schemas. |
| schema | string | Filter by schema name. |
| table | string | Filter by table name. |
list_cron_jobsLists scheduled jobs (requires `pg_cron` extension)list_database_functionsLists user-defined database functions| Parameter | Type | Description |
|---|---|---|
| language | string | Filter by language (e.g., plpgsql, sql). |
| name_pattern | string | Filter functions by name pattern (SQL LIKE pattern). |
| schema | string | Filter functions by schema name. |
list_edge_function_logsRetrieves recent logs for an Edge Function| Parameter | Type | Description |
|---|---|---|
| errors_only | boolean | Only show logs with errors (status >= 400). |
| function_id | string | Filter by function ID/slug. |
| limit | number | Maximum number of log entries to return. |
| status_code | number | Filter by HTTP status code. |
list_edge_functionsLists deployed Edge Functionslist_extensionsLists installed PostgreSQL extensionslist_foreign_keysLists foreign keys for a specific table| Parameter | Type | Description |
|---|---|---|
| include_system | boolean | Include foreign keys in system schemas. |
| schema | string | Filter by schema name. |
| table | string | Filter by table name. |
list_indexesLists indexes for a specific table| Parameter | Type | Description |
|---|---|---|
| include_system | boolean | Include indexes on system tables. |
| schema | string | Filter indexes by schema name. |
| table | string | Filter indexes by table name. |
list_migrationsLists applied migrations from `supabase_migrations.schema_migrations`list_realtime_publicationsLists PostgreSQL publications (e.g. `supabase_realtime`)list_rls_policiesLists Row-Level Security policies for a table| Parameter | Type | Description |
|---|---|---|
| schema | string | Filter policies by schema name. |
| table | string | Filter policies by table name. |
list_storage_bucketsLists all storage bucketslist_storage_objectsLists objects within a specific bucket| Parameter | Type | Description |
|---|---|---|
| bucket_id * | string | The ID of the bucket to list objects from. |
| limit | number | Max number of objects to return |
| offset | number | Number of objects to skip |
| prefix | string | Filter objects by a path prefix (e.g., 'public/') |
list_table_columnsLists columns for a specific table| Parameter | Type | Description |
|---|---|---|
| schema | string | Schema name (defaults to public). |
| table * | string | Table name to get columns for. |
list_tablesLists tables in the database schemaslist_triggersLists triggers for a specific table| Parameter | Type | Description |
|---|---|---|
| schema | string | Filter triggers by schema name. |
| table | string | Filter triggers by table name. |
list_vector_indexesLists pgvector indexes (requires `pgvector` extension)rebuild_hooksRestarts the `pg_net` worker (if used)update_auth_userUpdates user details (password bcrypt-hashed if changed)| Parameter | Type | Description |
|---|---|---|
| app_metadata | object | New app metadata (will overwrite existing). |
| string | New email address. | |
| password | string | New plain text password (min 6 chars). WARNING: Insecure. |
| role | string | New role. |
| user_id * | string | The UUID of the user to update. |
| user_metadata | object | New user metadata (will overwrite existing). |
update_storage_configUpdates storage bucket settings| Parameter | Type | Description |
|---|---|---|
| allowed_mime_types | array | Array of allowed MIME types (e.g., ["image/png", "image/jpeg"]). Empty array means all types allowed. |
| bucket_id * | string | The bucket ID to update |
| file_size_limit | number | Maximum file size in bytes (0 or null for no limit) |
| public | boolean | Whether the bucket is publicly accessible |
verify_jwt_secretChecks if the JWT secret is configuredSecurity checks
Static checks derived from the repository 11 days ago. Heuristics on the source, not an audit.
- ✓README presentThe repository's README runs to about 3.1K words.
- !License declaredNo license file. Legally you have no right to use it in a product.
- ✓Tests presentA test suite exists in the repository.
- ✓Dependencies pinnedDependency versions are pinned by bun.lock.
- ✓No dynamic code executionScanned 50 source files and found no eval, dynamic Function or shell execution.
- !Scoped permissionsDoesn't declare a permission scope. Assume it can do anything its process can.
What the source scan found
- Transport
- stdio and Streamable HTTPsrc/index.ts:3, src/server/http-server.ts:18
- Starts other programs
- No calls that start other programs
- Outbound network calls
- No outbound network calls
- Writes or deletes files
- No file writes or deletes
- Lockfile
- bun.lock
Pattern matches on the source text of 50 files: places to read, not proof of what the code does at run time.
README
The repository's README runs to about 3.1K words, fetched a month ago. The original in the repository is authoritative.
Read full README