Appearance
Supabase Connector
The Supabase connector integrates with your Supabase project using the Management API and service role key, providing 10 live tools for database tables, authentication, storage, and RPC functions.
Authentication
Provide your Supabase project URL and service role key:
json
{
"name": "Production Supabase",
"source_type": "supabase",
"config": {
"project_url": "https://abcdefghijklmnop.supabase.co",
"service_role_key": "eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9...",
"project_ref": "abcdefghijklmnop"
}
}Finding Your Credentials
- Go to your Supabase dashboard at app.supabase.com
- Select your project
- Navigate to Settings > API
- Copy the Project URL and service_role key (under "Project API keys")
WARNING
The service_role key bypasses Row Level Security (RLS). Never expose it in client-side code. Agentcy stores it encrypted and uses it only for server-side API calls.
Live Tools (10)
| Tool | Description | Arguments |
|---|---|---|
supabase_list_tables | List all tables with row counts and column info | schema? |
supabase_describe_table | Get columns, types, constraints, and RLS policies for a table | table, schema? |
supabase_query_table | Execute a read-only SQL query via the Supabase SQL editor API | query, limit? |
supabase_list_auth_users | List auth users with metadata, providers, and last sign-in | page?, per_page? |
supabase_insert_row | Insert a row into a table | table, data, schema? |
supabase_update_rows | Update rows in a table matching a filter | table, filter, data, schema? |
supabase_delete_rows | Delete rows from a table matching a filter | table, filter, schema? |
supabase_list_storage_buckets | List storage buckets with size, public flag, and file limits | -- |
supabase_list_functions | List Edge Functions with status and deployment info | -- |
supabase_call_rpc | Call a database RPC function | function_name, params? |
Example: Agent Using Supabase Tools
User: "How many users signed up in the last 7 days and what providers are they using?"
Agent: Let me check the auth users.
→ Calls supabase_list_auth_users(per_page: 100)
→ Filters for users created in the last 7 days
→ Reports: "42 new users in the last 7 days:
- 28 via email/password
- 11 via Google OAuth
- 3 via GitHub OAuth
Highest signup day was Tuesday with 12 signups."ETL Ingestion
Nodes Created
| Node Label | Properties | Source |
|---|---|---|
SupabaseTable | name, schema, row_count, rls_enabled, column_count | Tables API |
SupabaseColumn | name, data_type, nullable, default_value, is_primary_key | Tables API |
SupabaseBucket | name, public, file_size_limit, allowed_mime_types, created_at | Storage API |
SupabaseUser | id, email, provider, confirmed_at, last_sign_in, role | Auth API |
SupabaseFunction | name, slug, status, version, created_at, updated_at | Functions API |
RLSPolicy | name, table, command, definition, check_expression | Tables API |
Relationships Created
| Relationship | From | To |
|---|---|---|
HAS_COLUMN | SupabaseTable | SupabaseColumn |
HAS_POLICY | SupabaseTable | RLSPolicy |
REFERENCES | SupabaseTable | SupabaseTable (foreign keys) |
UPLOADS_TO | SupabaseUser | SupabaseBucket |
INVOKES | SupabaseFunction | SupabaseTable |
Graph Queries
cypher
-- Find tables without RLS policies
MATCH (t:SupabaseTable)
WHERE t.rls_enabled = false
RETURN t.name, t.row_count
-- Map foreign key relationships
MATCH (t1:SupabaseTable)-[:REFERENCES]->(t2:SupabaseTable)
RETURN t1.name, t2.name
-- Find users by auth provider
MATCH (u:SupabaseUser)
RETURN u.provider, count(u) AS user_count
ORDER BY user_count DESCConfiguration Reference
| Field | Type | Default | Description |
|---|---|---|---|
project_url | string | required | Supabase project URL |
service_role_key | string | required | Service role API key |
project_ref | string | -- | Project reference ID (for Management API) |
schema | string | public | Schema to scope tools and ingestion to |
sync_tables | bool | true | Include tables and columns |
sync_auth | bool | true | Include auth users |
sync_storage | bool | true | Include storage buckets |
sync_functions | bool | true | Include Edge Functions |
sync_rls | bool | true | Include RLS policies |
max_query_rows | int | 1000 | Maximum rows returned by supabase_query_table |
query_timeout_secs | int | 30 | Query execution timeout |
Troubleshooting
| Error | Cause | Fix |
|---|---|---|
401 Unauthorized | Invalid service role key | Verify the key in project settings |
403 Forbidden | Key type is anon not service_role | Use the service_role key, not the anon key |
404 Project not found | Incorrect project URL | Verify the project URL in your dashboard |
Connection refused | Project is paused | Resume the project from the Supabase dashboard |
Rate limited | Too many API requests | Upgrade your Supabase plan or reduce sync frequency |