Supabase is open-source Firebase: Postgres, edge functions, storage, and auth in one platform. Connecting Supabase to clariBI brings your database schema and read-only queries into your AI analyses.
Why connect Supabase
Production data sits in Postgres but querying it usually requires SQL chops. clariBI through Supabase lets you ask questions in natural language and get safe SELECT-based answers.
Ask "How many users signed up last month?", "Average order size by region?", or "List the top 10 customers by lifetime spend?" and the AI engine writes and executes safe SQL.
How the connection works
clariBI talks to Supabase through its hosted MCP server at https://mcp.supabase.com/mcp. Authentication uses an OAuth flow that clariBI registers itself for (no developer console setup on your side). Tokens stay encrypted server-side and never leave clariBI in clear form.
sequenceDiagram
actor U as You
participant C as clariBI
participant V as Supabase
U->>C: Click Authorize with Supabase
C->>V: Open OAuth authorization
V-->>U: Grant read access?
U->>V: Approve
V-->>C: Authorization code
C->>V: Exchange code for tokens
V-->>C: Access + refresh tokens
C->>C: Encrypt and store credentials
C-->>U: Connection ready
Available tools
The AI engine selects from these read-only Supabase tools during analyses. None of them modify data in Supabase.
| Tool | Returns | Example question |
|---|---|---|
list_projects | Supabase projects in your org. | List Supabase projects. |
get_project | A project with config. | Show me project p_001. |
get_project_url | Project endpoint URLs. | API URL for this project? |
get_publishable_keys | Publishable anon/service keys for the project. | What anon key does this project use? |
list_organizations | Organizations the user belongs to. | Which Supabase orgs am I in? |
get_organization | A single organization. | Show me the main org. |
list_tables | Tables in a project Postgres. | What tables are in this project? |
list_extensions | Postgres extensions installed. | What extensions are enabled? |
list_migrations | Migrations applied to the project DB. | List schema migrations. |
get_logs | Project logs. | Recent logs from this project. |
get_advisors | Project advisor warnings (security, performance). | Any security advisors flagged? |
generate_typescript_types | TypeScript type definitions for the project DB schema. | Generate types for our schema. |
list_edge_functions | Deployed edge functions. | Which edge functions are deployed? |
get_edge_function | A single edge function. | Show me the user-signup function. |
list_branches | Database branches. | List Supabase branches. |
list_storage_buckets | Storage buckets. | Storage buckets in this project? |
get_storage_config | Storage configuration. | Storage settings for the project. |
get_cost | Cost estimates for resources. | How much will a new project cost? |
search_docs | Supabase documentation search. | How do I configure RLS? |
Data flow during analysis
When you ask a question that maps to Supabase, the AI engine routes to the right tool, reads the result, and pairs the answer with a chart you can pin to a dashboard.
sequenceDiagram
actor U as You
participant C as clariBI
participant AI as AI engine
participant V as Supabase
U->>C: Ask a question about application database
C->>AI: Plan the analysis
AI->>V: Call the right tool
V-->>AI: Tool result
AI->>AI: Summarize and chart
C-->>U: Answer plus visual
Setting up the connection
- Open Data Sources in the clariBI sidebar.
- Click Add data source.
- Open the MCP Servers tab.
- Click the Supabase card.
- Click Authorize with Supabase.
- Sign in to Supabase in the popup window and grant the requested read scopes.
- Back in clariBI, give your data source a name.
- Click Finish.
Permissions and data access
clariBI requests read access to projects and the database (SELECT only). No data can be inserted, updated, deleted, and no schema can be modified. Disconnect from Supabase account settings or from clariBI Settings.
Troubleshooting
| Error | Cause | Fix |
|---|---|---|
| "Project paused" | Free-tier Supabase projects auto-pause after inactivity. | Wake the project in your Supabase dashboard, then reconnect. |