At a glance
- Availability: Experimental (how to enable).
- Auth: API key.
- Connection: The key from
METABASE_API_KEYis sent as thex-api-keyheader. - Docs: https://www.metabase.com/docs/latest/people-and-groups/api-keys
Credentials
Set these per environment. See Connect an integration.| Variable | Required | Description |
|---|---|---|
METABASE_API_KEY | Yes | Metabase API key (created in Admin settings > Authentication > API keys) Docs. |
Setup
- Locate your Metabase instance: Note your instance hostname, e.g. acme.metabaseapp.com (Metabase Cloud) or your self-hosted domain. Every tool takes it as the required ‘host’ parameter. For local testing you can run Metabase with ‘docker run -p 3000:3000 metabase/metabase’.
- Create an API key: As an admin, go to Admin settings > Authentication > API keys, create a key, and assign it to a group whose permissions cover the databases and collections you need. Copy the key (shown once, prefixed mb_).
- Set the environment variable: Add the key to your .env as METABASE_API_KEY=mb_…
- Verify access: Run List Databases with your hostname as the host parameter.
- Metabase authenticates with an ‘x-api-key’ header
- Metabase is self-hosted or tenant-hosted, so tools require a ‘host’ parameter (hostname only, HTTPS is assumed) on every call
- The API key inherits the permissions of the group it is assigned to
Tools
| Tool | Access | Description |
|---|---|---|
| List Databases | Read | List databases connected to the Metabase instance |
| List Questions | Read | List saved questions (cards) on the Metabase instance |
| Run Question Query | Read | Execute a saved question (card) and return its query results |
| Search | Read | Search questions, dashboards, collections, and tables across the instance |
| Get Dashboard | Read | Get a dashboard and its cards by ID |
| List Collections | Read | List collections that organize questions and dashboards |
Example prompts
- Search my Metabase instance for questions about a topic and run the most relevant one.
- Get one of my Metabase dashboards and summarize what each card shows.