/ Каталог / Песочница / supabase-mcp-server
● Сообщество alexander-zuev ⚡ Сразу

supabase-mcp-server

автор alexander-zuev · alexander-zuev/supabase-mcp-server

A community Supabase MCP with three-tier safety (safe / write / destructive), auto-migrations, and Management + Auth API coverage — now superseded by the official Supabase MCP.

alexander-zuev/supabase-mcp-server predates the official Supabase MCP. It offers rich coverage: SQL (with risk tiers), automatic migration tracking, Management API passthrough, Auth Admin SDK operations, and logs across 9+ Supabase services. The maintainer has announced they will no longer actively maintain it now that Supabase ships an official MCP — consider migration.

Зачем использовать

Ключевые функции

Живое демо

Как выглядит на практике

supabase-2.replay ▶ готово
0/0

Установка

Выберите клиент

~/Library/Application Support/Claude/claude_desktop_config.json  · Windows: %APPDATA%\Claude\claude_desktop_config.json
{
  "mcpServers": {
    "supabase-2": {
      "command": "uvx",
      "args": [
        "supabase-mcp-server"
      ],
      "_inferred": true
    }
  }
}

Откройте Claude Desktop → Settings → Developer → Edit Config. Перезапустите после сохранения.

~/.cursor/mcp.json · .cursor/mcp.json
{
  "mcpServers": {
    "supabase-2": {
      "command": "uvx",
      "args": [
        "supabase-mcp-server"
      ],
      "_inferred": true
    }
  }
}

Cursor использует ту же схему mcpServers, что и Claude Desktop. Конфиг проекта приоритетнее глобального.

VS Code → Cline → MCP Servers → Edit
{
  "mcpServers": {
    "supabase-2": {
      "command": "uvx",
      "args": [
        "supabase-mcp-server"
      ],
      "_inferred": true
    }
  }
}

Щёлкните значок MCP Servers на боковой панели Cline, затем "Edit Configuration".

~/.codeium/windsurf/mcp_config.json
{
  "mcpServers": {
    "supabase-2": {
      "command": "uvx",
      "args": [
        "supabase-mcp-server"
      ],
      "_inferred": true
    }
  }
}

Тот же формат, что и Claude Desktop. Перезапустите Windsurf для применения.

~/.continue/config.json
{
  "mcpServers": [
    {
      "name": "supabase-2",
      "command": "uvx",
      "args": [
        "supabase-mcp-server"
      ]
    }
  ]
}

Continue использует массив объектов серверов, а не map.

~/.config/zed/settings.json
{
  "context_servers": {
    "supabase-2": {
      "command": {
        "path": "uvx",
        "args": [
          "supabase-mcp-server"
        ]
      }
    }
  }
}

Добавьте в context_servers. Zed перезагружается автоматически.

claude mcp add supabase-2 -- uvx supabase-mcp-server

Однострочная команда. Проверить: claude mcp list. Удалить: claude mcp remove.

Сценарии использования

Реальные сценарии: supabase-mcp-server

Ask questions about your app data in Supabase

👤 Founders, PMs on Supabase-backed apps ⏱ ~10 min beginner

Когда использовать: You want usage / retention numbers without opening the Supabase SQL editor.

Предварительные требования
  • QUERY_API_KEY (free at thequery.dev) — Sign up, copy key
  • SUPABASE_PROJECT_REF + DB password — Supabase dashboard > Project Settings
Поток
  1. Stay in safe mode
    Set mode to safe. How many users signed up last week?✓ Скопировано
    → Read-only result; no mutation possible
  2. Drill in
    Of those, how many completed onboarding (have any row in profiles)?✓ Скопировано
    → Retention-style number

Итог: Quick answers with ironclad read-only guarantee.

Подводные камни
  • Switching to write mode for 'just this query' and forgetting to switch back — Tell Claude explicitly: 'Return to safe mode after this query.'

Make and track a schema change as a real migration

👤 Devs on Supabase ⏱ ~15 min intermediate

Когда использовать: You need to add a column or index and want the change captured as a migration file, not an ad-hoc ALTER.

Предварительные требования
  • SUPABASE_ACCESS_TOKEN for Management API — Dashboard > Account > Access Tokens
Поток
  1. Switch to write mode
    Set mode to write. Add column plan (text, default 'free') to users table.✓ Скопировано
    → ALTER executed; migration file created
  2. Review and commit
    Show the generated migration file. I'll commit it to our repo.✓ Скопировано
    → SQL file path + contents

Итог: Schema change + tracked migration in one step.

Подводные камни
  • Migration conflicts with CI when team members also make changes — Coordinate via branch-per-migration; don't do this in main during team hours
Сочетать с: github

Provision test users for dev/staging via Auth Admin SDK

👤 QA engineers, devs ⏱ ~10 min intermediate

Когда использовать: You need 20 test accounts with specific metadata to exercise a feature.

Предварительные требования
  • SUPABASE_SERVICE_ROLE_KEY — Dashboard > API settings (keep secret!)
Поток
  1. Create users in bulk
    Create 20 test users: [email protected] through [email protected], password 'Test12345!', with metadata {role: 'qa', plan: 'free'}.✓ Скопировано
    → 20 user UUIDs returned
  2. Generate magic links
    For each, generate a magic sign-in link and save to /tmp/qa-users.tsv.✓ Скопировано
    → TSV with email + link

Итог: QA-ready accounts provisioned in under a minute.

Подводные камни
  • Service role key is god-mode — never put in prompt context in front of a user — Keep in env var; never echo
Сочетать с: filesystem

Комбинации

Сочетайте с другими MCP — эффект x10

supabase-2 + github

Generate migration file via MCP, commit via git MCP

Add a column via write mode, then commit the generated migration file with message 'feat: add users.plan'.✓ Скопировано

Инструменты

Что предоставляет этот MCP

ИнструментВходные данныеКогда вызыватьСтоимость
execute_sql query: str, mode: 'safe'|'write'|'destructive' Main entry for arbitrary SQL, gated by current mode 1 DB query
set_mode mode: 'safe'|'write'|'destructive' Change safety tier; default is safe free
management_api_request path, method, body? Manage project settings, extensions, buckets via Management API 1 API call
auth_admin_create_user email, password?, user_metadata? Provision users for testing or onboarding 1 Auth call
auth_admin_generate_link user_id, type: 'magiclink'|'recovery' Get a sign-in or recovery URL for a user 1 Auth call
get_logs service: 'api'|'auth'|'db'|..., since, until Debug by service 1 API call

Стоимость и лимиты

Во что обходится

Квота API
Bounded by Supabase plan (DB connections, Management API rate limits)
Токенов на вызов
SQL results: depends on LIMIT; always cap
Деньги
Free (Apache 2.0). Supabase costs are your existing bill.
Совет
Stay in safe mode by default. Only escalate when you explicitly intend to mutate.

Безопасность

Права, секреты, радиус поражения

Минимальные скоупы: SELECT for safe mode; INSERT/UPDATE for write; all for destructive
Хранение учётных данных: Env vars. Service role key is especially sensitive.
Исходящий трафик: Queries go to your Supabase project; LLM sees the result rows
Никогда не давайте: Service role key to anything that can be reached over untrusted transport

Устранение неполадок

Частые ошибки и исправления

QUERY_API_KEY invalid

Regenerate at thequery.dev. Note: this is a separate service wrapping Supabase and requires its own signup.

Write tool refuses in safe mode

Call set_mode write first. Remember to set back to safe when done.

Transaction pool exhausted

Only transaction pooling is supported here. Reduce concurrency or upgrade Supabase plan.

Проверить: Supabase dashboard > DB > Connection Pooling

Альтернативы

supabase-mcp-server в сравнении

АльтернативаКогда использоватьКомпромисс
Official Supabase MCPYou're starting fresh — use the official one firstMaintained by Supabase; this community one has been deprecated by its author
postgres MCPYou only need SQL, not Auth/Management APIsRead-only, universal; no Supabase-specific features
Neon MCPYou're on Neon, not SupabaseAdds DB branching for safe migration testing

Ещё

Ресурсы

📖 Читать официальный README на GitHub

🐙 Открытые задачи

🔍 Все 400+ MCP-серверов и Skills