selfhosted-supabase-mcp
The Self-Hosted Supabase MCP Server is designed to facilitate developers' interactions with self-hosted Supabase instances. It enables database management, statistics inspection, and user management, among other features, directly from development environments.
Self-Hosted Supabase MCP Server
Overview
This project provides a Model Context Protocol (MCP) server specifically for interacting with self-hosted Supabase instances. It facilitates database introspection, management, and interaction directly from your development environment, focusing on the self-hosted use case by adapting features from the official Supabase cloud MCP server.
Purpose
The server enables developers using self-hosted Supabase installations to leverage MCP-based tools for:
- Querying database schemas
- Managing migrations
- Inspecting statistics
- Managing users
- Interacting with storage
Features (Implemented Tools)
- Schema & Migrations: List tables, PostgreSQL extensions, Supabase migrations.
- Database Operations & Stats: Execute SQL queries, view database connections and statistics.
- Project Configuration & Keys: Retrieve configuration details and verify settings.
- Development & Extension Tools: Generate TypeScript types, rebuild hooks.
- Auth User Management: List, create, update, delete users.
- Storage Insights: List storage buckets and objects.
- Realtime Inspection: List PostgreSQL publications.
Setup and Installation
Prerequisites
- Node.js (18.x or later)
- npm package manager
Steps
- Clone the repository
- Install dependencies
- Build the project
Configuration
Requires configuration for your Supabase instance via CLI arguments or environment variables.
Usage
Run the server using Node.js with requisite configuration provided via arguments or environment variables.
Development
- Language: TypeScript
- Build: TypeScript Compiler
- Dependencies: Managed via npm
- Core Libraries:
@supabase/supabase-js
,pg
,zod
,commander
,@modelcontextprotocol/sdk
.
License
Licensed under the MIT License.