Supabase MCP Server
Provides tools for interacting with Supabase databases via PostgREST (select, insert, update, delete, upsert, RPC) and management APIs (projects, organizations, schema/migrations, branches, logs, advisors, and TypeScript code generation).
Click on "Install Server".
Wait a few minutes for the server to deploy. Once ready, it will show a "Started" state.
In the chat, type
@followed by the MCP server name and your instructions, e.g., "@Supabase MCP ServerList all tables in the public schema"
That's it! The server will respond to your query, and you can continue using it as needed.
Here is a step-by-step guide with screenshots.
Supabase MCP Server
A Supabase MCP server built with the Dedalus MCP framework. Provides secure access to Supabase databases via the PostgREST API and management APIs with credential encryption and JIT token exchange.
Features
Database Tools (PostgREST)
Read Operations
Tool | Description |
| Select rows from a table with optional filters, ordering, and pagination |
| Get a single row by primary key |
Write Operations
Tool | Description |
| Insert one or more rows into a table |
| Update rows matching specified filters |
| Delete rows matching specified filters |
| Insert or update rows on conflict |
RPC
Tool | Description |
| Call a Supabase stored procedure/function |
Management Tools (Management API)
Projects & Organizations
Tool | Description |
| List all Supabase projects |
| Get details of a specific project |
| List all organizations |
Schema & Migrations
Tool | Description |
| List database schemas |
| List installed database extensions |
| List database migrations |
| Apply a DDL migration |
| Execute raw SQL with safety checks |
Branches
Tool | Description |
| List preview branches |
| Create a preview branch |
Logs & Advisors
Tool | Description |
| Get project logs (database, api, auth) |
| Get security and performance advisors |
Codegen
Tool | Description |
| Generate TypeScript types for database schema |
Prerequisites
Python 3.10+
uv package manager
Supabase project URL and API keys
Dedalus API Key
Setup
Clone the repository
git clone https://github.com/dedalus-labs/supabase-mcp.git
cd supabase-mcpInstall dependencies
uv syncConfigure environment variables
Create a .env file based on .env.example.
Client Usage
import asyncio
import os
from dotenv import load_dotenv
from dedalus_labs import AsyncDedalus, DedalusRunner
from dedalus_mcp.auth import Connection, SecretKeys, SecretValues
load_dotenv()
# Database connection (PostgREST)
supabase = Connection(
name="supabase-mcp",
secrets=SecretKeys(key="SUPABASE_SECRET_KEY"),
base_url=f"{SUPABASE_URL}/rest/v1",
auth_header_name="apikey",
auth_header_format="{api_key}",
)
# Management API connection
supabase_mgmt = Connection(
name="supabase-mcp-mgmt",
secrets=SecretKeys(access_token="SUPABASE_ACCESS_TOKEN"),
base_url="https://api.supabase.com/v1",
auth_header_format="Bearer {api_key}",
)
# Bind credentials (encrypted client-side, decrypted at dispatch time)
db_secrets = SecretValues(supabase, key=os.getenv("SUPABASE_SECRET_KEY", ""))
mgmt_secrets = SecretValues(supabase_mgmt, access_token=os.getenv("SUPABASE_ACCESS_TOKEN", ""))
async def main():
client = AsyncDedalus(
api_key=os.getenv("DEDALUS_API_KEY"),
base_url=os.getenv("DEDALUS_API_URL"),
as_base_url=os.getenv("DEDALUS_AS_URL"),
)
runner = DedalusRunner(client)
result = await runner.run(
input="Select all rows from the users table, limit to 5.",
model="anthropic/claude-sonnet-4-5",
mcp_servers=["dedalus-labs/supabase-mcp"],
credentials=[db_secrets, mgmt_secrets],
)
print(result.output)
if __name__ == "__main__":
asyncio.run(main())Security
DAuth ensures that your Supabase credentials are encrypted client-side and only decrypted inside a sealed execution boundary. Your server code, logs, and error traces never contain raw credentials.
License
MIT License - see LICENSE for details.
This server cannot be installed
Resources
Unclaimed servers have limited discoverability.
Looking for Admin?
If you are the server author, to access and configure the admin panel.
Latest Blog Posts
MCP directory API
We provide all the information about MCP servers via our MCP API.
curl -X GET 'https://glama.ai/api/mcp/v1/servers/JiayuuWang/supabase-mcp'
If you have feedback or need assistance with the MCP directory API, please join our Discord server