Skip to main content

Metabase

Lets agents run saved questions and queries, read dashboards and collections, and manage content in Metabase.

Connect it with: API key. Metabase's own documentation: https://www.metabase.com/docs/latest/people-and-groups/api-keys.

What agents can do​

Connect Metabase so the agents working your tasks can reach it. With it connected, they can:

  • Run saved questions and ad-hoc native SQL or MBQL queries and read the results.
  • List and read dashboards, collections and questions, and create or update them.
  • Read database metadata: tables, fields and their types, to write correct queries.
  • Trigger a database schema sync or a field-values rescan after a schema change.

Before you start​

  • Metabase version 49 or later (Cloud or self-hosted), reachable over https.
  • A Metabase admin, who creates the key: grid icon (top right) > Admin > Settings > Authentication > API Keys.
  • A group for the key with the data and collection permissions agents should have. A key in the Administrators group can do everything.
  • A Jaah account. Anyone can add a personal secret; an organization secret needs an Org Owner or Admin.

Connect with Metabase​

Jaah connects to Metabase with an API key, not with a sign-in button.

Connect with an API key​

Find each value first:

  • Instance URL: The address you open Metabase at, such as https://yourcompany.metabaseapp.com for Metabase Cloud or your own server's https address.
  • API key: Metabase > grid icon (top right) > Admin > Settings > Authentication > API Keys > Manage > Create API Key; pick a group for it, then copy the key, which is shown only once.

Then add it to Jaah:

  1. In Jaah, open Secrets, select New, and pick the Metabase card.
  2. Name the secret and choose who can use it.
  3. Fill in Instance URL, API key.
  4. Select Save. Jaah tests the secret straight away (see Test the connection).

Jaah encrypts what you type and never shows it again — not to you, and not to an admin.

Use your own OAuth app​

Not used: Jaah connects to Metabase with an API key, not through an OAuth app.

Test the connection​

Select Test on the secret. Jaah calls Metabase's API once (GET <Instance URL>/api/database) with the stored values, and shows whether Metabase accepted it, or which value Metabase refused and the status it answered. Jaah also tests automatically when you save or reconnect.

The last result and its time stay on the secret's page, so you can see whether it still works without testing again.

Who can use it​

Every secret has an owner, and the owner decides who can use it:

  • Personal — only your own tasks can use it. This is the default.
  • Organization — every task in the organization can use it. Only Org Owners and Admins can choose this.
  • Attached to a project — every task on that project can use it, whoever started the task. See Attach a secret to a project.

More on owners and access: How secrets work.

Use it in an agent session​

An agent asks for the secret with its credential_get tool, by the secret's path, when it needs it, and gets the values for that one call. The path is the owner's prefix and the secret's name:

  • org/<name> for an organization secret,
  • projects/<project>/<name> for one attached to a project,
  • me/<name> for your personal one.

A key connection hands the agent its fields: base_url, api_key.

Tell the agent in your task description which secret to use, for example “use the Metabase secret org/metabase”.

Manage, rotate or disconnect​

Everything is on the secret's page under Secrets:

  • Rotate a key: create a new key at the vendor first, then select Replace on the secret and paste it. Revoke the old key at Metabase once the test passes. Steps: Replace or delete a secret.
  • Disconnect: select Delete. The stored values are destroyed and agents lose access on their next call. To end access at Metabase's side too, revoke or delete the key at Metabase.

Limitations​

  • An API key acts with its group's permissions; agents cannot see databases or collections that group cannot.
  • A Metabase server reachable only on a private network cannot be tested or used from Jaah.
  • Metabase shows the key only once; if it is lost, regenerate it and replace it in Jaah.
  • Agents can do only what the connected Metabase account allows.

Troubleshooting​

Test says Metabase rejected the API key (401)

The key is wrong or was regenerated. Create a new key in Admin > Settings > Authentication > API Keys, select Replace on the secret, and paste it.

Test says Metabase returned HTTP 404

The Instance URL is not Metabase's root, or the version is older than 49, which has no API keys. Use the address you open Metabase at, with no path after it.

The Test passes but agents see no databases

The key's group has no data permissions. In Admin > Permissions > Data, give the group View data and Create queries on the databases agents should use.

Still stuck? Select Test and read the result: it names the value Metabase refused and the status it answered.

FAQ​

Can I use my user name and password instead?

Jaah connects Metabase with an API key only: a key is not tied to a person, cannot sign in to the web app, and can be revoked on its own.

Does it work with Metabase Cloud?

Yes. Use your https://yourcompany.metabaseapp.com address as the Instance URL.

Can Jaah or an admin see the key or token?

No. Jaah stores it encrypted and never shows it again. Only the tasks allowed to use the secret receive it, at the moment they ask for it.

Can I connect more than one Metabase account?

Yes. Add one secret per account, each with its own name, and tell the agent which one to use.