Connector guide8-minute read30 MCP tools7 languages

Metabase to MCP: Saved Questions, Dashboards, SQL and MBQL Queries and Collections in any AI Agent

Work with Metabase, self-hosted or Metabase Cloud, from any AI agent: search and run saved questions and dashboard cards, run SQL or MBQL queries, read database, table and field metadata, browse collections, and create or update questions, dashboards and collections. API key with the permissions of one Metabase group.

HCBy HelpCode teamUpdated 8 min read Open-source on GitHub

No credit card · 7-day trial · Self-host alternative available

Metabase

Metabase

Metabase BI: search and run saved questions and dashboard cards, run SQL or MBQL queries, read database, table and field metadata, browse collections, and create or update questions, dashboards and collections.

tools

30

Region

INTL

Category

Analytics

Authentication

API Key

Required env vars

METABASE_URLMETABASE_API_KEY
Install in one click on Cloud

7-day free trial · No credit card

  • 7-day free trial
    No credit card required
  • GDPR & SOC 2 ready
    EU data residency, audit logs
  • Open-source on GitHub
    Open source · AGPL-3.0
  • Works with ChatGPT, Claude, Gemini
    Any MCP-compatible client

Skip the install. Get this working in under 2 minutes.

Start a free trial on cloud.anythingmcp.com, add the Metabase in one click, then point your AI client (Claude, ChatGPT, Copilot or Cursor) at the generated MCP endpoint. No Docker, no git clone, zero engineering experience required.

Start free trial

Summary

Work with Metabase, self-hosted or Metabase Cloud, from any AI agent: search and run saved questions and dashboard cards, run SQL or MBQL queries, read database, table and field metadata, browse collections, and create or update questions, dashboards and collections. API key with the permissions of one Metabase group.

Try asking

Example prompts for Metabase

Click any prompt to copy it. Paste into Claude, ChatGPT, Cursor, Gemini, Copilot or OpenClaw to run it against this connector.

Metabase · live via MCP
Share
Opus 4.7

Claude is AI and can make mistakes. Please double-check responses.

💡 No install? Use cloud.anythingmcp.com directly. Sign in, click Connectors → Metabase, paste your credentials, mint an MCP API key and you're done. No Docker, no git clone, no local server.

Metabase

Work with Metabase, self-hosted or Metabase Cloud, from any AI agent: search and run saved questions and dashboard cards, run SQL or MBQL queries, read database, table and field metadata, browse collections, and create or update questions, dashboards and collections. API key with the permissions of one Metabase group.

Setup

Setting up takes about 3 minutes. You need a Metabase instance (self-hosted or Metabase Cloud) and an admin who can create an API key.

  1. Put the address you open Metabase at into METABASE_URL, for example https://metabase.example.com or https://yourcompany.metabaseapp.com, without /api and without a trailing slash.
  2. As an admin open Admin settings, Settings, Authentication, API keys, click Create API key, give it a name and a group. The key acts with that group's permissions: view access to the collections and query access to the databases you want is enough for reading; creating and changing content needs curate access. Admin-only reads such as metabase_list_users need the Administrators group.
  3. Copy the key (it is shown once) into METABASE_API_KEY. It is sent in the x-api-key header.
  4. Install the connector and run metabase_get_current_user: it shows the account the key acts as and confirms address and key.

What it reads: content through metabase_search (questions, models, metrics, dashboards, collections, tables, databases, segments, optionally the SQL text of native questions or the trash), collections and their items, saved questions, models and metrics with the query behind them, dashboards with tabs, filters and cards, and the recent and most popular items. Databases connected to Metabase with schemas, tables and fields (connection details are left out), and the cached values of category fields for filters. People and permission groups.

What it runs: metabase_run_card runs a saved question or model, with parameters for its filters; metabase_run_dashboard_card runs one card of a dashboard with the dashboard's filter values. metabase_run_native_query runs SQL in the database's own dialect, with {{name}} variables through template_tags and parameters; metabase_run_query runs an MBQL query built from table and field ids. Nothing is saved. The AI answers with saved questions first and writes ad hoc queries when nothing fits.

What it writes: metabase_create_card saves a new question, model or metric in a collection or inside a dashboard, metabase_update_card changes one, metabase_create_dashboard creates an empty dashboard and metabase_update_dashboard changes name, filters, tabs or cards. Its dashcards list replaces all cards, so the AI reads the dashboard first, keeps the existing cards with their ids and adds new ones with a negative id on the 24-column grid. metabase_create_collection and metabase_update_collection create, rename and move collections.

Switched off at install: nothing; every tool is on. There are no delete tools: archiving a question, dashboard or collection through the update tools moves it to the trash, where it can be restored with archived false.

Data formats: query results come as data.cols (name, display_name, base_type such as type/Integer or type/DateTime) and data.rows (arrays in column order), with row_count. Dates are ISO 8601 in the instance's report time zone. Ids of databases, tables, fields, questions and dashboards are integers; the top collection is root. A card's type is question, model or metric; in search and collection items a model shows as dataset.

Paging: metabase_search, metabase_list_collection_items and metabase_list_users take limit and offset and return total. The other lists return everything at once. metabase_get_database_metadata can be large for big databases; metabase_list_schema_tables and metabase_get_table_metadata are lighter.

Limits: query tools return at most 2,000 rows, the API's limit for ad hoc results, so the AI aggregates or filters in the query instead of paging through raw rows. A native query runs with the database connection Metabase uses: for databases that must never change, give Metabase a read-only database user.

Common errors: a query that fails comes back with status: failed and the database's message in error, reported as a failed call. 401 means a wrong or deleted key. 403 means the key's group lacks the permission (data access, curate or admin). 404 is a wrong id, or an address without /api routes: check METABASE_URL.

The connector does not delete content permanently, does not change users, groups or permissions, and does not add or edit database connections.

Prerequisites: METABASE_URL, METABASE_API_KEY

Install the connector locally

curl -fsSL https://raw.githubusercontent.com/HelpCode-ai/anythingmcp/main/docker-compose.quickstart.yml -o docker-compose.yml
printf 'JWT_SECRET=%s\nENCRYPTION_KEY=%s\n' "$(openssl rand -hex 32)" "$(openssl rand -hex 32)" > .env
docker compose up -d

Open http://localhost:3000/connectors/store, pick Metabase and paste in the env vars listed under Prerequisites.

Available tools

ToolWhat it does
metabase_get_current_userThe account the API key acts as: id, name, e-mail, whether it is an admin, and its group memberships
metabase_list_usersPeople in Metabase (admin only): id, name, e-mail, active state, groups, last login
metabase_list_permission_groupsPermission groups (All Users, Administrators and custom groups) with their member count
metabase_list_databasesDatabases connected to Metabase: id, name, engine (postgres, bigquery-cloud-sdk, snowflake, ...), sync state. include=tables also lists…
metabase_get_databaseOne database: name, engine, time zone, sync schedule and, with include=tables, its tables
metabase_get_database_metadataFull metadata of a database: every table with its fields (id, name, display name, base and semantic type, foreign key target)
metabase_list_database_schemasSchema names of one database (for example public or analytics), for metabase_list_schema_tables
metabase_list_schema_tablesTables of one schema of a database: id, name, display name, description, entity type, row count estimate
metabase_get_table_metadataA table with its fields (id, name, display name, base type, semantic type such as type/PK, type/FK, type/Category, foreign key targets)…
metabase_get_field_valuesDistinct values Metabase has cached for a category field (up to 1000), useful for filter values
metabase_list_cardsSaved questions, models and metrics: id, name, type (question, model, metric), display, collection, description, the query behind it…
metabase_get_cardOne saved question, model or metric: name, description, collection, display, the query (dataset_query: native SQL or MBQL), parameters and…
metabase_run_cardRun a saved question (or model) and return its result: data.cols (column names and types), data.rows (rows as arrays), row_count
metabase_list_dashboardsDashboards: id, name, description, collection, creator and last edit
metabase_get_dashboardOne dashboard with its tabs, filters (parameters) and cards (dashcards): each dashcard has its id, card_id, the card, position and…
metabase_run_dashboard_cardRun one card of a dashboard with the dashboard's filter values and return its result rows (data.cols, data.rows)
metabase_list_collectionsCollections (folders for questions, models and dashboards): id, name, location (path of parent ids), personal owner, archived flag
metabase_get_collectionOne collection: name, description, location, authority level (official), personal owner
metabase_list_collection_itemsWhat a collection contains: questions (card), models (dataset), metrics, dashboards, sub-collections, with id, name, model, description and…
metabase_searchSearch Metabase content by name and description: questions (card), models (dataset), metrics, dashboards, collections, tables, databases…
metabase_run_native_queryRun a SQL (native) query on a connected database without saving it, with the permissions of the API key's group
metabase_run_queryRun any dataset query without saving it: an MBQL query built from table and field ids ({"database": 1, "type": "query", "query"…
metabase_get_recent_itemsItems the API key's account recently viewed (views) or picked in the data picker (selections): questions, dashboards, tables, collections…
metabase_get_popular_itemsThe most viewed dashboards, questions and tables of the instance, for "what do people use most"
metabase_create_cardSave a new question, model or metric in a collection. dataset_query is the query (native SQL or MBQL, as in metabase_run_query); display is…
metabase_update_cardChange a saved question: name, description, query, chart type and settings, collection, or archive it (archived true moves it to the trash…
metabase_create_dashboardCreate an empty dashboard in a collection
metabase_update_dashboardChange a dashboard: name, description, collection, filters, tabs, archive state, or its cards. dashcards REPLACES the whole card list: read…
metabase_create_collectionCreate a collection (folder), optionally inside another one
metabase_update_collectionRename a collection, change its description, move it under another parent, or archive it (archived true moves it and its content to the…

Example prompts

  • "Find the saved question about monthly revenue and run it for the last 12 months."
  • "Which dashboards are viewed most in our Metabase? List them with their collection."
  • "Run the cards of the Sales overview dashboard with the region filter set to EMEA and summarise the numbers."
  • "Write a SQL query on the orders table that counts orders per country this year, and show me the result."
  • "Save the query you just ran as a bar chart question in the Marketing collection."

Next steps

Was this guide helpful?

Your Metabase agent is one click away.

Install the connector, paste the key, prompt your AI client. Free for 7 days, no credit card.

Related guides

Connectors

How to Connect Metabase to ChatGPT via MCP

Work with Metabase, self-hosted or Metabase Cloud, from any AI agent: search and run saved questions and dashboard cards, run SQL or MBQL queries, read database, table and field metadata, browse collections, and create or update questions, dashboards and collections. API key with the permissions of one Metabase group.

Connectors

How to Connect Metabase to Claude via MCP

Work with Metabase, self-hosted or Metabase Cloud, from any AI agent: search and run saved questions and dashboard cards, run SQL or MBQL queries, read database, table and field metadata, browse collections, and create or update questions, dashboards and collections. API key with the permissions of one Metabase group.

Connectors

How to Connect Metabase to Cursor via MCP

Work with Metabase, self-hosted or Metabase Cloud, from any AI agent: search and run saved questions and dashboard cards, run SQL or MBQL queries, read database, table and field metadata, browse collections, and create or update questions, dashboards and collections. API key with the permissions of one Metabase group.

Connectors

How to Connect Metabase to Gemini via MCP

Work with Metabase, self-hosted or Metabase Cloud, from any AI agent: search and run saved questions and dashboard cards, run SQL or MBQL queries, read database, table and field metadata, browse collections, and create or update questions, dashboards and collections. API key with the permissions of one Metabase group.

Connectors

How to Connect Metabase to Meta Muse via MCP

Work with Metabase, self-hosted or Metabase Cloud, from any AI agent: search and run saved questions and dashboard cards, run SQL or MBQL queries, read database, table and field metadata, browse collections, and create or update questions, dashboards and collections. API key with the permissions of one Metabase group.

Connectors

How to Connect Metabase to Microsoft Copilot via MCP

Work with Metabase, self-hosted or Metabase Cloud, from any AI agent: search and run saved questions and dashboard cards, run SQL or MBQL queries, read database, table and field metadata, browse collections, and create or update questions, dashboards and collections. API key with the permissions of one Metabase group.