Supabase MCP Server
Complete MCP server for Supabase backend-as-a-service platform. Manage projects, databases, storage, Edge Functions, and authentication — all via AI.
Features
- 🗄️ Projects - Create, list, and manage Supabase projects
- 📊 Database - Query tables, insert/update/delete rows, browse schemas
- 💾 Storage - Manage buckets and files with upload/download
- ⚡ Edge Functions - Deploy and manage serverless Deno functions
- 🔐 Authentication - Configure auth providers, manage users
- 🔑 Secrets - Manage environment variables for Edge Functions
Installation
npm install
npm run build
Environment Variables
| Variable | Required | Description | Example |
|---|---|---|---|
SUPABASE_ACCESS_TOKEN |
✅ | Supabase Management API access token | sbp_abc123... |
SUPABASE_PROJECT_REF |
❌ | Default project reference (optional) | xyzabc123 |
Getting Your Access Token
- Log in to Supabase: https://app.supabase.com/
- Navigate to Account Settings (click your avatar)
- Go to Access Tokens tab
- Click Generate New Token
- Give it a name and copy the token
- Set environment variable:
export SUPABASE_ACCESS_TOKEN='sbp_your_token_here'
Required API Scopes
- Full Management API Access - Read/write access to all resources
Usage
Stdio Mode (Default)
npm start
# or
node dist/main.js
With MCP Client
Add to your MCP settings:
{
"mcpServers": {
"supabase": {
"command": "node",
"args": ["/path/to/servers/supabase/dist/main.js"],
"env": {
"SUPABASE_ACCESS_TOKEN": "your_token_here",
"SUPABASE_PROJECT_REF": "optional_default_project"
}
}
}
}
Available Tools (30)
Projects (5)
supabase_list_projects- List all projects with statussupabase_get_project- Get project details by IDsupabase_create_project- Create new Supabase projectsupabase_get_project_settings- Get project configurationsupabase_delete_project- Delete project permanently
Database (5)
supabase_list_tables- List tables in schemasupabase_query_table- Query rows with filters and paginationsupabase_insert_rows- Insert one or more rowssupabase_update_rows- Update rows matching filterssupabase_delete_rows- Delete rows matching filters
Storage (8)
supabase_list_buckets- List storage bucketssupabase_get_bucket- Get bucket detailssupabase_create_bucket- Create new bucket (public/private)supabase_upload_file- Upload file to bucketsupabase_list_objects- List files in bucket with paginationsupabase_delete_object- Delete file from bucketsupabase_delete_bucket- Delete bucket and all contents
Edge Functions (4)
supabase_list_functions- List Edge Functionssupabase_get_function- Get function detailssupabase_deploy_function- Deploy or update functionsupabase_delete_function- Delete Edge Function
Auth & Secrets (9)
supabase_get_auth_config- Get auth configurationsupabase_update_auth_config- Update auth settingssupabase_list_users- List authenticated users with paginationsupabase_get_user- Get user details by IDsupabase_delete_user- Delete auth usersupabase_list_secrets- List environment variablessupabase_create_secret- Create/update secretsupabase_delete_secret- Delete secret
Coverage Manifest
Total Supabase Management API endpoints: ~120 (Projects, Database, Storage, Functions, Auth, Realtime, Logs)
Tools implemented: 30
Coverage: ~25%
Intentionally Skipped:
- Database Migrations - Complex schema management (better via CLI/UI)
- Realtime Channels - WebSocket configuration (runtime feature, not management)
- Logs & Analytics - Log streaming and metrics (better via dashboard)
- Database Backups - Backup/restore management (better via UI/CLI)
- Custom Domains - SSL/DNS configuration (one-time setup)
- Billing & Usage - Subscription management (sensitive, UI-preferred)
- Organization Members - Team/role management (administrative UI task)
- Network Restrictions - IP allowlisting (security-sensitive)
Focus is on high-value development operations: project provisioning, database CRUD, storage management, function deployment, and auth configuration.
Architecture
- main.ts - Entry point with env validation and graceful shutdown
- server.ts - MCP server class with lazy-loaded tool modules
- tools/ - Domain-organized tool files (projects, database, storage, functions, auth)
- client/supabase-client.ts - Fetch-based API client
License
MIT