metabase-mcp-server
Server Configuration
Describes the environment variables required to run the server.
| Name | Required | Description | Default |
|---|---|---|---|
| METABASE_URL | Yes | Your Metabase instance URL (do not include /api) | |
| METABASE_API_KEY | Yes | Your Metabase API key | |
| METABASE_EXPORT_DIR | No | Where export_dataset writes CSV/JSON files | ~/Downloads/ |
Instructions
Guidance the server publishes about itself, which clients place ahead of the tool catalog so the model reads it before choosing anything.
This server publishes no instructions, or was last inspected before Glama recorded them.
Capabilities
Features and capabilities supported by this server
Protocol revision2025-11-25
| Capability | Details |
|---|---|
| tools | {
"listChanged": true
} |
Tools
Functions exposed to the LLM to take actions
| Name | Description |
|---|---|
| list_databasesA | List all databases connected to Metabase with their ID, name, and engine type. |
| list_tablesA | List all tables in a database. Returns table ID, name, and schema. |
| get_table_fieldsA | Get field IDs, names, and types for a table. You MUST call this before building query_dataset calls — field IDs are required for filters and aggregations. |
| preview_tableA | Return a small sample of rows from a table to understand its data shape. Useful for inspecting JSON column structures or understanding field formats before writing queries. |
| searchA | Search across questions, dashboards, and tables by keyword. |
| query_datasetA | Run an MBQL query against a Metabase database. Metabase enforces a hard server-side cap of 2000 rows — use aggregations to work around this. If is_truncated is true and you need more rows, call again with offset: 2000, then 4000, etc. Only do this for small result sets (<10K rows). For larger exports, use export_dataset instead. For time comparisons (WoW, MoM, trends), use a single query with a date breakout instead of multiple queries. MBQL examples: aggregation: [["count"]] or [["sum", ["field", 87, null]]]. filter: ["=", ["field", 10, null], "active"]. breakout: [["field", 42, {"temporal-unit": "month"}]]. |
| run_native_queryA | Run a native SQL query against a Metabase database. Requires that your API key has native query (SQL) permission in Metabase. IMPORTANT: You must include a LIMIT clause in your SQL to avoid large result sets. Write operations (INSERT, UPDATE, DELETE, DROP, etc.) and multi-statement queries are rejected. The server strips SQL comments before validation. |
| run_saved_questionB | Execute a saved question (card) by ID. Works for both MBQL and native SQL cards. |
| get_card_metadataA | Get a saved question's definition (query type, database, SQL/MBQL) without executing it. |
| list_saved_questionsA | List all saved questions/cards, optionally filtered by database. |
| list_dashboardsA | List all dashboards. |
| get_dashboardA | Get a dashboard's cards and layout. |
| cross_db_overlapA | Compare a field across two databases to find overlapping values (e.g. find which email addresses exist in both your CRM and marketing databases). Handles cross-DB join limitations by fetching both sets and computing intersection in memory. Caps at 500K rows per side — add filters for larger tables. Supports cancellation. |
| export_datasetA | Export full row-level data to a local CSV or JSON file. Auto-paginates through the 2000-row Metabase cap internally. The file path is returned in the response. Use this when you need complete data for external analysis (Excel, Google Sheets). For analytical queries, use query_dataset with aggregations instead. Caps at 500K rows — add filters for larger tables. Output directory is configurable via METABASE_EXPORT_DIR env var (defaults to ~/Downloads/). |
Prompts
Interactive templates invoked by user choice
| Name | Description |
|---|---|
No prompts | |
Resources
Contextual data attached and managed by the client
| Name | Description |
|---|---|
No resources | |
TDQS
Scored across 14 tools
Each tool has a clearly distinct purpose: list/get for metadata, query/run for execution, and specialized tools for cross-db and export. The overlap between query_dataset and run_native_query is clearly separated by MBQL vs SQL. No ambiguity.
Most tools follow a verb_noun pattern (list_*, get_*, run_*), with consistent use of list for collections and get for single items. The exception is 'cross_db_overlap', which is a noun phrase rather than a verb-led name, creating a minor deviation.
With 14 tools, the server is well-scoped for Metabase data exploration and querying. Each tool serves a distinct need, and the count is within the ideal range for a focused MCP server.
The toolset covers the full data exploration lifecycle: discovering databases, tables, fields, previewing data, running queries, and exporting results. It also includes saved questions, dashboards, and cross-database overlap, but lacks write operations like creating or updating cards/dashboards, which are not the primary focus.