MCP Server for Metabase - 111 tools for SQL generation, dashboards & PostgreSQL
Metabase AI Assistant is an enterprise-grade Model Context Protocol (MCP) server that connects Large Language Models (LLMs), AI coding assistants, and automated data workflows directly to your Metabase Business Intelligence instance.
Featuring 152 dedicated tools, native dbt Metadata & Metrics Auto-Syncer, Metabase to dbt Reverse Lineage Exposures, dbt-Smart Question Creator, Lightdash Code-as-BI YAML-to-Dashboard generation, Cube.js-style Pre-aggregations & Multi-Hop Lineage Joins, Omni.co Controlled Semantic-to-YAML bridge, autonomous self-healing SQL execution, full-scale dashboard architecting, proactive anomaly detection, query index advisory, zero-leak PII masking, and strict security guardrails. Works seamlessly with Claude, Cursor, ChatGPT, Gemini, and Google Antigravity.
Metabase AI Assistant transforms standard AI interfaces (Claude Desktop, Cursor, VS Code, ChatGPT, Gemini, automated agent frameworks) into full-fledged Metabase power users:
dbt_project_scan_deep): 9-tier architectural classification, doc('...') resolution, and catalog.json table/column profiling.dbt_lineage_joins_graph): Resolves shortest join paths via Dijkstra Min-Heap algorithms with 3-color DAG cycle detection.dbt_semantic_preagg_advisor): Generates multi-dialect Materialized View DDLs (Postgres, BigQuery, Snowflake, ClickHouse, DuckDB, Redshift, MySQL) with HyperLogLog distinct counts.dbt_build_dashboard_from_yaml): Translates meta.metabase and meta.lightdash formatting options into collision-free 24-column Metabase Dashboards.dbt_semantic_export_yaml): Serializes approved business rules into clean dbt schema.yml / semantic_models.yml code blocks.ai_sql_execute_and_heal): 3-iteration automated error-recovery loop for resilient querying.$$\mathbf{Gold;Marts;(fct_,;dim_,;rpt_)} ;\gg; \mathbf{Silver;(int_)} ;\gg; \mathbf{Bronze;Staging;(stg_)}$$
dbt_inspect_models: Parses dbt manifest.json and MetricFlow semantic models.dbt_prioritize_sources: Dynamically routes natural language questions to pre-aggregated, tested dimensional and fact tables.semantic_memory_propose: Proposes a business rule in PENDING_APPROVAL status.semantic_memory_approve: Explicitly activates the rule with required data steward comments.semantic_memory_deprecate: Safely soft-archives rules with mandatory audit reasons (DEPRECATED).semantic_memory_restore: Instantly restores archived rules.semantic_memory_list: Lists all rules with complete audit history and timestamps.ai_sql_execute_and_heal)GROUP BY clauses, and dialect quirks across Postgres, MySQL, BigQuery, Snowflake, and SQLite._provenance.healing_trail.Metabase AI Assistant provides backward and forward compatibility across all major Metabase architectures:
| Metabase Version Range | Compatibility Level | Key Features Supported |
|---|---|---|
| Metabase v0.55 – v0.61+ (Current) | Full Support | Modern MBQL 5 format (stages, lib/type), /api/upload/csv, updated collection permissions, multi-tab dashboards |
| Metabase v0.50 – v0.54 | Full Support | Collection tree hierarchies (/api/collection/tree), Model cards, API Key auth (x-api-key), sequential parametric queries |
| Metabase v0.43 – v0.49 | Full Support | Session token authentication (X-Metabase-Session), legacy MBQL query pipelines, database introspection |
| Metabase Open Source & Enterprise | Full Support | Automatic feature detection (whitelabeling, audit logs, granular data permissions) |
npx metabase-ai-assistant
npm install -g metabase-ai-assistant
npx -y @smithery/cli install metabase-ai-assistant --client claude
Add the server definition to claude_desktop_config.json:
~/Library/Application Support/Claude/claude_desktop_config.json%APPDATA%\Claude\claude_desktop_config.json{
"mcpServers": {
"metabase": {
"command": "npx",
"args": ["-y", "metabase-ai-assistant"],
"env": {
"METABASE_URL": "https://your-metabase-instance.com",
"METABASE_API_KEY": "mb_your_api_key_here",
"METABASE_READ_ONLY_MODE": "true"
}
}
}
}
Add to .cursor/mcp.json or VS Code MCP settings:
{
"mcpServers": {
"metabase": {
"command": "npx",
"args": ["-y", "metabase-ai-assistant"],
"env": {
"METABASE_URL": "https://your-metabase-instance.com",
"METABASE_API_KEY": "mb_your_api_key_here",
"METABASE_READ_ONLY_MODE": "true"
}
}
}
}
Expose Metabase AI Assistant as an OpenAPI Action for ChatGPT Plus / Team / Enterprise:
npm run start:ssehttps://your-domain.com/tools/openapi.jsonPass tool definitions to Gemini Function Calling SDKs (@google/genai or google-generativeai):
Deploy directly to Cloudflare's edge network for free:
cd deploy/cloudflare
npx wrangler deploy
The 143 MCP tools are categorized into 10 operational domains:
Backed by an automated multi-tier test suite covering unit logic, integration workflows, and security fuzzing:
# Run complete test suite (32 suites, 583 tests)
npm test
# Run unit tests
npm run test:unit
# Run integration workflows
npm run test:integration
# Run security & PII zero-leak fuzzing tests
npm run test:security
Licensed under the Apache License 2.0. See the LICENSE file for details.
Developed and maintained by Abdullah Enes SARI (ONMARTECH LLC).
Source-derived launch command. Check the maintainer’s required arguments and credentials before running:
npx -y metabase-ai-assistantMerge this template into ~/Library/Application Support/Claude/claude_desktop_config.json. Keep existing servers. Add any arguments, credentials, and permissions required by the maintainer; this template has not been install-tested.
{
"mcpServers": {
"io-github-enessari-metabase-ai-assistant": {
"command": "npx",
"args": [
"-y",
"metabase-ai-assistant"
]
}
}
}Restart Claude Desktop completely for changes to take effect. Confirm the server appears connected in the client’s tool list, then try a read-only example from its documentation.
Claude Desktop setup referencemetabase-ai-assistantnpmio.github.enessari/metabase-ai-assistant works with any MCP-compatible client. Copy the config snippet from the Configuration section above and add it to the file shown for your client, then restart the application.
~/Library/Application Support/Claude/claude_desktop_config.jsonRestart Claude Desktop completely for changes to take effect.~/.cursor/mcp.jsonRestart Cursor for changes to take effect..vscode/mcp.jsonReload VS Code window for changes to take effect.~/.codeium/windsurf/mcp_config.jsonRestart Windsurf for changes to take effect..mcp.jsonSave at the project root, then start Claude Code in that project and review the MCP server approval prompt. Keep real credentials out of shared files.