MCP server for Metabase — read-only querying of databases via the Model Context Protocol
Strong tool definitions with clear naming (verb_noun pattern), comprehensive descriptions (avg 180 chars), and explicit input schemas using Zod. All 14 tools have descriptions and typed parameters. Key strengths: discovery tools guide agents toward efficient patterns (aggregations, breakouts); error messages include recovery hints (e.g., 'use list_databases to find it'). Gaps: output schemas not formally documented; some parameter descriptions could be more prescriptive about constraints; no tool annotations (readOnlyHint); cross_db_overlap and export_dataset lack explicit error handling guidance for edge cases (500K row limits).
Find overlapping values in a field across two different Metabase databases. Solves Metabase's limitation of not supporting cross-DB joins in MBQL. Returns overlap count, unique values on each side, and optional sample of overlapping values. Supports optional filters on both sides. Refuses if either side exceeds 500K rows (add filters to narrow). Execution time depends on row count and network latency.
Export full row-level data from Metabase to a local CSV or JSON file. Handles Metabase's 2000-row hard cap by auto-paginating internally. Output directory is configurable via METABASE_EXPORT_DIR env var (defaults to ~/Downloads/). Refuses if query would return >500K rows (add filters to narrow). Returns file path, row count, columns, file size, and elapsed time.
Get a saved question's definition (query type, database, SQL/MBQL) without executing it.
Get a dashboard's definition: name, cards, and their layout.
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.
Output schemas not formally documented. Tool descriptions state what is returned (e.g., 'Returns file path, row count, columns, file size, elapsed time') but no structured schema definition is visible in code. LLMs cannot reliably parse unstructured responses or plan downstream tool calls without explicit output types.
No tool annotations (readOnlyHint, destructiveHint, idempotentHint). All 14 tools are read-only, but this is not declared via MCP tool annotations. Agents cannot infer safety properties without explicit hints.
| Scored | Grade | Overall | Spec posture | Rubric |
|---|---|---|---|---|
| 2026-09-23 | C | 63 | 2026-07-28+ | v2 |
List all dashboards with their ID and name.
List all databases connected to Metabase with their ID, name, and engine type.
List all saved questions/cards, optionally filtered by database.
List all tables in a database. Returns table ID, name, and schema.
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.
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 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.
Execute a saved question (card) by ID. Works for both MBQL and native SQL cards.
Search across questions, dashboards, and tables by keyword.
cross_db_overlap and export_dataset lack explicit error handling guidance for constraint violations (500K row limit). Descriptions mention the limit but do not explain what error the agent will receive or how to recover (e.g., 'If query exceeds 500K rows, add filters to narrow the result set, then retry').
Parameter descriptions for complex MBQL structures (aggregation, filter, breakout in query_dataset) use examples but lack formal constraints. LLMs may hallucinate invalid MBQL syntax. Consider adding a link to MBQL documentation or a stricter description of valid clause structures.
run_native_query accepts a maxLength 100000 SQL string but does not document SQL dialect (MySQL, PostgreSQL, etc.) or which operations are explicitly forbidden beyond 'write operations'. Agents may attempt unsupported syntax.