Selfhosted Supabase MCP Server

MCP server for self-hosted Supabase instances with 50+ database management tools

Remote serverstreamable-httpTypeScript

What is the Selfhosted Supabase MCP Server?

MCP server for self-hosted Supabase instances with 50+ database management tools

The short version

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 (like IDE extensions) and your local or privately hosted Supabase projects, enabling database introspection, management, and interaction directly from your development environment.

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

What it needs from you

  • Bun v1.1 or later (replaces Node.js/npm — used for runtime and builds) * Access to your self-hosted Supabase instance (URL, keys, and optionally a direct PostgreSQL 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
generate_typescript_typesGenerates TypeScript types from the database schema
rebuild_hooksRestarts the pg_net worker (if used)
get_logsRetrieves recent log entries (analytics stack or CSV fallback)
list_cron_jobsLists scheduled jobs (requires pg_cron extension)
get_cron_job_historyShows recent execution history for a cron job
list_vector_indexesLists pgvector indexes (requires pgvector extension)
list_edge_functionsLists deployed Edge Functions
get_edge_function_detailsGets details and metadata for an Edge Function
list_edge_function_logsRetrieves recent logs for an Edge Function

How to install the Selfhosted Supabase MCP Server

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

From the project documentation. Replace placeholders and example paths before connecting.

Configuration

  • Bun v1.1 or later (replaces Node.js/npm — used for runtime and builds) * Access to your self-hosted Supabase instance (URL, keys, and optionally a direct PostgreSQL connection string).

Example prompts to try

  • “Use Selfhosted Supabase MCP to generate typescript types.”
  • “Use Selfhosted Supabase MCP to rebuild hooks.”
  • “Use Selfhosted Supabase MCP to get logs.”

Frequently asked questions

MCP server for self-hosted Supabase instances with 50+ database management tools Confirm the tools offered by your installed version in the connected client. Tool availability and permissions depend on the server and account configuration.