Migrate Your Lovable Supabase Project via Chat
One prompt. One API key. Your entire Supabase backend — schema, data, edge functions, auth — migrated while you watch.
Staticbot's MCP server exposes 36 tools that AI agents can call directly. That means you can run a full Supabase migration from your terminal — just tell your AI agent what to migrate and where. No dashboard, no clicking, no copy-pasting credentials between tabs.
What You Need
An MCP-compatible AI agent
Claude Code, Cursor, Windsurf, or any tool that supports the Model Context Protocol
A Staticbot API key
Generate one in your Staticbot dashboard under API Keys
Your project details
Local repo path, Lovable project URL, and target Supabase project URL
Step 1: Connect the MCP Server
Add the Staticbot MCP server to your AI agent's configuration. For Claude Code, add this to your .mcp.json in your project root:
{
"mcpServers": {
"staticbot": {
"command": "npx",
"args": ["-y", "@anthropic-ai/mcp-remote",
"https://mcp.staticbot.dev/mcp",
"--header",
"Authorization: Bearer ${STATICBOT_API_KEY}"
],
"env": {
"STATICBOT_API_KEY": "your-api-key-here"
}
}
}
}For other AI agents, see the MCP Server docs for setup instructions.
Step 2: Paste the Prompt
Open your AI agent's chat and paste this prompt — replacing the placeholders with your actual values:
Migrate /path/to/your/local/repo https://lovable.dev/projects/<your-lovable-project-id> to https://supabase.com/dashboard/project/<your-target-project-ref> using Staticbot MCP
That's it. Your AI agent will use the Staticbot MCP tools to orchestrate the entire migration.
What Happens Next
The AI agent calls Staticbot's MCP tools step by step. Here's what it does — and where it'll ask for your input:
Setup
Reads your .env to find the source Supabase URL and anon key. Detects the GitHub repo. Creates a template from your repo.
Discovery
Inventories your source project — tables, edge functions, storage buckets, auth providers, migration files. Presents the inventory for your approval.
DB Migration
Applies all SQL migration files and enables required extensions on the target.
Data Import
Deploys an export edge function, calls it to export your data, and imports it to the target. Also copies storage objects, secrets, cron jobs, and OAuth identities.
Edge Functions
Deploys all your edge functions to the target Supabase project.
Auth Config
Updates auth configuration — providers, redirect URLs, site URL.
Backend Switchover
Replaces source Supabase env vars in your repo with the target values.
Next Steps
Offers continuous sync and frontend deployment options.
One manual step: During data import, the AI agent will ask you to open your Lovable project and paste deploy staticbot edge function into the Lovable AI chat. This deploys the temporary export function on the source Supabase so Staticbot can read your data.
Why MCP?
Conversational
No need to learn a new UI. Your AI agent explains what's happening at each step and asks for approval when needed.
Faster setup
The agent reads your .env, finds your integrations, and creates the migration — no manual form-filling.
Smart error handling
If a job fails, the agent can retry or skip it. It understands the context and suggests the right action.
Works with any MCP client
Claude Code, Cursor, Windsurf, or any tool that supports the Model Context Protocol.
Ready to migrate from chat?
Get your API key, add the MCP server config, and paste the prompt. Your migration runs while you stay in your editor.
