
How to add Supabase MCP Server to Cursor
Official Supabase server: manage tables, run SQL, branches, configs and edge functions from your AI client. Paste the config into ~/.cursor/mcp.json and restart Cursor.
Last updated June 15, 2026 · 2.7k★ · http · oauth · official
Cursor config for Supabase MCP Server
Add remote URL https://mcp.supabase.com/mcp to your MCP client (OAuth login){
"mcpServers": {
"supabase-mcp-server": {
"url": "https://mcp.supabase.com/mcp?read_only=true&project_ref=<your-project-ref>",
"type": "streamable-http"
}
}
}Remote server — no local install needed. Restart the client after saving the config.
Setup steps
- 1Open Cursor → Settings → MCP → Add new MCP server (or edit ~/.cursor/mcp.json directly).
- 2Paste the Supabase MCP Server config below into the "mcpServers" object.
- 3Fill in placeholder secrets, then save.
- 4Cursor reloads MCP servers automatically — check Settings → MCP for a green status dot.
- 5Ask Cursor to use one of Supabase MCP Server's tools to confirm it's connected.
Before you start
- A Supabase account and at least one project (sign up at supabase.com)
- An MCP-capable client (Cursor, Claude Code, VS Code, Windsurf, etc.)
- For the remote server: nothing to install — authentication is handled by an OAuth 2.1 browser flow, no manual token needed
- For local/self-hosted stdio mode: Node.js and the Supabase CLI; a Supabase personal access token can be created in the dashboard under Account > Access Tokens
- Know your project ref (the `project_ref` ID from your project URL) to scope access
What Supabase MCP Server can do in Cursor
list_projects / get_project / create_projectList, inspect, and create Supabase projects
list_tablesList database tables and their schema
execute_sqlRun an arbitrary SQL query against the project database
apply_migrationApply a named SQL migration (DDL/schema change)
list_migrations / list_extensionsInspect applied migrations and installed Postgres extensions
deploy_edge_functionDeploy a Supabase Edge Function; list_edge_functions and get_edge_function inspect them
create_branch / list_branches / merge_branch / reset_branch / rebase_branch / delete_branchManage development branches of the database
get_logs / get_advisorsFetch service logs and security/performance advisor findings for debugging
Security
Grants broad access to your Supabase project including data and configuration; always scope with project_ref and enable read_only mode unless writes are explicitly needed. The OAuth flow authorizes the MCP client against your whole org, so review requested scopes.
Supabase MCP Server + Cursor FAQ
Where is the Cursor config file?
Cursor reads MCP servers from ~/.cursor/mcp.json. Paste the Supabase MCP Server config there under the "mcpServers" key and restart the client.
Is Supabase MCP Server safe to use with Cursor?
Grants broad access to your Supabase project including data and configuration; always scope with project_ref and enable read_only mode unless writes are explicitly needed. The OAuth flow authorizes the MCP client against your whole org, so review requested scopes.
Do I need a personal access token?
Not for the recommended remote server — it uses an OAuth 2.1 browser login. A personal access token is only relevant for local/self-hosted CLI setups; create one in the dashboard under Account > Access Tokens.
How do I stop the agent from modifying my database?
Add read_only=true to the server URL. This forces all database operations into read-only transactions so the agent cannot write or run DDL.
Can I limit it to one project?
Yes. Pass project_ref=<id> in the URL to scope the server to a single project instead of your whole account.