Connect Supabase to Claude Code

Work with projects, databases, auth, storage, and logs. Add Toolspoke to Claude Code once and it can use 20 Supabase actions. Your Supabase credential stays in Toolspoke, and you choose which actions Claude Code may call.

Set it up in Claude Code

Three steps, the first one once for every toolkit you will ever add.

  1. Add Toolspoke to Claude Code

    Run it in your project, then /mcp to sign in

    claude mcp add --transport http toolspoke https://toolspoke.com/mcp

    The sign-in opens in your browser, and Toolspoke asks you to approve it.

  2. Install Supabase and connect it

    Add Supabase to a project in your Toolspoke workspace.

    Access token. You provide it once, when you install the connector. Toolspoke encrypts it at rest and decrypts it only for the length of a single call, and the gateway attaches it to the outbound request itself, so it is never part of the arguments an agent sends.

    Personal access token
    Supabase dashboard → Account → Access Tokens. The token inherits your own org and project permissions.
  3. Choose what Claude Code may do

    All 20 actions start on. Switch off any of the 2 actions that change something in Supabase, and Claude Code gets a refusal if it tries.

What you can ask Claude Code for

A few of the Supabase actions that only read, so they are safe to try first.

  • List the Supabase projects this access token can reach, with their project ref, region and status
  • Fetch one project's name, region, status and Postgres version
  • Report the health of a project's services (auth, db, pooler, realtime, rest, storage)
  • List tables and views together with every column's name, type and nullability

What Claude Code can do in Supabase

18 actions read and 2 write.

Reads

  • List projects

    List the Supabase projects this access token can reach, with their project ref, region and status. Call this first, every other action needs a project ref.

  • Get project

    Fetch one project's name, region, status and Postgres version. Use when you need to confirm a project is active before querying it.

  • Check health

    Report the health of a project's services (auth, db, pooler, realtime, rest, storage). Use this when queries or API calls to a project are failing and you need to tell an outage from a bad query.

  • List tables

    List the tables and views in a project's database with their row estimates and whether row-level security is on. Use this to discover the schema before writing SQL, instead of guessing table names.

  • List table columns

    List tables and views together with every column's name, type and nullability. Use list_tables when you only need the table names, this response is several times larger.

  • List migrations

    List the migration history recorded for a project, newest last. Use this to see what schema changes have already been applied.

  • List advisors

    Run Supabase's security or performance advisors and return the outstanding lints, missing RLS policies, exposed views, unindexed foreign keys, unused indexes. Call the security advisor after any migration that adds tables or policies.

  • List edge functions

    List a project's deployed edge functions with their slug, status and version. Use this before reading or debugging function logs.

  • List storage buckets

    List a project's storage buckets and whether each one is public. Use this to check bucket names and public exposure before writing storage code.

  • Generate typescript types

    Generate TypeScript types for a project's database schema, ready to paste into a Database type file. Use this after a schema change so client code stays in sync.

  • Logs api

    API and edge request logs: method, path and response status for each request. Only the last minute is returned unless you pass a time range. Returns the 50 most recent lines.

  • Logs postgres

    Postgres server logs, including query errors and their severity. Only the last minute is returned unless you pass a time range. Returns the 50 most recent lines.

  • Logs edge function

    Edge function request logs, with per-invocation execution time and status. Only the last minute is returned unless you pass a time range. Returns the 50 most recent lines.

  • Logs edge function runtime

    Output written by edge function code itself, console logs and uncaught errors. Only the last minute is returned unless you pass a time range. Returns the 50 most recent lines.

  • Logs auth

    Auth service logs: sign-ins, token refreshes, and the reason a login failed. Only the last minute is returned unless you pass a time range. Returns the 50 most recent lines.

  • Logs storage

    Storage service logs. Only the last minute is returned unless you pass a time range. Returns the 50 most recent lines.

  • Logs realtime

    Realtime service logs. Only the last minute is returned unless you pass a time range. Returns the 50 most recent lines.

  • Logs branch action

    Branch workflow run logs. Only the last minute is returned unless you pass a time range. Returns the 50 most recent lines.

Writes

  • Query

    Run SQL against the project's Postgres database and return the result rows. Read-only by default; set read_only to false only when the user asked for a write. Always add an explicit LIMIT, the full result set is returned to you verbatim.

  • Apply migration

    Apply a named DDL migration to the project's database and record it in the migration history. Use this for schema changes (CREATE TABLE, ALTER TABLE, policies) rather than the query action, so the change is versioned. This writes to production, confirm with the user first.

Supabase in Claude Code: questions

Does Claude Code see my Supabase credential?

No. The credential is stored encrypted in Toolspoke, and the gateway adds it to each call. Claude Code only ever talks to Toolspoke, and the dashboard shows the last four characters of the credential and nothing more.

Can I stop Claude Code from changing things in Supabase?

Yes. Each of the 20 actions can be switched off for a project. Turn off the 2 that change something and Claude Code can only read.

Will 20 actions crowd Claude Code's context?

No. Toolspoke shows Claude Code five bridge tools, plus a guide where a toolkit has one, and Claude Code searches for the Supabase action it needs when it needs it. Adding more toolkits does not add more tools to its list.

Can I add it once for every project?

Yes. Add --scope user to the command and Claude Code keeps Toolspoke in every project on this machine. Without it, the server is added to the project you ran the command in.

What does it cost?

Tool calls are free on every plan, and a Supabase call does not run in a sandbox, so it bills nothing.

Try Supabase in Claude Code

Free to start, and tool calls cost nothing on any plan.