MCP/Supabase MCP Server
Supabase MCP Server logo

Supabase MCP Server

Verified Golden (1000+ GitHub stars)

Connect AI assistants directly to Supabase to manage tables, query PostgreSQL data, and interact with storage and edge functions.

backend•Database & Backend as a Service
GitHub3k
License:MIT
VERIFIED

About this Server

Connect Supabase projects directly with AI assistants using the Model Context Protocol (MCP). This server standardizes communication between Large Language Models and Supabase, enabling AI to manage tables, query data, and interact with project features like edge functions, storage, and branching. Customize access with read-only or project-scoped modes and select specific tool groups to fit your needs. Integrated tools cover account management, documentation search, database operations, debugging, and more, empowering AI to assist with development, monitoring, and deployment tasks in your Supabase environment efficiently and securely.

Real-time Interaction

Direct low-latency RPC protocol communication with structured JSON schemas.

Scoped Sandboxing

Restricted capability bounds to prevent accidental modifications or leakage.

Security & Best Practices

Personal Access Token Scoping: Generate scoped Supabase Personal Access Tokens or project API keys and store them securely in environment variables.
Read-Only Mode: Run with read-only query permissions during exploratory sessions to prevent accidental mutations or destructive drops.
Row Level Security Enforcement: Ensure PostgreSQL Row Level Security policies remain active to prevent data leakage during AI queries.
Zero Credential Exposure: Never commit your Supabase service role keys or database passwords to public version control repositories.

When to Use (and When Not To)

Best For
  • •Full-stack developers using Supabase for backend infrastructure, authentication, and PostgreSQL database storage
  • •Database administration, schema planning, and table migrations assisted by AI models
  • •Edge function development, storage bucket configuration, and debugging live deployment errors
  • •AI-assisted development workflows needing direct, scoped access to PostgreSQL data and project metadata
Not For / Limitations
  • •Production environments without read-only tokens or proper row level security policies configured
  • •Mass bulk data exports of gigabyte-scale datasets that exceed LLM context window limits
  • •Direct administrative bypass of Supabase auth and security rules on sensitive client-facing production tables

Install & Setup

terminal command
$claude mcp add supabase npx -y @supabase/mcp-server

Exposed Tools & Endpoints

7 tools

Functions your AI agent can invoke via this Model Context Protocol server

list_tables

List database tables, view definitions, foreign keys, and column schema types in the connected Supabase database.

execute_query

Run read-only or parameterized SQL queries against PostgreSQL tables with safe execution bounds.

apply_migration

Apply DDL migrations, create tables, update constraints, and manage database schema evolutions.

manage_storage

Inspect storage buckets, upload assets, download files, and configure public or private access policies.

manage_edge_functions

Inspect, test, and deploy Supabase Edge Functions written in TypeScript or Deno.

search_docs

Search official Supabase documentation, guides, and client SDK references directly within LLM context.

get_project_logs

Query real-time Supabase project logs, API gateway latency metrics, and database error traces.