
hluaguo/metabase-mcp 是从 https://github.com/hluaguo/metabase-mcp. 导入的 MCP 服务器候选
概览
hluaguo/metabase-mcp 是从 https://github.com/hluaguo/metabase-mcp. 导入的 MCP 服务器候选
概述(AI 翻译)
一款高性能的 模型上下文协议(MCP)服务器,适用于 Metabase,使 AI 助手如 Claude、Cursor 及其他 MCP 客户端能够无缝与您的 Metabase 实例交互。通过 AI 驱动的数据库操作,查询数据库、执行 SQL、管理仪表盘,并用自然语言自动化分析工作流程。
** 适合:** 数据分析师、开发者和团队,希望将AI助手与其Metabase商业智能平台集成,实现自动化SQL查询、仪表盘管理和数据探索。
主要特色
数据库运营
- 列表数据库:浏览所有已配置的Metabase数据库数据库
- 表发现:探索包含元数据和描述的表
- 现场检查:通过智能分页获取详细的字段/列信息
查询与分析
- SQL 执行:运行原生 SQL 查询,支持参数和模板
- MongoDB 支持:执行原生 MongoDB 查询,并自动转换为聚合管道的 JSON
- 卡片管理:执行、创建和管理Metabase问题/卡片(SQL和MongoDB)
本页由 AI 翻译,技术细节请以原文为准。
README
以下为原文 README 节选,完整内容请查看原文。
Metabase MCP Server - Connect AI Assistants to Your Metabase Analytics
A high-performance Model Context Protocol (MCP) server for Metabase, enabling AI assistants like Claude, Cursor, and other MCP clients to interact seamlessly with your Metabase instance. Query databases, execute SQL, manage dashboards, and automate analytics workflows with natural language through AI-powered database operations.
Perfect for: Data analysts, developers, and teams looking to integrate AI assistants with their Metabase business intelligence platform for automated SQL queries, dashboard management, and data exploration.
Key Features
Database Operations
- List Databases: Browse all configured Metabase databases
- Table Discovery: Explore tables with metadata and descriptions
- Field Inspection: Get detailed field/column information with smart pagination
Query & Analytics
- SQL Execution: Run native SQL queries with parameter support and templating
- MongoDB Support: Execute native MongoDB queries with automatic JSON conversion for aggregation pipelines
- Card Management: Execute, create, and manage Metabase questions/cards (SQL and MongoDB)
- Collection Organization: Create and manage collections for better organization
- Natural Language Queries: Let AI assistants translate questions into SQL or MongoDB queries
Authentication & Security
- API Key Support: Secure authentication via Metabase API keys (recommended)
- Session-based Auth: Alternative email/password authentication
- Environment Variables: Secure credential management via
.envfiles
AI Assistant Integration
- Claude Desktop: Native integration with Anthropic’s Claude AI
- Cursor IDE: Seamless integration for AI-assisted development
- Any MCP Client: Compatible with all Model Context Protocol clients
Enhanced Performance & Reliability
- Context-aware Logging: Real-time logging with debug, info, warning, and error levels visible to AI clients
- Proper Error Handling: FastMCP
ToolErrorexceptions for better error messages and debugging - Middleware Stack: Built-in error handling and logging middleware for production reliability
- Best Practices: Follows latest FastMCP patterns with duplicate prevention and clean configuration
- Modern Python: Uses Python 3.12+ type hints (
|syntax) for better type safety
Quick Start
Prerequisites
- Python 3.12+
- Metabase instance with API access
uvxoruvpackage manager
Installation
安装
uvx metabase-mcp配置
{
"mcpServers": {
"metabase-mcp": {
"command": "uvx",
"args": ["metabase-mcp"],
"env": {
"METABASE_URL": "https://your-metabase-instance.com",
"METABASE_API_KEY": "your-api-key-here"
}
}
}
}