Skip to main content

At a glance

Credentials

Set these per environment. See Connect an integration.
VariableRequiredDescription
METABASE_API_KEYYesMetabase API key (created in Admin settings > Authentication > API keys) Docs.

Setup

  1. 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’.
  2. 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_).
  3. Set the environment variable: Add the key to your .env as METABASE_API_KEY=mb_…
  4. 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
Provider API reference: https://www.metabase.com/docs/latest/api

Tools

ToolAccessDescription
List DatabasesReadList databases connected to the Metabase instance
List QuestionsReadList saved questions (cards) on the Metabase instance
Run Question QueryReadExecute a saved question (card) and return its query results
SearchReadSearch questions, dashboards, collections, and tables across the instance
Get DashboardReadGet a dashboard and its cards by ID
List CollectionsReadList 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.