Labsco
NightTrek logo

Supabase

โ˜… 14

from NightTrek

Interact with Supabase databases, query tables, and generate TypeScript types.

๐Ÿ”ฅ๐Ÿ”ฅ๐Ÿ”ฅโœ“ VerifiedAccount requiredAdvanced setup

Supabase MCP Server

A Model Context Protocol (MCP) server for interacting with Supabase databases. This server provides tools for querying tables and generating TypeScript types through the MCP interface.

Features

  • Query Tables: Execute queries on any table with support for:

    • Schema selection
    • Column filtering
    • Where clauses with multiple operators
    • Pagination
    • Error handling
  • Type Generation: Generate TypeScript types for your database:

    • Support for any schema (public, auth, api, etc.)
    • Works with both local and remote Supabase projects
    • Direct output to console
    • Automatic project reference detection

Integration with Claude Desktop

  1. Open Claude Desktop settings:

    • macOS: ~/Library/Application Support/Claude/claude_desktop_config.json
    • Windows: %APPDATA%\Claude\claude_desktop_config.json
    • Linux: ~/.config/Claude/claude_desktop_config.json
  2. Add the server configuration:

{
  "mcpServers": {
    "supabase": {
      "command": "node",
      "args": ["/absolute/path/to/supabase-mcp-server/build/index.js"],
      "env": {
        "SUPABASE_URL": "your_project_url",
        "SUPABASE_KEY": "your_service_role_key"
      }
    }
  }
}

Integration with VSCode Extension

  1. Open VSCode settings:

    • macOS: ~/Library/Application Support/Code/User/globalStorage/saoudrizwan.claude-dev/settings/cline_mcp_settings.json
    • Windows: %APPDATA%\Code\User\globalStorage\saoudrizwan.claude-dev\settings\cline_mcp_settings.json
    • Linux: ~/.config/Code/User/globalStorage/saoudrizwan.claude-dev/settings/cline_mcp_settings.json
  2. Add the server configuration (same format as Claude Desktop).

Available Tools

query_table

Query a specific table with schema selection and where clause support.

Parameters:

  • schema (optional): Database schema (defaults to public)
  • table (required): Name of the table to query
  • select (optional): Comma-separated list of columns
  • where (optional): Array of conditions with:
    • column: Column name
    • operator: One of: eq, neq, gt, gte, lt, lte, like, ilike, is
    • value: Value to compare against

generate_types

Generate TypeScript types for your Supabase database schema.

Parameters:

  • schema (optional): Database schema (defaults to public)