Skip to main content
Glama
MCP Supabase Server

MCP Supabase Server

by cloud9-labs

MCP Supabase Server

Model Context Protocol (MCP) server for Supabase database and storage operations.

Features

  • Database Operations: Query, insert, update, delete rows

  • Schema Introspection: List tables, get column definitions

  • Storage Operations: Upload, list, delete files and buckets

  • RPC Support: Call stored functions

  • Raw SQL: Execute custom SQL queries (requires setup)

Related MCP server: Supabase MCP Server

Installation

npm install @cloud9-labs/mcp-supabase

Configuration

Set the following environment variables:

export SUPABASE_URL="https://your-project.supabase.co"
export SUPABASE_SERVICE_KEY="your-service-role-key"

Claude Desktop Configuration

Add to your claude_desktop_config.json:

{
  "mcpServers": {
    "supabase": {
      "command": "npx",
      "args": ["-y", "@cloud9-labs/mcp-supabase"],
      "env": {
        "SUPABASE_URL": "https://your-project.supabase.co",
        "SUPABASE_SERVICE_KEY": "your-service-role-key"
      }
    }
  }
}

Available Tools

Database Operations

  • supabase_query: Execute SELECT with filters, ordering, pagination

  • supabase_insert: Insert rows into a table

  • supabase_update: Update rows matching filter conditions

  • supabase_delete: Delete rows matching filter conditions

  • supabase_rpc: Call stored functions/RPC endpoints

Schema Introspection

  • supabase_list_tables: List all tables in public schema

  • supabase_get_table_schema: Get column definitions for a table

Storage Operations

  • supabase_upload_file: Upload a file to storage bucket

  • supabase_list_files: List files in a bucket

  • supabase_delete_file: Delete a file from storage

  • supabase_list_buckets: List all storage buckets

Advanced Operations

  • supabase_execute_sql: Execute raw SQL (requires RPC function setup)

Usage Examples

Query a table

{
  "table": "users",
  "select": "id,name,email",
  "filter": { "status": "active" },
  "order": "created_at.desc",
  "limit": 10
}

Insert data

{
  "table": "posts",
  "data": {
    "title": "Hello World",
    "content": "My first post",
    "author_id": 123
  }
}

Upload a file

{
  "bucket": "avatars",
  "path": "user123/profile.jpg",
  "data": "<base64-encoded-data>",
  "contentType": "image/jpeg"
}

Raw SQL Setup

To use supabase_execute_sql, create this function in your Supabase SQL Editor:

CREATE OR REPLACE FUNCTION execute_sql(query text)
RETURNS json AS $$
DECLARE
  result json;
BEGIN
  EXECUTE query INTO result;
  RETURN result;
END;
$$ LANGUAGE plpgsql SECURITY DEFINER;

Development

# Install dependencies
npm install

# Build
npm run build

# Run locally
node dist/index.js

License

MIT

Available Tools

12 tools
supabase_deleteC

Delete rows from a Supabase table that match the filter conditions.

Inputs: table (required), filter (required).

supabase_delete_fileC

Delete a file from a Supabase storage bucket.

Inputs: path (required), bucket (required).

supabase_execute_sqlC

Execute raw SQL query via RPC endpoint (requires execute_sql function to be created in Supabase).

Inputs: sql (required).

supabase_get_table_schemaB

Get column definitions and data types for a specific table.

Inputs: table (required).

supabase_insertC

Insert one or more rows into a Supabase table.

Inputs: data (required), table (required).

supabase_list_bucketsB

List all storage buckets in the Supabase project.

Inputs: no named parameters.

supabase_list_filesC

List files in a Supabase storage bucket with optional path filtering.

Inputs: bucket (required), path, limit, offset.

supabase_list_tablesA

List all tables in the public schema of the Supabase database.

Inputs: no named parameters.

supabase_queryC

Execute a SELECT query on a Supabase table with optional filtering, ordering, and pagination.

Inputs: table (required), limit, order, filter, +2 more.

supabase_rpcC

Call a stored function or RPC endpoint in Supabase.

Inputs: function (required), args.

supabase_updateC

Update rows in a Supabase table that match the filter conditions.

Inputs: data (required), table (required), filter (required).

supabase_upload_fileC

Upload a file to a Supabase storage bucket.

Inputs: data (required), path (required), bucket (required), contentType.

Tool Schema Changelog

Recent tool additions, removals, and schema changes observed during successful MCP inspections.

Loading tool schema changelog…

    TDQS

    B3.4/5.0

    Scored across 12 tools

    Disambiguation4/5

    Most tools have clearly distinct resource+action targets (query vs insert vs update vs delete, table introspection vs storage ops). The one soft spot is three overlapping 'run arbitrary logic' tools — supabase_query, supabase_rpc, and supabase_execute_sql — where an agent may hesitate between SELECT-on-table, stored function, and raw SQL, though the descriptions do differentiate them.

    Naming Consistency5/5

    Every tool follows a strict supabase_<verb>_<noun> snake_case pattern (query, insert, update, delete, list_tables, get_table_schema, upload_file, list_files, delete_file, list_buckets). No deviations or mixed conventions.

    Tool Count5/5

    12 tools is well within the ideal range and each earns its place: three DB write ops, two read/introspection paths, one RPC/SQL path, and four storage ops. Nothing feels padded or missing at the count level.

    Completeness4/5

    Core coverage is strong: full row-level CRUD, schema introspection, RPC/raw SQL, and storage upload/list/delete/buckets. Minor gaps remain — no bucket creation, no file download/retrieval, no upsert, and no auth/user or policy management — but these are workable around or out of the server's stated scope.

    Maintenance

    ActivityInactive
    ResponsivenessNo recent community issues

    Related MCP Connectors

    Related MCP Servers