metabase-lite-mcp
Allows AI agents to search and read saved questions and dashboards, explore database schema, and run read-only query previews on a Metabase instance.
Click on "Deploy Server".
Wait a few minutes for the server to deploy. Once ready, it will show a "Started" state.
In the chat, type
@followed by the MCP server name and your instructions, e.g., "@metabase-lite-mcp Find a dashboard named 'Weekly Sales'"
That's it! The server will respond to your query, and you can continue using it as needed.
Here is a step-by-step guide with screenshots.
metabase-lite-mcp
An MCP (Model Context Protocol) server that lets AI agents interact with Metabase — search dashboards & cards, explore database metadata, and run read-only query previews.
Use Case
Give your AI agent (Claude, Cursor, etc.) the ability to:
Search & read saved questions (cards) and dashboards
Explore database schema — list databases, tables, fields, and collections
Run query previews — execute read-only SQL/Mongo queries with built-in safety validation (write operations are blocked before they ever reach Metabase)
This is useful for agents that need to understand your data, find existing reports, validate queries, or build new dashboards on your behalf.
Related MCP server: Metabase MCP Server
Prerequisites
Node.js 18+
A Metabase instance with API key access enabled
A Metabase API key (inherits permissions from its group)
Install
npm install -g metabase-lite-mcpOr use directly with npx (no install needed) — see configuration below.
Configuration
The server requires two environment variables:
Variable | Description | Example |
| Your Metabase instance URL |
|
| Metabase API key |
|
Usage with Claude Code
Add to your .mcp.json (project-level or ~/.claude/.mcp.json for global):
{
"mcpServers": {
"metabase": {
"command": "npx",
"args": ["-y", "metabase-lite-mcp"],
"env": {
"METABASE_BASE_URL": "https://metabase.example.com",
"METABASE_API_KEY": "mb_xxxxxxxxxxxxxx"
}
}
}
}Usage with Cursor
Add to your Cursor MCP settings (.cursor/mcp.json):
{
"mcpServers": {
"metabase": {
"command": "npx",
"args": ["-y", "metabase-lite-mcp"],
"env": {
"METABASE_BASE_URL": "https://metabase.example.com",
"METABASE_API_KEY": "mb_xxxxxxxxxxxxxx"
}
}
}
}Available Tools
Tool | Description |
| List all databases configured in Metabase |
| Get tables and fields for a specific database |
| List all collections |
| Search saved questions by name/text |
| Get full details of a saved question |
| Search dashboards by name/text |
| Get full dashboard with tabs, cards, and filters |
| Execute a read-only query and return results |
Safety
All queries are validated before being sent to Metabase:
SQL: Blocks
INSERT,UPDATE,DELETE,DROP,ALTER,TRUNCATE,CREATE,GRANT,REVOKE,CALL,EXECUTE, and multi-statement queriesMongoDB: Blocks
$outand$mergepipeline stages
Development
git clone https://github.com/sanjeevsingla/metabase-lite-mcp.git
cd metabase-lite-mcp
npm install
npm run build
npm run watch # Rebuild on changes
npm run inspector # Launch MCP inspector to test tools interactivelyLicense
MIT
Available Tools
17 toolsadd_card_to_dashboardA
Place a saved card on a dashboard, optionally in a specific tab and position. Auto-packs if no placement given.
Inputs: card_id (required), dashboard_id (required), tab_id, placement, +1 more.
copy_cardA
Duplicate a card for safe iteration or re-use
Inputs: id (required), name, collection_id.
create_cardB
Create a new card (saved question) in Metabase
Inputs: name (required), dataset_query (required), display, description, +2 more.
create_dashboardB
Create a new dashboard in Metabase
Inputs: name (required), tabs, parameters, description, +1 more.
ensure_dashboard_filters_and_mappingsB
Create/update dashboard parameters (filters) and wire them to card variables on specified dashcards
Inputs: filters (required), dashboard_id (required), apply_to_dashcard_ids (required).
get_cardA
Get full details of a specific card (saved question)
Inputs: id (required), output_file (required).
get_collectionsA
List all collections in Metabase
Inputs: no named parameters.
get_configured_databasesA
List all databases configured in Metabase (id, name, engine)
Inputs: no named parameters.
get_dashboard_fullB
Get full dashboard details including tabs, dashcards, and parameters
Inputs: id (required), output_file (required).
get_database_metadataB
Get schema, tables, and fields for a specific database
Inputs: database_id (required), output_file (required).
move_cardA
Move a card to a different collection (card is not deleted)
Inputs: id (required), collection_id (required).
remove_card_from_dashboardA
Remove a dashcard from a dashboard (the card itself remains intact)
Inputs: dashcard_id (required), dashboard_id (required).
run_query_previewA
Execute a read-only query preview and return results. Validates queries are read-only before execution.
Inputs: output_file (required), dataset_query (required), parameters, constraints.
search_cardsA
Search for cards (saved questions) by name or text
Inputs: query (required), limit.
search_dashboardsC
Search for dashboards by name or text
Inputs: query (required), limit.
update_cardA
Update an existing card (saved question). Only provided fields are changed.
Inputs: id (required), patch (required).
update_dashboardA
Update an existing dashboard. Only provided fields are changed. Uses GET-then-PUT pattern for safety.
Inputs: id (required), patch (required).
Tool Schema Changelog
Recent tool additions, removals, and schema changes observed during successful MCP inspections.
Loading tool schema changelog…
TDQS
Scored across 17 tools
Each tool targets a distinct resource and action (cards vs dashboards vs databases). The only potential overlap is copy_card vs create_card, but descriptions clearly distinguish duplication from fresh creation. Search vs get follows standard patterns, and all tools have clear boundaries.
All tools follow a consistent verb_noun pattern with snake_case (get_, search_, create_, update_, move_, add_, remove_, ensure_, run_). Even copy_card fits the convention. No camelCase or mixed verb styles.
17 tools is slightly above the typical 3-15 range but is justified for the domain, covering cards, dashboards, and database metadata. Each tool has a legitimate purpose, and the set is not bloated with redundant utilities.
The set covers CRUD for cards (create, read, update, copy/move) and dashboards (create, read, update, add/remove cards, filters), but lacks delete operations for both cards and dashboards. Missing direct get_dashboard (only full) but full supersedes. These are notable gaps that prevent full lifecycle management.
Maintenance
Related MCP Connectors
Query your org's data in natural language — read-only MCP access to SQL, NoSQL, files & warehouses.
Safe, read-only Postgres and MySQL access for AI agents. Audit log + column-level controls.
Query 40 databases from Claude, ChatGPT, or Cursor — on any device. Read-only, encrypted, audited.
Read-only Google Search Console and Google Analytics for AI agents.
Related MCP Servers
- FlicenseNot gradedqualityDmaintenanceEnables AI assistants to interact with Metabase databases and dashboards, allowing users to list and execute queries, access data visualizations, and interact with database resources through natural language.151-
- AlicenseBqualityCmaintenanceConnects Metabase business intelligence platform to AI assistants, enabling users to query data, create dashboards and charts, manage databases, and interact with BI assets using natural language through the Model Context Protocol.3017Apache 2.0
- FlicenseNot gradedqualityNot gradedmaintenanceEnables AI assistants to interact with Metabase by providing access to dashboards, questions, and databases through the Metabase API. It allows users to list resources, execute existing cards, and run custom SQL queries to retrieve data through natural language.15 npm-
- FlicenseNot gradedqualityDmaintenanceEnables AI agents to query databases via natural language using the Model Context Protocol, with automatic schema discovery, SQL query execution, and read-only safety checks.-