supabase-mcp-server
MCP ServerFreeQuery MCP enables end-to-end management of Supabase via chat interface: read & write query executions, management API support, automatic migration versioning, access to logs and much more.
Capabilities13 decomposed
risk-tiered sql query execution with safety classification
Medium confidenceExecutes PostgreSQL queries against Supabase databases with automatic risk classification into three tiers: Safe (SELECT-only, always allowed), Write (INSERT/UPDATE/DELETE, requires unsafe mode), and Destructive (DROP/CREATE, requires unsafe mode + explicit confirmation). The system parses incoming SQL, classifies operations by AST analysis, and enforces execution gates based on the current safety mode setting, preventing accidental schema destruction while enabling controlled data mutations.
Implements a three-tier safety classification system (Safe/Write/Destructive) with explicit confirmation gates for destructive operations, integrated directly into the MCP tool invocation layer rather than as a separate middleware. This allows LLM agents to understand safety constraints at tool-call time and request user confirmation before executing risky operations.
Safer than raw Supabase client libraries for agentic use because it enforces safety gates at the MCP protocol boundary, preventing LLMs from executing destructive SQL without explicit human confirmation, whereas direct client libraries rely on application-level safeguards that agents can bypass.
automatic migration versioning with schema change tracking
Medium confidenceAutomatically versions and tracks database schema changes by capturing migration metadata (timestamp, operation type, SQL statement) whenever destructive or schema-modifying operations execute. The system maintains a migration history log that can be queried to understand schema evolution, rollback points, and audit trails of who changed what when. This integrates with Supabase's native migration system to ensure version consistency across environments.
Integrates migration versioning directly into the MCP tool execution layer, automatically capturing and storing migration metadata whenever schema changes occur, rather than requiring developers to manually create migration files. This creates an implicit audit trail of all schema changes made through the chat interface.
More transparent than manual migration management because every schema change is automatically versioned and logged, whereas traditional Supabase workflows require developers to manually create and track migration files, which can be forgotten or inconsistently documented.
exception handling and error reporting with context preservation
Medium confidenceCatches and handles exceptions from database operations, Management API calls, and Auth SDK invocations, preserving error context (stack trace, operation details, input parameters) and returning user-friendly error messages. The system distinguishes between recoverable errors (connection timeouts, rate limits) and fatal errors (authentication failures, invalid SQL), and provides actionable error messages that help developers understand what went wrong. This prevents cryptic error messages from reaching users and enables better debugging.
Implements custom exception handling that preserves error context (operation details, input parameters) while sanitizing sensitive information before returning to users. This enables detailed debugging without leaking credentials or internal system details.
More helpful than raw exception messages because it provides context-specific guidance (e.g., 'Invalid credentials — check SUPABASE_SERVICE_ROLE_KEY environment variable'), whereas raw exceptions often lack actionable information.
docker containerization with environment variable injection
Medium confidenceProvides Dockerfile and Docker Compose configuration for containerizing the MCP server, enabling deployment in Docker environments with environment variable injection for credentials. The system builds a Python 3.12 container with all dependencies, exposes the stdio interface for MCP clients, and supports environment variable configuration for different deployment scenarios. This enables easy deployment to cloud platforms (AWS, GCP, Azure) and local Docker environments without manual setup.
Provides production-ready Dockerfile and Docker Compose configuration that handles Python dependency installation, environment variable injection, and stdio interface exposure for MCP clients. This enables one-command deployment to container environments.
More portable than manual installation because Docker ensures consistent environments across development, staging, and production, whereas manual installation can have environment-specific issues (Python version, dependency conflicts).
testing framework with mock supabase clients and integration tests
Medium confidenceProvides a testing framework with mock Supabase clients (database, Management API, Auth SDK) for unit testing without real Supabase credentials, and integration tests that run against a real Supabase instance. The system uses pytest for test execution, fixtures for test setup/teardown, and parametrized tests for testing multiple scenarios. This enables developers to test MCP tools locally without requiring a Supabase account and to verify integration with real Supabase services in CI/CD pipelines.
Provides both unit tests with mock clients and integration tests with real Supabase instances, enabling developers to test locally without credentials and verify integration in CI/CD pipelines. This dual approach balances test speed (mocks) with confidence (integration tests).
More comprehensive than manual testing because automated tests catch regressions and edge cases, whereas manual testing is error-prone and doesn't scale as the codebase grows.
supabase management api endpoint orchestration with risk assessment
Medium confidenceProvides MCP tool bindings for all Supabase Management API endpoints (project management, database configuration, auth settings, etc.) with automatic risk assessment and safety controls. The system maps Management API operations to MCP tools, injects project references automatically, classifies each endpoint by risk level (read-only vs destructive), and enforces safety gates similar to SQL execution. This enables chat-driven management of Supabase project infrastructure without requiring manual API calls or authentication.
Automatically injects project references and applies the same three-tier safety classification system (Safe/Write/Destructive) to Management API endpoints as it does to SQL queries, creating a unified safety model across database and infrastructure operations. This prevents accidental project-level destructive operations (e.g., database resets) without explicit confirmation.
More accessible than raw Management API clients because it abstracts authentication, project reference injection, and safety gates into MCP tools that LLMs can safely invoke, whereas direct API clients require manual authentication handling and provide no guardrails against destructive operations.
supabase auth admin sdk method invocation with user lifecycle management
Medium confidenceExposes Supabase Auth Admin SDK methods as MCP tools, enabling chat-driven user management operations including user creation, updates, deletion, authentication operations (magic links, password recovery), and MFA management. The system wraps Auth Admin SDK calls with proper error handling, validates input parameters, and integrates with the safety system to require confirmation for destructive user operations (deletion, password resets). This allows developers to manage authentication state and user accounts without leaving their IDE.
Wraps the Supabase Auth Admin SDK with MCP tool bindings and integrates user deletion/password reset operations into the safety system, requiring explicit confirmation before destructive auth operations. This prevents LLMs from accidentally deleting user accounts or forcing password resets without human approval.
Safer than direct Auth Admin SDK usage in agentic contexts because it enforces confirmation gates for destructive user operations, whereas raw SDK clients allow agents to delete users or reset passwords without safeguards, risking data loss and user disruption.
structured log retrieval and filtering with multi-collection support
Medium confidenceProvides MCP tools to query Supabase logs across multiple collections (postgres, api_gateway, auth, realtime, etc.) with filtering by time range, search text, and custom criteria. The system constructs log queries using Supabase's log API, handles pagination for large result sets, and returns structured log entries as JSON objects. This enables developers to troubleshoot issues, monitor application behavior, and analyze performance without leaving their IDE or switching to the Supabase dashboard.
Integrates Supabase's multi-collection log API into MCP tools with automatic pagination and structured result formatting, allowing LLM agents to query logs conversationally without understanding the underlying log API schema. This abstracts log collection names, filter syntax, and pagination logic into simple tool parameters.
More accessible than raw log API clients because it provides high-level filtering and search without requiring knowledge of Supabase's log query syntax, whereas direct API clients require developers to construct complex filter objects and handle pagination manually.
mcp protocol integration with stdio-based tool registration
Medium confidenceImplements the Model Context Protocol (MCP) server specification using stdio transport, registering all database, management API, auth, and logging capabilities as MCP tools that can be invoked by compatible clients (Cursor, Windsurf, Cline, Claude Desktop). The system handles MCP protocol messages (tool calls, responses, errors), manages tool schemas with JSON Schema validation, and maintains bidirectional communication with MCP clients. This enables seamless integration of Supabase operations into AI-assisted development workflows without custom client code.
Implements the full MCP server specification with stdio transport, allowing the server to be invoked as a subprocess by MCP clients and communicate via JSON-RPC messages. This enables tight integration with IDEs like Cursor and Windsurf without requiring custom client plugins or API servers.
More seamless than REST API or webhook-based integration because MCP clients can discover and invoke tools natively without custom code, whereas REST APIs require manual client implementation and webhook patterns require polling or event subscriptions.
environment-based configuration with settings validation
Medium confidenceLoads and validates Supabase credentials and configuration from environment variables (SUPABASE_URL, SUPABASE_DB_URL, SUPABASE_SERVICE_ROLE_KEY, SUPABASE_MANAGEMENT_API_TOKEN) with type checking and required field validation. The system uses a settings container pattern to manage configuration state, validates credentials at startup, and provides clear error messages if required variables are missing or invalid. This enables secure credential management without hardcoding secrets and supports multiple deployment environments (development, staging, production).
Uses a pydantic-based settings container pattern to validate and load configuration from environment variables at startup, providing type-safe access to credentials throughout the application. This prevents runtime credential errors and enables clear error messages if required variables are missing.
More robust than manual environment variable loading because pydantic validates types and required fields at startup, whereas manual loading can silently fail or use invalid credentials until a tool is invoked.
async connection pooling with direct and pooled connection modes
Medium confidenceManages PostgreSQL connections to Supabase using asyncpg with support for both direct connections and pooled connections via PgBouncer. The system creates and maintains a connection pool, handles connection lifecycle (creation, reuse, cleanup), and provides async context managers for safe connection usage. This enables efficient concurrent query execution without exhausting database connections and supports both development (direct) and production (pooled) connection patterns.
Uses asyncpg for async connection pooling rather than synchronous drivers, enabling concurrent query execution without blocking. Supports both direct and pooled connection modes, allowing the same codebase to work in development (direct) and production (PgBouncer) environments.
More efficient than synchronous connection management because asyncpg enables concurrent queries without thread overhead, whereas synchronous drivers require one thread per concurrent connection, leading to resource exhaustion at scale.
transaction handling with rollback and error recovery
Medium confidenceProvides transaction management for SQL queries with automatic rollback on errors, ensuring database consistency. The system wraps queries in asyncpg transactions, catches exceptions during execution, rolls back changes if errors occur, and returns detailed error messages. This prevents partial updates and ensures that either all operations in a transaction succeed or none do, maintaining data integrity even when LLM-generated SQL contains errors.
Automatically wraps SQL queries in asyncpg transactions with implicit rollback on errors, ensuring that LLM-generated SQL that contains errors doesn't partially corrupt the database. This is transparent to the user and requires no explicit transaction syntax.
More reliable than manual transaction management because rollback is automatic and guaranteed, whereas manual transaction handling in application code can be forgotten or incorrectly implemented, leading to partial updates.
schema introspection and metadata extraction
Medium confidenceQueries PostgreSQL system catalogs (pg_tables, pg_columns, pg_indexes, etc.) to extract database schema metadata including table names, column definitions, data types, constraints, and indexes. The system provides MCP tools to list tables, describe table structure, and retrieve index information, enabling developers to understand the database schema without manual SQL queries. This metadata is used by LLM agents to generate contextually appropriate SQL and understand what operations are possible.
Queries PostgreSQL system catalogs to extract schema metadata and exposes it as MCP tools, allowing LLM agents to discover table and column names without manual documentation. This enables agents to generate contextually correct SQL without hallucinating table names.
More accurate than LLM-generated schema guesses because it queries the actual database schema, whereas LLMs trained on generic SQL patterns may generate queries with incorrect table or column names.
Capabilities are decomposed by AI analysis. Each maps to specific user intents and improves with match feedback.
Related Artifactssharing capabilities
Artifacts that share capabilities with supabase-mcp-server, ranked by overlap. Discovered automatically through the match graph.
libSQL by xexr
** - MCP server for libSQL databases with comprehensive security and management tools. Supports file, local HTTP, and remote Turso databases with connection pooling, transaction support, and 6 specialized database tools.
Wren AI
An open-source text-to-SQL and generative BI agent with a semantic layer. [#opensource](https://github.com/Canner/WrenAI)
Dot
Virtual assistant that help with data analytics
Text-To-GraphQL
** - MCP server for text-to-graphql, integrates with Claude Desktop and Cursor.
BlackBox AI
Revolutionize coding: AI generation, conversational code help, intuitive...
Vanna.AI
Python-based AI SQL agent trained on your schema
Best For
- ✓AI-assisted development workflows in Cursor/Windsurf where LLMs might generate destructive SQL
- ✓Teams building agentic systems that need guardrails against unintended database mutations
- ✓Solo developers who want chat-driven database management without accidental data loss
- ✓Teams using Supabase migrations in development and production environments
- ✓Developers who want audit trails of schema changes made via AI assistants
- ✓Projects requiring compliance tracking of database modifications
- ✓Production deployments where clear error messages improve user experience
- ✓Debugging scenarios where error context helps identify root causes
Known Limitations
- ⚠Risk classification is rule-based (keyword matching) and may not catch complex destructive patterns in stored procedures or CTEs
- ⚠Requires explicit unsafe mode toggle per session; no granular per-query permission system
- ⚠No transaction rollback capability if a destructive query passes confirmation but fails mid-execution
- ⚠Classification overhead adds ~50-100ms per query for AST parsing on large queries (>10KB)
- ⚠Migration versioning is automatic but requires manual review before applying to production
- ⚠No built-in rollback execution; versions are tracked but reverting requires manual SQL
Requirements
Input / Output
UnfragileRank
UnfragileRank is computed from adoption signals, documentation quality, ecosystem connectivity, match graph feedback, and freshness. No artifact can pay for a higher rank.
Repository Details
Last commit: Sep 26, 2025
About
Query MCP enables end-to-end management of Supabase via chat interface: read & write query executions, management API support, automatic migration versioning, access to logs and much more.
Categories
Alternatives to supabase-mcp-server
Are you the builder of supabase-mcp-server?
Claim this artifact to get a verified badge, access match analytics, see which intents users search for, and manage your listing.
Get the weekly brief
New tools, rising stars, and what's actually worth your time. No spam.
Data Sources
Looking for something else?
Search →