
A comprehensive bridge to Metabase that exposes 134 tools across database operations, dashboard management, and AI-powered SQL generation. You get direct access to the Metabase API for creating questions and dashboards, managing users and permissions, plus Postgres-specific operations like table creation, indexing, and VACUUM commands. The standout features are AI tools that convert natural language to SQL, optimize queries, and auto-generate dashboard templates. It includes read-only mode by default to prevent accidental destructive operations, activity logging for audit trails, and metadata analytics for tracking query performance and content usage. Reach for this when you need to automate BI workflows, generate SQL through conversation, or manage Metabase infrastructure programmatically without switching to the web interface.
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).
METABASE_URL*Metabase instance URL (e.g., http://localhost:3000)
METABASE_USERNAMEMetabase username for authentication
METABASE_PASSWORDsecretMetabase password for authentication
METABASE_API_KEYsecretMetabase API key (alternative to username/password)
DATABASE_HOSTPostgreSQL database host for direct SQL execution
DATABASE_PORTPostgreSQL database port
DATABASE_NAMEPostgreSQL database name
DATABASE_USERPostgreSQL database user
DATABASE_PASSWORDsecretPostgreSQL database password