• PROVISION
  • ISOLATE
  • AUDIT
  • HUMAN

How to provision and manage database branches with your AI

Connect Supabase to your AI client to automate environment setup. You can move from a blank slate to a testing branch in a single prompt.

Ask AI about this page

Short answer

How can I use AI to manage Supabase database branches?

Your AI client uses the Supabase MCP to create new projects and spin up isolated branches for schema testing. This lets you test migrations in a sandbox environment without touching production. You get a full breakdown of the setup and management workflow below.

The outcomes.

Where your work lands.

Every command you give your AI results in one of these four states.

PROVISION

New project ready

The AI uses create_project to set up a fresh Supabase instance. You get a clean environment to start building from scratch.

ISOLATE

Branch created

Your agent creates a specific branch for testing. This keeps your schema changes away from your production data.

AUDIT

Branch list updated

The AI pulls a list of all existing branches. You can see exactly what environments are active and what they contain.

HUMAN

Manual review needed

The AI cannot write the actual SQL migrations. You still need to review and execute the schema changes yourself.

The workflow

What your AI does when you request a branch.

The AI handles the infrastructure setup so you can focus on the code.

  1. Initialize environment

    If you need a brand new workspace, the AI sets up the entire project structure for you.

    create_project
  2. Create sandbox

    The AI generates an isolated branch to hold your experimental schema changes.

    create_branch
  3. Verify branches

    The AI checks your current setup to ensure the new branch exists and is ready for use.

    list_branches
  4. Confirm status

    The AI reports back on the state of your project and the specific branch it just built.

    list_branches

Try it

Copy these to start.

Use these prompts to trigger the Supabase tools immediately.

Starting points

These are basic starting points. Swap out the project names and branch descriptions to match your actual setup.

Supabase Connector

You're all set. Choose your MCP client and follow the setup instructions.

Connector linkhttps://edge.vinkius.com/vk_preview_1yqJRB687wGnT0yDa9WG5Rvl1dh6u5Mg2RCACLvF/mcp

Claude Desktop

Follow the steps below to connect in seconds.

  1. 1In Claude Desktop, open Settings → Connectors.
  2. 2Click “Add custom connector” and paste the connector link above as the remote MCP server URL.
  3. 3Click Add and start a new chat — Supabase capabilities are ready to use.
Configuration · claude_desktop_config.jsonCopy
{
  "mcpServers": {
    "supabase-alternative-mcp": {
      "url": "https://edge.vinkius.com/vk_preview_1yqJRB687wGnT0yDa9WG5Rvl1dh6u5Mg2RCACLvF/mcp"
    }
  }
}
Copy into chat04
  • Create a new Supabase project named 'ecommerce-test'.

  • Spin up a new database branch called 'feature-auth-fix' in my current project.

  • Show me all the active branches in my Supabase project.

  • I need a new branch for testing a new schema; name it 'migration-v2'.

  • Claude
  • ChatGPT
  • Cursor
  • VS Code
  • Windsurf
  • Claude Code
  • JetBrains
  • Cline

Start here

Connect Supabase once, then ask.

Click the link to link your account. Your credentials stay encrypted and secure, and you can start using these tools in your favorite AI client right away.

Connect Supabase to your AI

FAQ

How the Supabase connector behaves

  • 01

    Can the AI write my SQL migrations?

    No. The AI can create the branches and projects, but you must provide and run the actual SQL code for the schema changes.

  • 02

    Will this delete my production data?

    No. The AI only uses tools to create projects and branches. It does not have any tools to delete existing data or projects.

  • 03

    Can I see which branches already exist?

    Yes. You can ask your AI to list all current branches in your project.

  • 04

    Does the AI manage my database users?

    No. This connector is limited to project and branch management. It cannot manage users or permissions.

  • 05

    Can I create multiple branches at once?

    You can ask the AI to create them one by one through separate prompts.

  • More questions about Supabase? The Connector page answers them. See everything the Supabase Connector can do

Connect Supabase to Claude, Cursor, ChatGPT & more