Esta página se muestra en inglés. Una traducción al español está en curso.
MCP ConfigsMar 31, 2026·2 min de lectura

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.

Listo para agents

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.

Stage only · 17/100Política: staging
Superficie agent
Cualquier agent MCP/CLI
Tipo
Mcp Config
Instalación
Stage only
Confianza
Confianza: Community
Entrada
Supabase MCP — Database & Auth for AI Agents
Comando de staging seguro
npx -y tokrepo@latest install e54d5caa-6a9d-449d-aef7-5e7cf8de2781 --target codex

Primero deja archivos en staging; la activación requiere revisar el README y el plan staged.

TL;DR
Official Supabase MCP server lets AI agents query databases, manage auth, access storage, and call edge functions in your Supabase project.
§01

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.

§02

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.

§03

How to use

  1. 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"
      ]
    }
  }
}
  1. Generate a personal access token at https://supabase.com/dashboard/account/tokens.
  2. Restart your AI editor.
  3. 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.'
§04

Example

CapabilityWhat the agent can do
DatabaseRead schema, run SQL, create migrations
AuthList users, check policies, debug RLS
StorageList buckets, manage files
Edge FunctionsList and invoke functions
Real-timeConfigure subscriptions
§05

Related on TokRepo

§06

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

Is this the official Supabase MCP server?+

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.

Can the agent modify my production database?+

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.

Does it support Supabase Edge Functions?+

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.

How does RLS interact with the MCP server?+

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.

Can I use this with self-hosted Supabase?+

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)
🙏

Fuente y agradecimientos

Created by Supabase. Licensed under Apache 2.0. supabase-community/supabase-mcp — 2,600+ GitHub stars

Discusión

Inicia sesión para unirte a la discusión.
Aún no hay comentarios. Sé el primero en compartir tus ideas.

Activos relacionados