Supabase MCP Server
Supabase MCP サーバー
Claude や他の LLM が Supabase と対話して Postgres テーブルで CRUD 操作を実行できるようにする Model Context Protocol (MCP) サーバー。
特徴
データベース操作:
フィルターを使用してデータをクエリする
データを挿入する
データを更新する
データを削除する
テーブルの一覧
Related MCP server: PocketBase MCP Server
前提条件
Node.js (v16以降)
npmまたはyarn
APIキー付きのSupabaseプロジェクト
インストール
オプション1: npmからインストールする(推奨)
パッケージはnpmで公開されています。以下のコマンドでグローバルインストールできます。
npm install -g supabase-mcpまたはプロジェクト内でローカルに:
npm install supabase-mcpオプション2: リポジトリをクローンする
git clone https://github.com/Cappahccino/SB-MCP.git
cd SB-MCP
npm install
npm run build構成
Supabase の資格情報を使用して.envファイルを作成します。
# Supabase credentials
SUPABASE_URL=your_supabase_project_url
SUPABASE_ANON_KEY=your_supabase_anon_key
SUPABASE_SERVICE_ROLE_KEY=your_supabase_service_role_key
# MCP server configuration
MCP_SERVER_PORT=3000
MCP_SERVER_HOST=localhost
MCP_API_KEY=your_secret_api_keyクロードとの使用
Claude は互換性のために特定のトランスポートモードを必要とします。このパッケージは、Claude との統合専用のバイナリを提供します。
クロードデスクトップMCP構成
"supabase": {
"command": "npx",
"args": [
"-y",
"supabase-mcp@latest",
"supabase-mcp-claude"
],
"env": {
"SUPABASE_URL": "your_supabase_project_url",
"SUPABASE_ANON_KEY": "your_supabase_anon_key",
"SUPABASE_SERVICE_ROLE_KEY": "your_service_role_key",
"MCP_API_KEY": "your_secret_api_key"
}
}設定で必要な環境変数が設定されていることを確認してください。Claude は通信に stdio トランスポートを使用します。
Claude Binaryによる手動テスト
Claude の外部でテストする場合は、以下を実行できます。
npm run start:claudeまたはグローバルにインストールされている場合:
supabase-mcp-claudeスタンドアロンサーバーとしての使用
グローバルにインストールした後:
supabase-mcpこれにより、http://localhost:3000 (または .env ファイルで指定されたポート) で MCP サーバーが起動します。
コード内での使用
独自の Node.js プロジェクトで supabase-mcp をライブラリとして使用することもできます。
import { createServer, mcpConfig, validateConfig } from 'supabase-mcp';
// Validate configuration
validateConfig();
// Create the server
const app = createServer();
// Start the server
app.listen(mcpConfig.port, mcpConfig.host, () => {
console.log(`Supabase MCP server running at http://${mcpConfig.host}:${mcpConfig.port}`);
});トラブルシューティング
よくある問題と解決策
1. 「ポート XXXX はすでに使用されています」
HTTPサーバーは利用可能なポートを自動的に検索します。.env .envでMCP_SERVER_PORT値を変更することで、別のポートを手動で指定できます。
2.「必要な環境変数が見つかりません」
必要なすべての値を含む適切な.envファイルがあること、またはシステムに環境変数が設定されていることを確認してください。
3. 「TypeError: クラスコンストラクタ Server は 'new' なしでは呼び出せません」
このエラーが表示された場合は、古いバージョンのパッケージを実行している可能性があります。最新バージョンに更新してください。
npm install -g supabase-mcp@latest4. ClaudeによるJSON解析エラー
通常の HTTP サーバー ( supabase-mcp ) ではなく、Claude 固有のバイナリ ( supabase-mcp-claude ) を使用していることを確認してください。
5. クロードとのリクエストがタイムアウトしました
これは通常、Claude が接続を開始したが、サーバーが時間内に応答できなかったことを意味します。以下の点を確認してください。
Supabase の資格情報は正しいですか?
サーバーは適切にセットアップされ、稼働していますか?
接続をブロックするものはありますか?
ツールリファレンス
データベースツール
クエリデータベース
パラメータ:
table(文字列): クエリするテーブルの名前select(文字列、オプション): カンマ区切りの列リスト (デフォルト: "*")query(オブジェクト、オプション): フィルター条件
挿入データ
パラメータ:
table(文字列): テーブルの名前data(オブジェクトまたはオブジェクトの配列):挿入するデータ
更新データ
パラメータ:
table(文字列): テーブルの名前data(オブジェクト): キーと値のペアとして更新するデータquery(オブジェクト):更新のフィルター条件
データを削除
パラメータ:
table(文字列): テーブルの名前query(オブジェクト):削除のフィルター条件
リストテーブル
パラメータ: なし
バージョン履歴
1.0.0: 初回リリース
1.0.1: 自動ポート選択を追加
1.0.2: プロトコル互換性の問題を修正
1.0.3: JSON-RPCサポートを追加
1.1.0: 公式MCP SDKを使用して完全に書き直しました
1.2.0: 独立したClaudeトランスポートを追加し、ポート競合の問題を修正しました
1.3.0: TypeScriptプロジェクトとの互換性を向上させるために更新されました
1.4.0: Supabaseコミュニティのベストプラクティスに基づいてClaude stdioトランスポート統合を修正しました
1.5.0: 安定性を向上させ、データベース操作に重点を置くために、Edge Function のサポートを削除しました。
ライセンス
マサチューセッツ工科大学
This server cannot be installed
Maintenance
Resources
Unclaimed servers have limited discoverability.
Looking for Admin?
If you are the server author, to access and configure the admin panel.
Related MCP Servers
- FlicenseDqualityDmaintenanceA Model Context Protocol server that enables querying feature suggestions from a Supabase database, allowing AI tools like Cursor and Claude to access and display feature request data.1
- AlicenseNot gradedqualityDmaintenanceA Model Context Protocol server that enables Claude AI to interact with PocketBase databases by listing and accessing collections through natural language.111MIT
- AlicenseNot gradedqualityFmaintenanceA Model Context Protocol server that enables LLMs like Claude to interact with SQLite and SQL Server databases, allowing for schema inspection and SQL query execution.853379MIT
- AlicenseNot gradedqualityDmaintenanceA Model Context Protocol server that enables AI tools to interact with Supabase databases, providing tools for reading, creating, updating, and deleting records in Supabase tables.MIT
Related MCP Connectors
MCP server for interacting with the Supabase platform
A comprehensive Model Context Protocol (MCP) server that enables AI assistants to interact with yo…
A Model Context Protocol server for Wix AI tools
Latest Blog Posts
- Who's Calling? MCP Hosts Are an Identity Blind Spot (And the Spec Knows It)By Om-Shree-0709 on .mcpAgent IdentityOAuth 2.1
- Your AI Chatbot Just Exposed Your CEO's Salary to an InternBy Om-Shree-0709 on .Agent IdentityMCP SecurityOAuth Delegation
- Why MCP Servers Need Execution Sandboxing (And Why Your Current Stack Isn't Enough)By Om-Shree-0709 on .Agentic AiPrompt InjectionWebAssembly
MCP directory API
We provide all the information about MCP servers via our MCP API.
curl -X GET 'https://glama.ai/api/mcp/v1/servers/Cappahccino/SB-MCP'
If you have feedback or need assistance with the MCP directory API, please join our Discord server