Metabase
A high-performance Model Context Protocol server for AI integration with Metabase analytics platforms. Features response optimization, robust error handling, and comprehensive data access tools.
README
Metabase MCP
A high-performance Model Context Protocol server for AI integration with Metabase analytics platforms. Features response optimization, robust error handling, and comprehensive data access tools.
<a href="https://glama.ai/mcp/servers/@jerichosequitin/Metabase"> <img width="380" height="200" src="https://glama.ai/mcp/servers/@jerichosequitin/Metabase/badge" /> </a>
Key Features
- Response Optimization: Up to 90% token reduction for efficient AI context usage
- Robust Error Handling: Comprehensive error handling with structured, actionable responses
- Smart Caching: Multi-layer caching with configurable TTL for improved performance
- Unified Commands:
list,retrieve,search,execute, andexporttools - Dual Authentication: API key or email/password authentication
- Large Data Export: Export up to 1M rows in CSV, JSON, and XLSX formats
- Read-Only Mode: Enabled by default to restrict execute to SELECT queries only
Installation
Option 1: Claude Desktop
Install directly from the Claude Desktop Directory, or:
- Download
metabase-mcp.mcpbfrom Releases - Open the
.mcpbfile with Claude Desktop to install - Configure your Metabase credentials in Claude Desktop's extension settings
Option 2: Manual Configuration
Add the following to your MCP client configuration:
{
"mcpServers": {
"metabase-mcp": {
"command": "npx",
"args": ["-y", "@jerichosequitin/metabase-mcp"],
"env": {
// Required
"METABASE_URL": "https://your-metabase-instance.com",
// Authentication (choose one)
"METABASE_API_KEY": "your_api_key_here", // API key (recommended)
"METABASE_USER_EMAIL": "", // OR email/password
"METABASE_PASSWORD": "",
// Optional (defaults shown)
"EXPORT_DIRECTORY": "~/Downloads/Metabase", // Export location
"METABASE_READ_ONLY_MODE": "true", // Restrict to SELECT queries
"LOG_LEVEL": "info", // debug, info, warn, error, fatal (debug enables pretty JSON)
"CACHE_TTL_MS": "600000", // 10 minutes
"REQUEST_TIMEOUT_MS": "600000" // 10 minutes
}
}
}
}
Option 3: Docker
For containerized deployments without installing Node.js. Add to your MCP client configuration:
{
"mcpServers": {
"metabase-mcp": {
"command": "docker",
"args": [
"run", "-i", "--rm", "--init",
"-e", "METABASE_URL=https://your-metabase-instance.com",
"-e", "METABASE_API_KEY=your_api_key",
// Optional: mount volume for exports
// "-v", "~/Downloads/Metabase:/home/node/exports",
"ghcr.io/jerichosequitin/metabase-mcp:latest"
]
}
}
}
Or build locally: docker build -t metabase-mcp . and use metabase-mcp as the image name.
Required flags: -i (interactive, for MCP stdio), --rm (cleanup), --init (signal handling)
Environment variables: Pass via -e flags. See Manual Configuration for all options. Docker defaults: LOG_LEVEL=info, METABASE_READ_ONLY_MODE=true, EXPORT_DIRECTORY=/home/node/exports.
Available Tools
list
Fetch all records for a resource type with optimized responses returning only essential fields.
- Models:
cards,dashboards,tables,databases,collections - Pagination:
offset/limitparameters for large datasets
retrieve
Get detailed information for specific items by ID with concurrent processing.
- Models:
card,dashboard,table,database,collection,field - Batch Support: Up to 50 IDs per request
- Pagination:
table_offset/table_limitfor databases with many tables
search
Search across all Metabase items using the native search API.
- Filtering: By model type, database ID, or content
- Options: Search native SQL queries, include dashboard questions
execute
Execute SQL queries or run saved cards with configurable row limits (default: 100, max: 500).
- SQL Mode: Custom queries with
database_idandquery - Card Mode: Saved cards with
card_idand optionalcard_parametersfor filtering - Security: Respects Read-Only Mode (blocks INSERT, UPDATE, DELETE, DROP, etc.)
export
Export large datasets up to 1M rows to the configured export directory.
- Formats: CSV, JSON, XLSX
- SQL Mode: Export custom query results
- Card Mode: Export saved card results with optional filtering
- Note: When using hosted remote deployments (e.g., Glama), exported files are saved inside the container and are inaccessible. Use
executefor query results directly, or run locally via npx/Docker for full export functionality.
clear_cache
Clear internal cache with granular control.
- Targets: Individual model caches, list caches, or bulk operations (
all,all-lists,all-individual)
For Developers
Prerequisites
- Node.js 18.0.0 or higher
- Active Metabase instance
Setup
git clone https://github.com/jerichosequitin/metabase-mcp.git
cd metabase-mcp
npm install
npm run build
Then configure your MCP client to use the local build:
{
"mcpServers": {
"metabase-mcp": {
"command": "node",
"args": ["/path/to/metabase-mcp/build/src/index.js"],
"env": { /* see Manual Configuration for options */ }
}
}
}
Debugging
Use the MCP Inspector for development:
npm run inspector
Testing
npm test # Run tests
npm run test:coverage # Coverage report
Building MCPB Package
npm run mcpb:build
Creates metabase-mcp-{version}.mcpb ready for GitHub Releases.
Security
Read-Only Mode is enabled by default (METABASE_READ_ONLY_MODE=true), restricting the execute tool to SELECT queries only. Write operations (INSERT, UPDATE, DELETE, DROP, etc.) are blocked. Set to false to allow write operations.
Authentication: API key authentication is recommended over email/password for production use.
License
This project is licensed under the MIT License.
推荐服务器
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 模型以安全和受控的方式获取实时的网络信息。