Supabase MCP — Database & Auth for AI Agents
Official Supabase MCP server. Connect AI agents to Supabase for database queries, auth management, storage, edge functions, and real-time subscriptions. 2.6K+ stars.
Staging seguro para este activo
Este activo primero queda en staging. El prompt copiado pide inspeccionar los archivos staged antes de activar scripts, config MCP o config global.
npx -y tokrepo@latest install e54d5caa-6a9d-449d-aef7-5e7cf8de2781 --target codexPrimero deja archivos en staging; la activación requiere revisar el README y el plan staged.
What it is
Supabase MCP is the official Model Context Protocol server built by Supabase. It lets AI coding assistants like Claude Code or Cursor interact with your Supabase project directly -- running SQL queries, managing authentication, accessing file storage, calling edge functions, and subscribing to real-time changes.
It targets developers who build applications on Supabase and want their AI agent to understand their database schema, write queries, debug issues, and manage backend resources without context-switching to the Supabase dashboard.
How it saves time or tokens
Instead of manually describing your database schema to the AI or copy-pasting query results, the MCP server gives the agent direct access. The agent can inspect your tables, understand relationships, write and test SQL queries, and even create database migrations. This eliminates the schema-description overhead that wastes both your time and prompt tokens.
How to use
- Add the Supabase MCP server to your editor configuration:
{
"mcpServers": {
"supabase": {
"command": "npx",
"args": [
"-y",
"@supabase/mcp-server-supabase@latest",
"--access-token",
"sbp_YOUR_TOKEN"
]
}
}
}
- Generate a personal access token at https://supabase.com/dashboard/account/tokens.
- Restart your AI editor.
- Ask the agent to interact with your Supabase project:
'Show me the schema of the users table and suggest an index for the email column.'
Example
| Capability | What the agent can do |
|---|---|
| Database | Read schema, run SQL, create migrations |
| Auth | List users, check policies, debug RLS |
| Storage | List buckets, manage files |
| Edge Functions | List and invoke functions |
| Real-time | Configure subscriptions |
Related on TokRepo
- Supabase MCP integration -- deep-dive into Supabase MCP setup
- AI tools for database -- database tools for AI agents
Common pitfalls
- The personal access token grants broad access to your Supabase project. Use a token scoped to development projects, not production, when experimenting with AI agents.
- Row Level Security (RLS) policies apply to SQL queries run through the MCP server. If your queries return empty results, check that the token's role has the necessary permissions.
- Schema changes made by the agent (CREATE TABLE, ALTER TABLE) are applied immediately. Review generated migrations before letting the agent execute them.
Preguntas frecuentes
Yes. This MCP server is built and maintained by Supabase under the @supabase npm organization. It is the official integration for connecting AI agents to Supabase projects. It follows the Model Context Protocol standard and works with any MCP-compatible editor.
The agent can run any SQL that the access token permits, including writes and schema changes. To protect production data, use a token scoped to your development or staging project. Never use a production token during development or experimentation with AI agents.
Yes. The MCP server can list your deployed edge functions and invoke them. This lets the AI agent trigger serverless functions as part of its workflow. You can use this to test edge functions, debug issues, or chain function calls during development.
The MCP server connects using your personal access token, which typically has service_role or anon level access depending on configuration. RLS policies are enforced based on this role. If you want the agent to see data as a specific user, configure the token accordingly.
The MCP server is designed for Supabase Cloud projects authenticated via personal access tokens. For self-hosted Supabase, you would need to configure the server to point to your self-hosted instance, which may require additional setup. Check the repository documentation for self-hosted configuration options.
Referencias (3)
- Supabase MCP GitHub— Official Supabase MCP server
- Supabase Docs— Supabase documentation and platform
- MCP Official Docs— Model Context Protocol specification
Relacionados en TokRepo
Fuente y agradecimientos
Created by Supabase. Licensed under Apache 2.0. supabase-community/supabase-mcp — 2,600+ GitHub stars
Discusión
Activos relacionados
Supabase MCP — Postgres + Auth Server for AI Agents
MCP server for Supabase that gives AI agents access to PostgreSQL databases, authentication, storage, and edge functions. Query data, manage users, and build full-stack features. 4,000+ stars.
DBHub — Universal Database MCP Server, Zero Dependencies
Token-efficient database MCP server supporting Postgres, MySQL, MariaDB, SQL Server, and SQLite. Just two MCP tools, zero dependencies, read-only safe.
WhatsApp MCP Server — Chat with WhatsApp via AI Agents
MCP server connecting Claude and AI agents to your personal WhatsApp. Search contacts, read messages, send replies and media via natural language.
Apify MCP Server — 8,000+ Web Scrapers for Agents
Apify MCP Server connects agents to Apify Actors via a hosted endpoint (mcp.apify.com) or local run, turning thousands of web scrapers into callable tools.