clr-supabase-mcp
MCP server for self-hosted Supabase instances with multi-instance support.
Features
- Schema introspection, SQL execution, migrations
- Auth user management (GoTrue)
- Storage bucket/object management
- Edge function management
- Multi-instance support via credentials.json
- Module-based tool loading (
--modulesflag) - Read-only mode
Installation
pip install clr-supabase-mcp
Configuration
Step 1: Create the credentials directory
mkdir -p ~/.config/supabase
Step 2: Find your Supabase credentials
You need three values from your self-hosted Supabase deployment:
1. Supabase URL — The public Kong gateway URL for your instance. This is the URL you use to access the Supabase API (e.g. https://supabase.example.com). If you're running Supabase locally via Docker, this is typically http://localhost:8000.
2. Service Role Key — The service_role JWT key that grants admin access. Find it in your Supabase .env file:
# In your Supabase deployment directory:
grep SERVICE_ROLE_KEY .env
# or look for the value of SUPABASE_SERVICE_ROLE_KEY
This key looks like eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9... (a long JWT token).
3. Database URL — Direct PostgreSQL connection string. Build it from values in your Supabase .env file:
postgresql://postgres:YOUR_POSTGRES_PASSWORD@YOUR_DB_HOST:5432/postgres
Find the password:
grep POSTGRES_PASSWORD .env
The DB host depends on your setup:
- Docker on same machine:
localhost(or the mapped port, checkdocker compose ps) - Remote server: The hostname/IP of your database server
- Docker network name:
db(if connecting from within the same Docker network)
Step 3: Create credentials.json
Single instance:
cat > ~/.config/supabase/credentials.json << 'EOF'
{
"url": "https://supabase.example.com",
"service_key": "eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9...",
"db_url": "postgresql://postgres:your-db-password@db-host:5432/postgres"
}
EOF
chmod 600 ~/.config/supabase/credentials.json
Multiple instances:
cat > ~/.config/supabase/credentials.json << 'EOF'
{
"instances": {
"prod": {
"url": "https://supabase-prod.example.com",
"service_key": "eyJ...-prod-key",
"db_url": "postgresql://postgres:prodpass@prod-db:5432/postgres"
},
"dev": {
"url": "https://supabase-dev.example.com",
"service_key": "eyJ...-dev-key",
"db_url": "postgresql://postgres:devpass@dev-db:5432/postgres"
}
},
"default": "prod"
}
EOF
chmod 600 ~/.config/supabase/credentials.json
Credential fields
| Field | Required | Description |
|---|---|---|
url |
Yes | Supabase Kong gateway URL |
service_key |
Yes | Service role JWT (admin access for auth/storage/edge tools) |
db_url |
For SQL/schema tools | Direct PostgreSQL connection URL |
anon_key |
No | Anon key (not needed when service_key is set) |
Note: db_url is only required for schema introspection and SQL tools (core and sql modules). Auth, storage, and edge modules only need url and service_key.
Environment variable fallback
If no credentials file exists, the server falls back to environment variables:
export SUPABASE_URL="https://supabase.example.com"
export SUPABASE_SERVICE_KEY="eyJ..."
export SUPABASE_DB_URL="postgresql://postgres:pass@db-host:5432/postgres"
Usage
All modules (default)
clr-supabase-mcp
Specific modules
# Schema introspection only
clr-supabase-mcp --modules core
# SQL + auth
clr-supabase-mcp --modules sql,auth
Available modules: core, sql, auth, storage, edge
Read-only mode
Disable write operations (SQL execution, migrations, user creation, etc.):
export SUPABASE_READ_ONLY=true
clr-supabase-mcp
Modules
| Module | Tools | API | Requires |
|---|---|---|---|
| core | 19 | Direct Postgres | db_url |
| sql | 13 | Direct Postgres | db_url |
| auth | 5 | GoTrue REST /auth/v1/ |
url + service_key |
| storage | 4 | Storage REST /storage/v1/ |
url + service_key |
| edge | 5 | Functions REST /functions/v1/ |
url + service_key |
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file clr_supabase_mcp-1.0.0.tar.gz.
File metadata
- Download URL: clr_supabase_mcp-1.0.0.tar.gz
- Upload date:
- Size: 15.0 kB
- Tags: Source
- Uploaded using Trusted Publishing? Yes
- Uploaded via:
twine/7.0.0 CPython/3.13.14
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
05b465a8a3e565211cc61e050f4a3a18625c1a330653dea2c6961856e63037b2
|
|
| MD5 |
5cfee0e7784f3bdbd1c8ca1d281140a7
|
|
| BLAKE2b-256 |
fca05b1bdac8c19ddeeb4ff78fa2989e3d4d8826a52e34e6272e659aa0e75f80
|
Provenance
The following attestation bundles were made for clr_supabase_mcp-1.0.0.tar.gz:
Publisher:
publish.yml on clearminds/clr-supabase-mcp
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
clr_supabase_mcp-1.0.0.tar.gz -
Subject digest:
05b465a8a3e565211cc61e050f4a3a18625c1a330653dea2c6961856e63037b2 - Sigstore transparency entry: 2407903019
- Sigstore integration time:
-
Permalink:
clearminds/clr-supabase-mcp@0a01a91624a4bea9254f45d32d03bab19d455d43 -
Branch / Tag:
refs/tags/v1.0.0 - Owner: https://github.com/clearminds
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
publish.yml@0a01a91624a4bea9254f45d32d03bab19d455d43 -
Trigger Event:
push
-
Statement type:
File details
Details for the file clr_supabase_mcp-1.0.0-py3-none-any.whl.
File metadata
- Download URL: clr_supabase_mcp-1.0.0-py3-none-any.whl
- Upload date:
- Size: 19.1 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? Yes
- Uploaded via:
twine/7.0.0 CPython/3.13.14
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
aed90e8d4a9a746df159989b6a326c78024fef5ef2e3d334db96a8cb5b1d59d6
|
|
| MD5 |
6a5cd02938a1ee50585b03f12c73ec54
|
|
| BLAKE2b-256 |
b56c56fbe3714e09b7a9c1ff202b84dca31d5bc821e41a254f662f33864524eb
|
Provenance
The following attestation bundles were made for clr_supabase_mcp-1.0.0-py3-none-any.whl:
Publisher:
publish.yml on clearminds/clr-supabase-mcp
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
clr_supabase_mcp-1.0.0-py3-none-any.whl -
Subject digest:
aed90e8d4a9a746df159989b6a326c78024fef5ef2e3d334db96a8cb5b1d59d6 - Sigstore transparency entry: 2407903446
- Sigstore integration time:
-
Permalink:
clearminds/clr-supabase-mcp@0a01a91624a4bea9254f45d32d03bab19d455d43 -
Branch / Tag:
refs/tags/v1.0.0 - Owner: https://github.com/clearminds
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
publish.yml@0a01a91624a4bea9254f45d32d03bab19d455d43 -
Trigger Event:
push
-
Statement type: