Skip to content
Scalekit Docs
Talk to an Engineer Dashboard

Connect AI agents to the Supabase MCP server

Vendor MCP
Open markdown

The Supabase MCP connector routes your AI agent's tool calls to Supabase's own MCP server through Scalekit. Each user signs in to Supabase once, and Scalekit stores and refreshes their tokens, so your agent never handles credentials. It comes with 29 tools.

Tools
29
What they doRead · write · destructive
18 · 4 · 718 read4 write7 destructive
Users sign in with
OAuth app
Scalekit's or your own

Setup

  1. Install the SDK

    Terminal window
    npm install @scalekit-sdk/node dotenv
  2. Set your credentials

    Add your Scalekit credentials to your .env file. Find values in app.scalekit.com > Developers > API Credentials.

    .env
    SCALEKIT_ENVIRONMENT_URL=<your-environment-url>
    SCALEKIT_CLIENT_ID=<your-client-id>
    SCALEKIT_CLIENT_SECRET=<your-client-secret>
  3. Create the Supabase MCP connection

    In AgentKit > Connections, create a Supabase MCP connection. The name you give it is the connection_name your code passes. See Configure connections.

    Scalekit credentials are available for Supabase, so you don't need to register an OAuth app.

  4. Authorize a user and make your first call

    quickstart.mts
    import { ScalekitClient } from '@scalekit-sdk/node'
    import 'dotenv/config'
    import { createInterface } from 'node:readline/promises'
    const scalekit = new ScalekitClient(
    process.env.SCALEKIT_ENVIRONMENT_URL,
    process.env.SCALEKIT_CLIENT_ID,
    process.env.SCALEKIT_CLIENT_SECRET,
    )
    const actions = scalekit.actions
    const connector = 'supabasemcp'
    const identifier = 'user_123'
    // Generate an authorization link for the user
    const { link } = await actions.getAuthorizationLink({ connectionName: connector, identifier })
    console.log('Authorize Supabase MCP:', link)
    const rl = createInterface({ input: process.stdin, output: process.stdout })
    await rl.question('Press Enter after authorizing...')
    rl.close()
    // Make your first call
    const result = await actions.executeTool({
    connector,
    identifier,
    toolName: 'supabasemcp_list_organizations',
    toolInput: {},
    })
    console.log(result)
    Terminal window
    npx tsx quickstart.mts

    Each user signs in once. See Authorize a user for the full flow and statuses.

Tools

Pass the exact name to execute_tool
Try in PlaygroundRequest a tool
  • supabasemcp_confirm_costAsk the user to confirm their understanding of the cost of creating a new project or branch.Read-only

    Confirm Cost

    Ask the user to confirm their understanding of the cost of creating a new project or branch. Call `get_cost` first. Returns a unique ID for this confirmation which should be passed to `create_project` or `create_branch`.

    Inputs

    amountnumberrequired
    Estimated cost amount returned by get_cost.
    recurrencestringrequired
    No description.one of hourlymonthly
    typestringrequired
    No description.one of projectbranch
  • supabasemcp_generate_typescript_typesGenerates TypeScript types for a project.Read-only

    Generate Typescript Types

    Generates TypeScript types for a project.

    Inputs

    project_idstringrequired
    Supabase project ID. Get it from list_projects.
  • supabasemcp_get_advisorsGets a list of advisory notices for the Supabase project.Read-only

    Get Advisors

    Gets a list of advisory notices for the Supabase project. Use this to check for security vulnerabilities or performance improvements. Include the remediation URL as a clickable link so that the user can reference the issue themselves. It's recommended to run this tool regularly, especially after making DDL changes to the database since it will catch things like missing RLS policies.

    Inputs

    project_idstringrequired
    Supabase project ID. Get it from list_projects.
    typestringrequired
    The type of advisors to fetchone of securityperformance
  • supabasemcp_get_costGets the cost of creating a new project or branch.Read-only

    Get Cost

    Gets the cost of creating a new project or branch. Never assume organization as costs can be different for each. Always repeat the cost to the user and confirm their understanding before proceeding.

    Inputs

    organization_idstringrequired
    Supabase organization ID. Get it from list_organizations.
    typestringrequired
    No description.one of projectbranch
  • supabasemcp_get_edge_functionRetrieves file contents for an Edge Function in a Supabase project.Read-only

    Get Edge Function

    Retrieves file contents for an Edge Function in a Supabase project.

    Inputs

    function_slugstringrequired
    URL-friendly slug of the Edge Function. Get it from list_edge_functions.
    project_idstringrequired
    Supabase project ID. Get it from list_projects.
  • supabasemcp_get_organizationGets details for an organization.Read-only

    Get Organization

    Gets details for an organization. Includes subscription plan.

    Inputs

    idstringrequired
    Unique identifier of the resource.
  • supabasemcp_get_projectGets details for a Supabase project.Read-only

    Get Project

    Gets details for a Supabase project.

    Inputs

    idstringrequired
    Unique identifier of the resource.
  • supabasemcp_get_project_urlGets the API URL for a project.Read-only

    Get Project Url

    Gets the API URL for a project.

    Inputs

    project_idstringrequired
    Supabase project ID. Get it from list_projects.