HS

henkdz/selfhosted-supabase-mcp

Database management

このページは AI により自動翻訳されています。技術的な詳細は原文をご確認ください。 原文を見る

138 stars 47 forks 品質 71 トレンド 16

henkdz/selfhosted-supabase-mcpは、https://github.com/henkdz/selfhosted-supabase-mcp.からインポートされたMCPサーバー候補です。

概要

henkdz/selfhosted-supabase-mcpは、https://github.com/henkdz/selfhosted-supabase-mcp.からインポートされたMCPサーバー候補です。

概要(AI 翻訳)

概要

このプロジェクトは、セルフホストされたSupabaseインスタンスとのやり取りを目的としたモデルコンテキストプロトコル(MCP)サーバーを提供します。これはMCPクライアント(IDE拡張機能など)とローカルまたはプライベートホストのSupabaseプロジェクトとの間の橋渡しをし、開発環境から直接データベースの内省、管理、インタラクションを可能にします。

このサーバーは、公式のSupabaseクラウドMCPサーバーを適応させた教訓を得て、セルフホストのユースケースに合わせた最小限で集中した実装を提供するために、ゼロから構築されました。

目的

このサーバーの主な目的は、セルフホスト型Supabaseインストールを使用する開発者が、以下のようなタスクでMCPベースのツールを活用できるようにすることです:

  • データベーススキーマやデータのクエリ。
  • データベースの移行管理。
  • データベースの統計と接続を検査。
  • 認証ユーザーの管理。
  • Supabase ストレージとのやり取り。
  • 型定義の生成。

公式クラウドサーバーの複雑さを回避し、マルチプロジェクト管理やクラウド固有のAPIに対応し、単一プロジェクトのセルフホスト環境に最適化された体験を提供します。

特徴(実装ツール)

このページは AI により自動翻訳されています。技術的な詳細は原文をご確認ください。

README

以下は原文 README の抜粋です。原文を見る。

Self-Hosted Supabase MCP Server

Overview

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.

This server was built from scratch, drawing lessons from adapting the official Supabase cloud MCP server, to provide a minimal, focused implementation tailored for the self-hosted use case.

Purpose

The primary goal of this server is to enable developers using self-hosted Supabase installations to leverage MCP-based tools for tasks such as:

  • Querying database schemas and data.
  • Managing database migrations.
  • Inspecting database statistics and connections.
  • Managing authentication users.
  • Interacting with Supabase Storage.
  • Generating type definitions.

It avoids the complexities of the official cloud server related to multi-project management and cloud-specific APIs, offering a streamlined experience for single-project, self-hosted environments.

Features (Implemented Tools)

Tools are categorized by privilege level:

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

Schema & Migrations

Tool Description Privilege
list_tables Lists tables in the database schemas Regular
list_extensions Lists installed PostgreSQL extensions Regular
list_available_extensions Lists all available (installable) extensions Regular
list_migrations Lists applied migrations from supabase_migrations.schema_migrations Regular
apply_migration Applies a SQL migration and records it in supabase_migrations.schema_migrations Privileged
list_table_columns Lists columns for a specific table Regular
list_indexes Lists indexes for a specific table Regular
list_constraints Lists constraints for a specific table Regular
list_foreign_keys Lists foreign keys for a specific table Regular
list_triggers Lists triggers for a specific table Regular
list_database_functions Lists user-defined database functions Regular
get_function_definition Gets the source definition of a function Regular
get_trigger_definition Gets the source definition of a trigger Regular
GitHub で README 全文を見る

インストール

npx -y @smithery/cli install @HenkDz/selfhosted-supabase-mcp --client claude
MCP 初心者?mcpskill.org のガイドから始めましょう →

設定

{ "mcpServers": { "selfhosted-supabase": { "command": "bun", "args": [ "run", "<path-to-dist/index.js>", // e.g., "/home/user/selfhosted-supabase-mcp/dist/index.js" "--url", "<your-supabase-url>", // e.g., "http://localhost:8000" "--anon-key", "<your-anon-key>", // Optional - Add these if needed by the tools you use "--service-key", "<your-service-key>", "--db-url", "<your-db-url>", // e.g., "postgresql://postgres:password@host:port/postgres" "--jwt-secret", "<your-jwt-secret>", // Optional - Whitelist specific tools "--tools-config", "<path-to-your-mcp-tools.json>" // e.g., "./mcp-tools.json" ] } } }