Supabase MCP server
Connects agents to a Supabase project: run SQL, inspect schema, read logs, and manage edge functions.
The Supabase MCP Server connects an agent to a Supabase project so it can work with the database and the surrounding platform. Beyond running SQL and listing tables it covers schema migrations, logs and advisors for debugging, edge functions, development helpers like TypeScript type generation, branching, storage, and a documentation search, organized into feature groups you can scope down with the features flag. A --read-only flag restricts it to read-only queries and tools, which is the safe default when pointing an agent at anything resembling production.
It runs over stdio via npx and authenticates with a Supabase personal access token in the SUPABASE_ACCESS_TOKEN environment variable, with an optional --project-ref to pin it to a single project rather than your whole account. Supabase also ships a hosted remote endpoint at https://mcp.supabase.com/mcp with OAuth login as an alternative. The package lives in the supabase-community organization, so it is marked official-community here rather than strictly first-party, but the install is verified against the current package.
Quick install
Copy-paste configs are provided for all 8 supported clients. Pick your client below.
Add to ~/.claude.json
{
"mcpServers": {
"supabase": {
"command": "npx",
"args": [
"-y",
"@supabase/mcp-server-supabase@latest",
"--read-only",
"--project-ref=<project-ref>"
],
"env": {
"SUPABASE_ACCESS_TOKEN": "<SUPABASE_ACCESS_TOKEN>"
}
}
}
}claude mcp add supabase -- npx -y @supabase/mcp-server-supabase@latest --read-only --project-ref=<project-ref>Available tools
| Tool | Description |
|---|---|
| list_projects | Lists all Supabase projects for the user. |
| get_project | Gets details for a project. |
| create_project | Creates a new Supabase project. |
| pause_project | Pauses a project. |
| restore_project | Restores a paused project. |
| list_organizations | Lists all organizations the user is a member of. |
| get_organization | Gets details for an organization. |
| get_cost | Gets the cost of a new project or branch for an organization. |
| confirm_cost | Confirms understanding of project or branch costs, required before creating one. |
| search_docs | Searches the Supabase documentation for up-to-date information. |
| list_tables | Lists all tables within the specified schemas. |
| list_extensions | Lists all extensions in the database. |
| list_migrations | Lists all migrations in the database. |
| apply_migration | Applies a tracked SQL migration to the database for DDL/schema changes. |
| execute_sql | Executes raw SQL against the database (read-only when the --read-only flag is set). |
| get_logs | Gets logs for a project by service type (api, postgres, edge functions, auth, storage, realtime). |
| get_advisors | Gets advisory notices for a project covering security vulnerabilities and performance issues. |
| get_project_url | Gets the API URL for a project. |
| get_publishable_keys | Gets the client-safe anonymous and publishable API keys for a project. |
| generate_typescript_types | Generates TypeScript types based on the database schema. |
| list_edge_functions | Lists all Edge Functions in a project. |
| get_edge_function | Retrieves the file contents for an Edge Function. |
| deploy_edge_function | Deploys a new or updated Edge Function to a project. |
| create_branch | Creates a development branch with migrations from the production branch. |
| list_branches | Lists all development branches. |
| delete_branch | Deletes a development branch. |
| merge_branch | Merges migrations and edge functions from a development branch to production. |
| reset_branch | Resets the migrations of a development branch to a prior version. |
| rebase_branch | Rebases a development branch on production to handle migration drift. |
| list_storage_buckets | Lists all storage buckets in a project (storage group, off by default). |
| get_storage_config | Gets the storage config for a project (storage group, off by default). |
| update_storage_config | Updates the storage config for a project (storage group, requires a paid plan). |
Required configuration
- SUPABASE_ACCESS_TOKENRequired
Supabase personal access token used to authenticate the server.
What you can do with it
Explore a database safely
Point the agent at a project in read-only mode and let it inspect schema and run SELECTs to answer questions without any write risk.
Debug from logs
When something breaks, the agent pulls project logs and correlates them with schema and recent queries to find the cause.
FAQ
- Is it free?
- Yes. The server is open source and free to run; it operates within your existing Supabase project and plan limits.
- Does it support remote/OAuth?
- Yes. Besides the local stdio package with a personal access token, Supabase offers a hosted remote MCP endpoint at https://mcp.supabase.com/mcp with OAuth login.