数据库 · 开发者工具

Selfhosted Supabase logo

Selfhosted Supabase

henkdz/selfhosted-supabase-mcp

这是一个专为自托管Supabase实例设计的Model Context Protocol (MCP)服务器项目,提供了数据库管理、模式查询、用户认证、存储查看等功能,支持通过MCP客户端工具进行开发环境集成。

安装

npx -y @smithery/cli install @HenkDz/selfhosted-supabase-mcp --client claude

客户端配置

{
  "mcpServers": {
    "selfhosted-supabase": {
      "command": "bun",
      "args": [
        "run",
        "<path-to-dist/index.js>",
        "--url",
        "<your-supabase-url>",
        "--anon-key",
        "<value>",
        "--service-key",
        "<value>",
        "--db-url",
        "<your-db-url>",
        "--jwt-secret",
        "<value>",
        "--tools-config",
        "<path-to-your-mcp-tools.json>"
      ]
    }
  }
}

环境变量

SUPABASE_URLSUPABASE_ANON_KEYSUPABASE_SERVICE_ROLE_KEYDATABASE_URLSUPABASE_AUTH_JWT_SECRET
GitHub 星标
2
作者
@henkdz
分类
数据库, 开发者工具
许可证
MIT
更新于
2026年10月6日

工具(40)

  • Regular

    tools are accessible by any authenticated Supabase JWT (authenticated or service_role role).

  • Privileged

    tools require a service_role JWT (HTTP mode) or direct database/service-key access (stdio mode).

  • list_tables

    Lists tables in the database schemas

  • list_extensions

    Lists installed PostgreSQL extensions

  • list_available_extensions

    Lists all available (installable) extensions

  • list_migrations

    Lists applied migrations from supabase_migrations.schema_migrations

  • apply_migration

    Applies a SQL migration and records it in supabase_migrations.schema_migrations

  • list_table_columns

    Lists columns for a specific table

  • list_indexes

    Lists indexes for a specific table

  • list_constraints

    Lists constraints for a specific table

  • list_foreign_keys

    Lists foreign keys for a specific table

  • list_triggers

    Lists triggers for a specific table

  • list_database_functions

    Lists user-defined database functions

  • get_function_definition

    Gets the source definition of a function

  • get_trigger_definition

    Gets the source definition of a trigger

  • execute_sql

    Executes an arbitrary SQL query

  • explain_query

    Runs EXPLAIN ANALYZE on a query

  • get_database_connections

    Shows active connections (pg_stat_activity)

  • get_database_stats

    Retrieves database statistics (pg_stat_*)

  • get_index_stats

    Shows index usage statistics

  • get_vector_index_stats

    Shows pgvector index statistics

  • list_rls_policies

    Lists Row-Level Security policies for a table

  • get_rls_status

    Shows RLS enabled/disabled status for tables

  • get_advisors

    Retrieves security and performance advisory notices

  • get_project_url

    Returns the configured Supabase URL

  • verify_jwt_secret

    Checks if the JWT secret is configured

  • generate_typescript_types

    Generates TypeScript types from the database schema

  • rebuild_hooks

    Restarts the pg_net worker (if used)

  • get_logs

    Retrieves recent log entries (analytics stack or CSV fallback)

  • list_auth_users

    Lists users from auth.users

  • get_auth_user

    Retrieves details for a specific user

  • create_auth_user

    Creates a new user in auth.users (password bcrypt-hashed via pgcrypto)

  • update_auth_user

    Updates user details (password bcrypt-hashed if changed)

  • delete_auth_user

    Deletes a user from auth.users

  • list_storage_buckets

    Lists all storage buckets

  • list_storage_objects

    Lists objects within a specific bucket

  • get_storage_config

    Retrieves storage bucket configuration

  • update_storage_config

    Updates storage bucket settings

  • list_realtime_publications

    Lists PostgreSQL publications (e.g. supabase_realtime)

  • list_cron_jobs

    Lists scheduled jobs (requires pg_cron extension)

本页信息摘自该项目的 README。 查看 README

支持的客户端

该服务器 README 中提到的客户端:

查看全部
Claude Desktop logo

Claude Desktop

桌面端 · 免费增值 · Proprietary

Anthropic 官方推出的 Claude AI 桌面应用程序。支持 MCP 服务器以扩展功能。

WindowsMacOS
Cline logo

Cline

桌面端 · 免费 · MIT

集成到 IDE 中的 AI 代码助手。支持 MCP 服务器以增强功能。

WindowsMacOSLinux
Cursor logo

Cursor

桌面端 · 免费增值 · Proprietary

首个代理式 IDE。Cursor 编辑器让开发者与 AI 的工作真正融合在一起,提供如魔法般的编码体验。

WindowsMacOSLinux
Windsurf logo

Windsurf

桌面端 · 免费增值 · Proprietary

首个代理式 IDE。Windsurf 编辑器让开发者与 AI 的工作真正融合在一起。

WindowsMacOSLinux

相关 MCP 服务器

更多服务器
Supabase MCP logo

Supabase MCP

supabase-community/supabase-mcp

1.3k

Supabase MCP Server是一个连接Supabase项目与AI助手的工具,通过Model Context Protocol(MCP)标准化大型语言模型(LLMs)与外部服务的交互,实现数据库管理、配置获取和数据查询等功能。

数据库
Genai Toolbox logo

Genai Toolbox

googleapis/genai-toolbox

769

MCP Toolbox for Databases是一个开源数据库MCP服务器,专注于企业级和生产质量,简化工具开发,提供连接池、认证等复杂功能。

数据库
Supabase MCP Server logo

Supabase MCP Server

alexander-zuev/supabase-mcp-server

677

Supabase MCP服务器是一个开源工具,允许IDE安全执行SQL、管理模式变更、调用Supabase管理API和使用Auth Admin SDK,内置安全控制。

数据库
Awesome MCP List logo

Awesome MCP List

MobinX/awesome-mcp-list

645

这是一个持续更新的MCP服务器精选列表,涵盖了浏览器控制、艺术与文化、云平台、命令行、通信、客户数据平台、数据库、开发者工具、数据科学工具、文件系统、金融与金融科技、游戏、知识与记忆、位置服务、营销、监控、搜索和实用工具等多个类别。每个项目都附带了GitHub链接和星标数量,方便用户快速了解和使用。

数据库
PostgreSQL Model Context Protocol (PG MCP) Server logo

PostgreSQL Model Context Protocol (PG MCP) Server

stuzero/pg-mcp-server

440

PG-MCP是一个为PostgreSQL数据库设计的模型上下文协议服务器,提供AI代理发现、连接、查询和理解数据库的API,支持多数据库连接、丰富的目录信息和查询解释功能。

数据库
dbhub logo

dbhub

bytebase/dbhub

332

DBHub是一个实现模型上下文协议(MCP)的通用数据库网关,支持多种数据库连接和操作。

数据库