Supabase MCP Server
Supabase MCP servers enable AI models to interact with Supabase backends, providing capabilities for PostgreSQL databases, real-time subscriptions, authentication, and storage operations.
Overview
The MCP Supabase Server enables AI models to interact with Supabase backends, providing a standardized interface for working with this powerful PostgreSQL-based platform. Supabase combines the reliability of PostgreSQL with modern features like real-time subscriptions, authentication, and storage, making it ideal for building scalable AI-powered applications.
Official Server:
Maintained by the Supabase Community
Key Features
PostgreSQL Database Operations
Execute SQL queries, manage tables, and handle database migrations
Edge Functions Management
Deploy and manage serverless Edge Functions
Branching Support
Create development branches with isolated environments
Project Management
Full project lifecycle management and monitoring
Available Tools
Quick Reference
| Tool | Purpose | Category |
|---|---|---|
list_projects | List all Supabase projects | Project |
create_project | Create new Supabase project | Project |
execute_sql | Execute SQL queries | Database |
list_tables | List database tables | Database |
apply_migration | Apply database migrations | Database |
deploy_edge_function | Deploy Edge Functions | Edge Functions |
get_logs | Retrieve service logs | Monitoring |
generate_typescript_types | Generate TypeScript types | Development |
Project Management
list_projectsβΆ
Warning:
Unavailable if server is scoped to a specific project
Lists all Supabase projects for the authenticated user.
use_mcp_tool({
server_name: "supabase",
tool_name: "list_projects",
arguments: {}
});
get_projectβΆ
Retrieves detailed information about a specific project.
use_mcp_tool({
server_name: "supabase",
tool_name: "get_project",
arguments: {
project_id: "your-project-id"
}
});
create_projectβΆ
Creates a new Supabase project with specified configuration.
use_mcp_tool({
server_name: "supabase",
tool_name: "create_project",
arguments: {
name: "My New Project",
organization_id: "org-id",
region: "us-east-1"
}
});
pause_projectβΆ
Pauses a Supabase project to save resources.
use_mcp_tool({
server_name: "supabase",
tool_name: "pause_project",
arguments: {
project_id: "your-project-id"
}
});
Database Operations
execute_sqlβΆ
Executes raw SQL queries in the database. Use this for regular queries that don't change the schema.
use_mcp_tool({
server_name: "supabase",
tool_name: "execute_sql",
arguments: {
sql: "SELECT * FROM users WHERE active = true"
}
});
list_tablesβΆ
Lists all tables within the specified schemas.
use_mcp_tool({
server_name: "supabase",
tool_name: "list_tables",
arguments: {
schemas: ["public"]
}
});
apply_migrationβΆ
Applies a SQL migration to the database. SQL passed to this tool will be tracked, so use it for DDL operations (schema changes).
use_mcp_tool({
server_name: "supabase",
tool_name: "apply_migration",
arguments: {
name: "add_users_table",
sql: "CREATE TABLE users (id SERIAL PRIMARY KEY, email TEXT UNIQUE);"
}
});
list_migrationsβΆ
Lists all migrations that have been applied to the database.
use_mcp_tool({
server_name: "supabase",
tool_name: "list_migrations",
arguments: {}
});
list_extensionsβΆ
Lists all PostgreSQL extensions available in the database.
use_mcp_tool({
server_name: "supabase",
tool_name: "list_extensions",
arguments: {}
});
get_logsβΆ
Retrieves logs for debugging and monitoring. Available services: api, postgres, edge functions, auth, storage, realtime.
use_mcp_tool({
server_name: "supabase",
tool_name: "get_logs",
arguments: {
service: "postgres",
limit: 100
}
});
Edge Functions
list_edge_functionsβΆ
Lists all Edge Functions deployed in the Supabase project.
use_mcp_tool({
server_name: "supabase",
tool_name: "list_edge_functions",
arguments: {}
});
deploy_edge_functionβΆ
Deploy a new Edge Function or update an existing one.
use_mcp_tool({
server_name: "supabase",
tool_name: "deploy_edge_function",
arguments: {
name: "hello-world",
code: "Deno.serve(() => new Response('Hello World!'))"
}
});
Development Branching
Paid Feature:
Branching features require a paid Supabase plan
create_branchβΆ
Creates a development branch with migrations from the production branch.
use_mcp_tool({
server_name: "supabase",
tool_name: "create_branch",
arguments: {
name: "feature-branch",
base: "main"
}
});
list_branchesβΆ
Lists all development branches in the project.
use_mcp_tool({
server_name: "supabase",
tool_name: "list_branches",
arguments: {}
});
merge_branchβΆ
Merges migrations and edge functions from a development branch to production.
use_mcp_tool({
server_name: "supabase",
tool_name: "merge_branch",
arguments: {
branch_name: "feature-branch"
}
});
delete_branchβΆ
Deletes a development branch.
use_mcp_tool({
server_name: "supabase",
tool_name: "delete_branch",
arguments: {
branch_name: "feature-branch"
}
});
Development Tools
generate_typescript_typesβΆ
Generates TypeScript types based on your database schema for type-safe development.
use_mcp_tool({
server_name: "supabase",
tool_name: "generate_typescript_types",
arguments: {
schema: "public"
}
});
get_project_urlβΆ
Retrieves the API URL for the current project.
use_mcp_tool({
server_name: "supabase",
tool_name: "get_project_url",
arguments: {}
});
get_anon_keyβΆ
Retrieves the anonymous API key for the current project.
use_mcp_tool({
server_name: "supabase",
tool_name: "get_anon_key",
arguments: {}
});
Installation
{
"mcpServers": {
"supabase": {
"command": "npx",
"args": [
"-y",
"@supabase/mcp-server-supabase@latest",
"--access-token",
"<your-personal-access-token>"
]
}
}
}
Getting your access token:
Generate a personal access token from your Supabase account settings
Use Cases
Database Management
- Execute SQL queries and manage database schema
- Apply and track database migrations
- List tables, extensions, and database structure
Application Development
- Deploy and manage Edge Functions
- Generate TypeScript types for type-safe development
- Access project configuration and API keys
Team Collaboration
- Create development branches for isolated testing
- Merge changes from development to production
- Monitor application logs and performance
Project Operations
- Create and manage multiple Supabase projects
- Pause and restore projects to manage costs
- Monitor resource usage and billing
Sources
Related Articles & Guides
Milvus MCP Server
Connect AI assistants to Milvus, the open-source vector database, for semantic search, vector storage, and hybrid query operations through the Model Context Protocol.
WhoDB MCP Server
Connect AI assistants to WhoDB, the all-in-one database management tool, for querying and exploring PostgreSQL, MySQL, SQLite, MongoDB, Redis, and more through MCP.
Chroma MCP Server
Chroma MCP servers enable AI models to interact with the Chroma embedding database for vector search, collection management, and document operations.