Tools & Products

Supabase Drops Declarative Schemas, Dedicated Compute, Logs Query MCP, and Claude Code Elicitations

Supabase released five foundational updates targeting developer infrastructure: declarative schema migrations, dedicated compute instances, a Logs Query Model Context Protocol (MCP) server, scoped Personal Access Tokens, and automated context elicitations for Claude Code.

By FreakVinci · 2026-10-02 · 14 min read

Supabase released five core architectural features designed to simplify database maintenance and support automated agentic development: declarative schema management, dedicated compute scaling, a Logs Query Model Context Protocol (MCP) server, scoped Personal Access Tokens (PATs), and native MCP elicitations for Claude Code.

The update addresses two primary operational bottlenecks in production web development: the brittle nature of chronological database migration chains and the context blindness of terminal-based coding agents attempting to debug live database systems.


Feature Breakdown: Five Additions to the Supabase Stack

Feature Core Mechanism Primary Technical Benefit Replaces / Improves
Declarative Schemas Desired-state schema.sql definitions with AST-based diff engine Zero timestamp drift; schema matches Git branch directly Chronological YYYYMMDDHHMMSS_migration.sql chains
Supabase Compute Independent compute instances decoupled from physical NVMe storage pools Scale from 2 vCPU / 4 GB RAM to 64 vCPU / 256 GB RAM in 45 seconds Fixed compute-plus-storage combined instance tiers
Logs Query MCP Model Context Protocol endpoint exposing structured Postgres and API logs LLM agents query logs with SQL syntax without database credentials Manual dashboard log filtering and terminal grep
Scoped PATs Granular authorization tokens bounded by project, environment, and action Least-privilege credentials for CI pipelines and local AI runners Global personal access tokens with account-wide admin rights
Claude Code Elicitations Automated schema elicitation hooks embedded into Claude CLI Agents inspect table types, foreign keys, and indexes on demand Copy-pasting database types into prompts manually

+---------------------------------------------------------------------------------+
|                       SUPABASE AGENTIC PIPELINE ARCHITECTURE                     |
+---------------------------------------------------------------------------------+
|                                                                                 |
|   +-------------------+                     +-------------------------------+   |
|   |    Developer /    |  Terminal Commands  |         Claude Code CLI       |   |
|   |  Agent Session    | ------------------> |   (Runs with Scoped PAT)      |   |
|   +-------------------+                     +---------------+---------------+   |
|                                                             |                   |
|                                       Model Context Protocol| (MCP Queries)     |
|                                                             v                   |
|   +-------------------------------------------------------------------------+   |
|   |                      SUPABASE PLATFORM CONTROL PLANE                    |   |
|   |                                                                         |   |
|   |   +----------------------+   +------------------+   +---------------+   |   |
|   |   |  Declarative Engine  |   |  Logs Query MCP  |   |  Scoped PAT   |   |   |
|   |   |  (AST Schema Diffs)  |   |  (PgBouncer/SQL) |   |  (RBAC Gates) |   |   |
|   |   +----------+-----------+   +--------+---------+   +-------+-------+   |   |
|   +--------------|------------------------|---------------------|-----------+   |
|                  |                        |                     |               |
|                  v                        v                     v               |
|   +-------------------------------------------------------------------------+   |
|   |                      DEDICATED POSTGRES COMPUTE TIER                    |   |
|   |                                                                         |   |
|   |     +--------------------+                 +--------------------+       |   |
|   |     | Compute Node #1    | <--- WAL Sync ->| Compute Node #2    |       |   |
|   |     | (Active Read/Write)|                 | (Read Replica)     |       |   |
|   |     +--------------------+                 +--------------------+       |   |
|   |                                                                         |   |
|   |           Decoupled NVMe High-Availability Storage Volume               |   |
|   +-------------------------------------------------------------------------+   |
+---------------------------------------------------------------------------------+

1. Declarative Schemas: Moving Beyond Chronological Migration Chains

Traditional database migrations require developers to maintain ordered SQL scripts:

migrations/
  ├── 20260114093200_create_users.sql
  ├── 20260302141520_add_org_id_to_teams.sql
  └── 20260811182210_alter_profiles_add_status.sql

When multiple engineering branches merge simultaneously, timestamp conflicts and out-of-order schema mutations cause local development failures and deployment locks.

Supabase declarative schemas change this model. Engineers write the target schema in a single unified supabase/schemas/schema.sql file (or modular schema files). During deployment, the Supabase CLI parses the target schema AST, connects to the target Postgres instance, extracts the live catalog metadata, and automatically generates the deterministic DDL patch:

# Preview the generated DDL diff against your staging environment
supabase db diff --target-env staging --declarative

# Apply the declarative migration automatically
supabase db push --declarative

The engine generates ALTER TABLE, index construction, and constraint validation operations without manual script drafting. It warns if an operation requires an exclusive lock on high-volume tables.


2. Supabase Compute: Decoupled Compute and Storage Scaling

Previously, upgrading CPU or memory on managed database platforms forced an expensive migration cycle that often required allocating unneeded disk storage.

Under the new compute architecture:

  1. Zero Storage Resizing Downtime: Storage runs on dedicated distributed NVMe pools that auto-expand up to 64 TB without compute restarts.
  2. Compute-Only Vertical Scaling: Workloads experiencing seasonal CPU spikes (e.g., end-of-month financial reconciliation) can resize compute from a 4-core instance to a 32-core instance within 45 seconds.
  3. Dedicated Connection Pools: Each compute instance ships with isolated PgBouncer and Supavisor pooling, maintaining up to 50,000 concurrent client sessions per instance.

3. Logs Query MCP & Claude Code Elicitations

Terminal coding assistants frequently fail when working with databases because they lack real-time visibility into query execution plans, constraint violations, and connection pool saturation.

Supabase now ships an official Logs Query MCP Server that implements Anthropic's Model Context Protocol. Developers configure the MCP server in their claude_desktop_config.json or Claude Code settings:

{
  "mcpServers": {
    "supabase-logs": {
      "command": "npx",
      "args": [
        "-y",
        "@supabase/mcp-logs-server",
        "--project-ref", "proj_abcdef123456",
        "--token", "sbp_scoped_9a8b7c6d5e4f3a2b"
      ]
    }
  }
}

How Claude Code Uses Elicitations

When Claude Code runs a query that fails or encounters an unindexed foreign key join:

  1. Claude Code calls the supabase-logs tool via MCP.
  2. The agent fetches the exact Postgres error code (e.g., 23503 foreign_key_violation or 57014 query_canceled).
  3. Claude Code queries the declarative schema, identifies the missing index or constraint mismatch, and presents an exact code patch to the engineer.

4. Scoped Personal Access Tokens (PATs)

Prior to this update, generating a Supabase Personal Access Token granted broad account-level privileges across all organizations and production projects.

Scoped PATs introduce granular Role-Based Access Control (RBAC):

  • Project Scope: Restrict access to a single development or staging environment.
  • Service Scope: Authorize only logs:read, database:schema:diff, or storage:write capabilities.
  • Expiration Controls: Set hard token lifespans (1 hour to 90 days) for ephemeral CI/CD runners and AI agents.

Sample Scoped Token Policy Configuration

{
  "name": "claude-code-dev-session",
  "project_ref": "proj_abcdef123456",
  "scopes": [
    "database:read_schema",
    "logs:query",
    "functions:list"
  ],
  "expires_in_hours": 12
}

Migration and Adoption Path

Teams adopting the new architecture can activate declarative schemas alongside legacy migrations by running supabase db init --declarative in their repository root. Legacy migration files remain supported, allowing gradual transition without database freezes.