Supabase
Code
Supabase MCP: How to Set It Up and Boost Your Workflow 🚀
Jul 4, 2025
Supabase now offers an official MCP server, letting AI assistants like Cursor, Claude, or Copilot interact directly with your Supabase projects. This means you can manage your database, Edge Functions, logs, and more — right from your editor.
1️⃣ What is MCP?
MCP (Model Context Protocol) is a standard that lets AI models (like ChatGPT or Claude) call external tools safely. The Supabase MCP server acts as a bridge, enabling your AI to:
Create, pause, or manage projects
Run SQL queries
Manage tables and migrations
Create database branches
Fetch logs
Generate TypeScript types
Call Edge Functions
In short: your AI assistant becomes a hands-on developer for your Supabase setup.
2️⃣ What you’ll need
Node.js ≥ 16
A Supabase project
A Personal Access Token (PAT) with the right permissions
3️⃣ How to set up the MCP server
A) Create a PAT in Supabase
In your account settings, go to Tokens and create a new token (e.g. “MCP Server Access”). Copy it somewhere safe — you won’t be able to see it again.
B) Install and run the MCP server
Run this in your terminal:
This will download and launch the MCP server, connected to your Supabase account.
4️⃣ Connect your AI tool
Example 1: Cursor
In your project, create a file at
.cursor/mcp.json
(if it doesn’t exist).Add:
When you open Cursor, you should see a green indicator and a count of available tools.
Example 2: Claude Desktop (or similar tools)
For Claude Desktop or similar AI tools that support MCP:
Open the tool’s MCP settings or integrations panel.
Add a new MCP server configuration with:
Command:
npx
Arguments:
Save and restart Claude. The assistant will now list available Supabase tools in its tool panel when a session starts.
Tip: Some tools let you specify the MCP server as a custom command or a local executable. The pattern is the same — ensure the server starts with your token.
5️⃣ How does it work?
The AI assistant detects that MCP tools are available.
It decides which tool to use (e.g.
get_tables
,run_sql
).It sends the request to your MCP server.
The server talks to Supabase and returns the result.
Example: you can type, “List all tables and create a new dev branch called feature-xyz
”, and your assistant will handle it.
6️⃣ Key benefits
✅ No context switching between browser, terminal, and editor
✅ Automate repetitive tasks (migrations, functions, branches)
✅ Safer changes (read-only by default, fine-grained control)
✅ Faster prototyping
7️⃣ Best practices
Start in read-only mode to avoid unintended changes.
Limit your PAT’s permissions — give it only what it really needs.
Use MCP for early development, CI/CD pipelines, or workshops.
Review your logs and actions regularly to stay on top of changes.
Final thoughts
Supabase MCP makes it possible to work smarter by letting your AI assistant handle backend tasks. Setup is quick, and the flexibility it gives you can really speed up your workflow — whether you’re solo-building or part of a team.
Manage Your Supabase Projects on the Go with Supadex
If you’re already using Supabase—or planning to—there’s an easier way to manage your projects on the go. Introducing Supadex, a mobile app designed to streamline the management of your Supabase backend. With Supadex, you can:
View and manage your databases from your mobile device.
Execute SQL queries on the go.
Monitor real-time updates and database changes.
Access key project information, including user authentication stats and file storage.

Supadex helps you stay in control of your Supabase projects no matter where you are. Don’t wait—take your backend management to the next level today!