- Run saved questions and show their results, so your app stays consistent with the definitions your team maintains in Metabase
- Browse the databases, tables, and fields connected to Metabase
- Run custom SQL queries against a connected database
- Search questions, dashboards, and tables across the instance
Common use cases and example apps
These examples show what you can build with Metabase, each with a prompt to start from.How to connect Metabase
Who can create Metabase connections depends on your plan and workspace settings. App + chat connectors are available by default on Free, Pro, and Business plans. On Enterprise plans, they are effectively disabled at first: Who can create connections and clients defaults to No one until an admin changes it in Connectors → Admin settings → App + chat connectors. You can create multiple Metabase connections using different instances or API keys, which is useful for separating environments or giving different projects different levels of access. When the connection is created, you can link it to the projects where you want to use it. Anyone building in a project can ask Lovable in the project chat to link their project to it.Prerequisites
Before connecting Metabase, make sure you have:- A Metabase instance on version 50 or later, on Metabase Cloud or self-hosted, reachable over HTTPS on the public internet
- Admin access to that instance, or an admin who can create an API key for you
- Permission to create connections in your Lovable workspace (see Who can create connections and clients)
Your Metabase plan and the compute your queries use on connected databases are separate from Lovable billing.
Step 1: Create a Metabase API key
The connector authenticates with a Metabase API key. The key gets the permissions of the group you assign it to and of the All Users group. To create a Metabase API key:1
Open your Metabase admin settings
Sign in to your Metabase instance as an admin. Click the grid icon in the upper right and select Admin. In Metabase versions before 59, click the gear icon and select Admin settings.
2
Create a group with limited access (recommended)
Under People → Groups, click Add a group. Name it, for example,
Lovable integration. Then open Permissions. Give the group only the access your app needs:- Collections: View for the collections that hold the saved questions your app runs.
- Data: Create queries set to Query builder only for the databases your app queries. Select Query builder and native only if your app must run SQL.
3
Create the key
Go to Settings → Authentication. Under API Keys, click Manage, then click Create API Key. Enter a Key name, for example
Lovable, select the group you created under Group, and click Create.4
Copy the key
Copy the key, which starts with
mb_. Metabase shows it only once.Step 2: Connect Metabase to Lovable
Open the connection form and enter the values from Step 1.1
Open Metabase in Connectors
Open Connectors and select Metabase. For the other places to open the catalog from, see Where to find connectors.
2
Add a connection
Click Add connection and select App + chat connector. The form is split into collapsible sections, Details, Configure connection, and Sharing.
3
Name the connection
Under Details, Lovable fills in a name for the connection, which you can change. The name is only used inside Lovable to identify the connection.
4
Configure the connection
Under Configure connection, enter:
- Metabase URL: the HTTPS URL of your Metabase instance, for example
https://yourcompany.metabaseapp.com. If your self-hosted instance is served under a path prefix, include it, for examplehttps://analytics.example.com/metabase. - API key: the key from Step 1, starting with
mb_.
5
Choose who can use this connection
Under Sharing, the connection is private to you by default and shows a Private label. To share it, click Share with others. Then add workspace members by email, or click Invite entire workspace to make the connection available to everyone in your Lovable workspace. Everyone with access queries Metabase with the same API key and its group’s permissions.See Who can use connections and clients for more information.
6
Connect
Click Connect. Lovable verifies the API key against your Metabase instance before saving the connection.A successful connection does not confirm data access. After you link the connection to a project, ask Lovable to run one of your saved questions. If the question returns no data, ask your Metabase admin to check the group’s permissions.
Limitations
The Metabase connector cannot:- Embed Metabase dashboards or charts in your app. The app runs questions and queries and renders the results with its own components.
- Reach instances on a private network. Your Metabase URL must be reachable over HTTPS on the public internet.
- Support per-end-user Metabase login. Each connection represents a single API key shared across all projects linked to it.
Manage your Metabase connection
Connections are managed from Connectors: select Metabase, then open the connection.- Unlink projects to remove Metabase access from specific projects while keeping the connection available for others. See Unlink projects from a connection for the steps.
- Delete the connection to remove it from the workspace entirely. Deleting is permanent. It removes the credentials from all linked projects, and app features that use Metabase stop working until a new connection is added. See Delete a connection for the steps and who can delete.