metabase-lite-mcp
Enables AI agents to search and read Metabase dashboards and cards, explore database schema, and run read-only query previews through the Model Context Protocol.
README
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.
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-mcp
Or use directly with npx (no install needed) — see configuration below.
Configuration
The server requires two environment variables:
| Variable | Description | Example |
|---|---|---|
METABASE_BASE_URL |
Your Metabase instance URL | https://metabase.example.com |
METABASE_API_KEY |
Metabase API key | mb_xxxxxxxxxxxxxx |
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 |
|---|---|
get_configured_databases |
List all databases configured in Metabase |
get_database_metadata |
Get tables and fields for a specific database |
get_collections |
List all collections |
search_cards |
Search saved questions by name/text |
get_card |
Get full details of a saved question |
search_dashboards |
Search dashboards by name/text |
get_dashboard_full |
Get full dashboard with tabs, cards, and filters |
run_query_preview |
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 queries - MongoDB: 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 interactively
License
MIT
推荐服务器
Baidu Map
百度地图核心API现已全面兼容MCP协议,是国内首家兼容MCP协议的地图服务商。
Playwright MCP Server
一个模型上下文协议服务器,它使大型语言模型能够通过结构化的可访问性快照与网页进行交互,而无需视觉模型或屏幕截图。
Magic Component Platform (MCP)
一个由人工智能驱动的工具,可以从自然语言描述生成现代化的用户界面组件,并与流行的集成开发环境(IDE)集成,从而简化用户界面开发流程。
Audiense Insights MCP Server
通过模型上下文协议启用与 Audiense Insights 账户的交互,从而促进营销洞察和受众数据的提取和分析,包括人口统计信息、行为和影响者互动。
VeyraX
一个单一的 MCP 工具,连接你所有喜爱的工具:Gmail、日历以及其他 40 多个工具。
graphlit-mcp-server
模型上下文协议 (MCP) 服务器实现了 MCP 客户端与 Graphlit 服务之间的集成。 除了网络爬取之外,还可以将任何内容(从 Slack 到 Gmail 再到播客订阅源)导入到 Graphlit 项目中,然后从 MCP 客户端检索相关内容。
Kagi MCP Server
一个 MCP 服务器,集成了 Kagi 搜索功能和 Claude AI,使 Claude 能够在回答需要最新信息的问题时执行实时网络搜索。
e2b-mcp-server
使用 MCP 通过 e2b 运行代码。
Neon MCP Server
用于与 Neon 管理 API 和数据库交互的 MCP 服务器
Exa MCP Server
模型上下文协议(MCP)服务器允许像 Claude 这样的 AI 助手使用 Exa AI 搜索 API 进行网络搜索。这种设置允许 AI 模型以安全和受控的方式获取实时的网络信息。