Metabase MCP
This server provides read-only exploration and querying of Metabase content and data.
List and inspect dashboards, cards, collections, databases, and database schemas.
Execute saved Metabase cards/questions and run SELECT-only SQL queries with row limits, column selection, formatting, and pagination.
Search across Metabase dashboards, cards, collections, databases, and tables.
Run up to 20 read operations in parallel with
batch_execute.Run sequential multi-step workflows with result references using
run_workflow.
Provides tools for interacting with Metabase's API, enabling AI agents to query databases, manage dashboards and cards, execute SQL queries with safety guardrails, and perform natural language to SQL conversion for data analysis.
metabase-mcp
An MCP server for Metabase with API-key auth and production guardrails. It lets Claude and other AI agents query, explore and build in Metabase on any edition and any version, including from CI and behind a VPN.
Why this one?
Metabase ships an official MCP server. It's good, and if it fits your setup you should use it. This server is for the setups it doesn't fit, mostly open-source and Starter Metabase:
Headless on any plan. Authenticates with a Metabase API key, so it works for agents, CI and VPN'd self-hosted instances. The official server's headless auth is Pro/Enterprise only.
Governance without an upgrade. Read/write/full modes, per-tool allow/deny lists, column redaction, SQL guardrails, tiered rate limits and a risk-scored audit log, on any edition.
Composition.
batch_executeruns up to 20 operations in parallel;run_workflowchains steps with output references.AI in the server. NLQ-to-SQL, SQL explain/optimize, insights and trend analysis with your own Anthropic key.
Any Metabase version, including pre-v0.60 instances that can't run the official MCP.
Choose the official server if you want OAuth per-user permissions, structured (MBQL) queries or inline charts, or if you're on Pro/Enterprise. → Full comparison
Related MCP server: Metabase MCP Server
Quick start
You need a Metabase URL and an API key (Admin > Settings > API Keys > Create API Key).
Claude Desktop (one-click): download metabase-mcp-*.mcpb from the latest release, double-click it, and enter your URL and key. They're stored in the OS keychain.
Claude Code:
claude mcp add metabase \
-e METABASE_URL=https://your-metabase.example.com \
-e METABASE_API_KEY=mb_your_api_key_here \
-- npx -y @ai-1luvc0d3/metabase-mcpAny MCP client (for example claude_desktop_config.json):
{
"mcpServers": {
"metabase": {
"command": "npx",
"args": ["-y", "@ai-1luvc0d3/metabase-mcp"],
"env": {
"METABASE_URL": "https://your-metabase.example.com",
"METABASE_API_KEY": "mb_your_api_key_here",
"MCP_MODE": "read"
}
}
}
}Shared server for a team (Docker): run one container and either share one Metabase API key (each person gets a token) or let each person bring their own Metabase credential so Metabase permissions apply per person (MCP_AUTH_MODE=passthrough). Policy, audit log and rate limits live on the server. → docs/docker.md
docker run -d -p 3000:3000 -e METABASE_URL=... -e METABASE_API_KEY=... \
-e MCP_AUTH_TOKENS=alice:<token>,bob:<token> ghcr.io/1luvc0d3/metabase-mcp:latest
claude mcp add --transport http metabase http://<host>:3000/mcp --header "Authorization: Bearer <token>"Then ask something like "What dashboards do we have about customer retention?"
Configuration
Variable | Default | Description |
| required | Your Metabase instance URL |
| required | Metabase API key (or |
|
|
|
| - | Enables the NLQ and insight tools |
| - | Expose only, or never expose, these tools |
| - | Columns to mask in query results, e.g. |
All options, including timeouts, row limits, rate limits and redaction details: docs/configuration.md.
Tools
Mode | Tools | Adds |
| 12 | Dashboards, cards, databases, collections, search, SELECT-only SQL, |
| 22 | Create, update and delete cards, dashboards and collections |
| 30 | AI insights, metric comparison and trend analysis |
With ANTHROPIC_API_KEY set, every mode also gets nlq_to_sql, explain_sql, optimize_sql and validate_sql.
Workflows chain tools in one call, passing results between steps:
{
"steps": [
{ "name": "find", "tool": "search_content", "args": { "query": "revenue", "type": "dashboard" } },
{ "name": "dash", "tool": "get_dashboard", "args": { "dashboard_id": "$find.results[0].id" } },
{ "name": "data", "tool": "execute_card", "args": { "card_id": "$dash.dashcards[0].card_id" } }
]
}Full tool list and more examples: docs/tools.md.
Security
SQL guardrails: only
SELECT/WITH; DDL, DML and injection patterns are rejectedAccess control: server modes plus per-tool allow/deny lists, enforced inside batches and workflows too
Column redaction: sensitive columns are masked before results reach the AI
Rate limits: separate read, write and LLM tiers
Audit log: every operation logged with a risk level
Secret handling: API keys never reach tool handlers, Metabase errors are sanitized, and auth headers are never forwarded on redirects
Details and limits: docs/security.md. Report vulnerabilities via SECURITY.md.
Privacy policy
Collected: nothing. No telemetry, analytics or usage data. Your Metabase URL and keys stay on your machine (in the OS keychain when installed as a Claude Desktop extension).
Transmitted: Metabase API calls go straight from your machine to your own Metabase instance. The NLQ and insight tools send your question, schema context and query result samples to the Anthropic API (privacy policy); without an Anthropic key, nothing is sent to Anthropic. Columns in
MCP_REDACT_COLUMNSare redacted first.Retained: nothing. Audit logs (if enabled with
AUDIT_LOG_FILE) are written only to your local filesystem, with owner-only (0600) permissions.See also the Metabase privacy policy.
Troubleshooting
Connection errors, blocked SQL, rate limits and missing tools: docs/troubleshooting.md.
Contributing
npm install && npm run build # build
npm test # unit + integration tests
npm run lint && npm run type-checkSee CONTRIBUTING.md and the Code of Conduct. Bugs and feature requests go in Issues; questions, feedback and production stories in Discussions. If it's useful to you, a ⭐ helps.
License
Available Tools
12 toolsbatch_executeBRead-only
Execute multiple read operations in a single call. Supports up to 20 operations run in parallel. Supported tools: get_dashboard, get_card, execute_card, get_database_schema, execute_query, search_content, list_dashboards, list_databases, list_cards.
Inputs: operations (required).
execute_cardCRead-onlyIdempotent
Execute an existing question/card and get results
Inputs: card_id (required), limit, fields, format, +2 more.
execute_queryBRead-only
Execute a SQL query (SELECT statements only)
Inputs: sql (required), database_id (required), limit, fields, +2 more.
get_cardCRead-onlyIdempotent
Get details of a specific question/card
Inputs: card_id (required).
get_collectionsARead-onlyIdempotent
List all collections
Inputs: no named parameters.
get_dashboardBRead-onlyIdempotent
Get dashboard details including its cards
Inputs: dashboard_id (required).
get_database_schemaCRead-onlyIdempotent
Get tables and columns for a database
Inputs: database_id (required), detail, format, tables.
list_cardsARead-onlyIdempotent
List questions/cards in Metabase. Returns up to 100 cards. Use search_content for discovery.
Inputs: limit, collection_id.
list_dashboardsARead-onlyIdempotent
List all dashboards in Metabase
Inputs: no named parameters.
list_databasesARead-onlyIdempotent
List all connected databases
Inputs: no named parameters.
run_workflowARead-only
Execute a multi-step workflow pipeline in a single call. Steps run sequentially and can reference previous step results using "$stepName.path" syntax. Example: search for dashboards, then get details of the first result, then execute its cards — all in one call. Max 10 steps.
Inputs: steps (required).
search_contentCRead-onlyIdempotent
Search across Metabase content (dashboards, cards, collections)
Inputs: query (required), type.
Tool Schema Changelog
Recent tool additions, removals, and schema changes observed during successful MCP inspections.
Loading tool schema changelog…
TDQS
Scored across 12 tools
Most tools target distinct resource+action pairs (get_dashboard, get_card, execute_card, execute_query, etc.), and descriptions clarify the split between list_cards and search_content. The main overlap is batch_execute versus run_workflow, which both orchestrate multiple operations, though their parallel-vs-sequential distinction is documented.
Nearly all tools follow a consistent verb_noun snake_case pattern (get_dashboard, list_cards, execute_query, search_content). The only deviation is batch_execute, which reverses the order to noun_verb, but the overall convention remains predictable.
Twelve tools is well-scoped for a Metabase read/query server. Core resources (dashboards, cards, collections, databases, schemas) and execution paths are covered without excessive surface area.
The server covers discovery, inspection, and execution well, but lacks write/lifecycle operations such as creating or updating cards and dashboards, and has no get_collection detail tool. For a read-oriented analytics MCP this is workable, but notable gaps remain for full content management.
Maintenance
Related MCP Connectors
Run UX research from Claude — create card sort studies, list studies, pull headline stats.
Connect Claude to Fathom meeting recordings, transcripts, and summaries
Ask Claude about your Google Ads: campaign performance, wasted search terms, GAQL reports.
Query your warehouse or a CSV with Claude/ChatGPT over MCP, governed by table-level ACL + audit.
Related MCP Servers
- FlicenseNot gradedqualityDmaintenanceEnables AI assistants to interact with Metabase analytics platform, allowing them to query databases, manage dashboards and cards, execute SQL queries, and access analytics data through natural language.-
- FlicenseNot gradedqualityDmaintenanceEnables AI assistants to interact with Metabase analytics platform, allowing users to query databases, manage dashboards and cards, execute SQL queries, and access analytics data through natural language.1-
- FlicenseNot gradedqualityDmaintenanceEnables AI assistants to interact with Metabase analytics platform, allowing them to query databases, execute SQL, manage dashboards and cards, and access analytics data through natural language.-
- AlicenseAqualityBmaintenanceA high-performance Model Context Protocol server for AI integration with Metabase analytics platforms. Features response optimization, robust error handling, and comprehensive data access tools.6630 npm89MIT