Metabase Analytics Integration Server

数据与存储

by ryanmaule

让 AI 助手以对话方式无缝连接 Metabase,访问 dashboard、card、database 并执行查询,支持 API key 或 session 认证安全管理数据。

什么是 Metabase Analytics Integration Server

让 AI 助手以对话方式无缝连接 Metabase,访问 dashboard、card、database 并执行查询,支持 API key 或 session 认证安全管理数据。

核心功能 (16 个工具)

list_dashboards

List all dashboards in Metabase

list_cards

List all questions/cards in Metabase

list_databases

List all databases in Metabase

execute_card

Execute a Metabase question/card and get results

get_dashboard_cards

Get all cards in a dashboard

execute_query

Execute a SQL query against a Metabase database

create_card

Create a new question/card in Metabase

update_card_visualization

Update visualization settings for a card

add_card_to_dashboard

Add a card to a dashboard

create_dashboard

Create a new dashboard in Metabase

list_collections

List all collections in Metabase

create_collection

Create a new collection in Metabase

list_tables

List all tables in a database

get_table_fields

Get all fields/columns in a table

update_dashboard

Update an existing dashboard

delete_dashboard

Delete a dashboard

README

Metabase MCP Server

A Model Context Protocol server that integrates AI assistants with Metabase analytics platform.

Overview

This MCP server provides integration with the Metabase API, enabling LLM with MCP capabilites to directly interact with your analytics data, this server acts as a bridge between your analytics platform and conversational AI.

Key Features

  • Resource Access: Navigate Metabase resources via intuitive metabase:// URIs
  • Two Authentication Methods: Support for both session-based and API key authentication
  • Structured Data Access: JSON-formatted responses for easy consumption by AI assistants
  • Comprehensive Logging: Detailed logging for easy debugging and monitoring
  • Error Handling: Robust error handling with clear error messages

Available Tools

The server exposes the following tools for AI assistants:

Data Access Tools

  • list_dashboards: Retrieve all available dashboards in your Metabase instance
  • list_cards: Get all saved questions/cards in Metabase
  • list_databases: View all connected database sources
  • list_collections: List all collections in Metabase
  • list_tables: List all tables in a specific database
  • get_table_fields: Get all fields/columns in a specific table

Execution Tools

  • execute_card: Run saved questions and retrieve results with optional parameters
  • execute_query: Execute custom SQL queries against any connected database

Dashboard Management

  • get_dashboard_cards: Extract all cards from a specific dashboard
  • create_dashboard: Create a new dashboard with specified name and parameters
  • update_dashboard: Update an existing dashboard's name, description, or parameters
  • delete_dashboard: Delete a dashboard
  • add_card_to_dashboard: Add or update cards in a dashboard with position specifications and optional tab assignment

Card/Question Management

  • create_card: Create a new question/card with SQL query
  • update_card_visualization: Update visualization settings for a card

Collection Management

  • create_collection: Create a new collection to organize dashboards and questions

Configuration

The server supports two authentication methods:

Option 1: Username and Password Authentication

bash
# Required
METABASE_URL=https://your-metabase-instance.com
METABASE_USER_EMAIL=your_email@example.com
METABASE_PASSWORD=your_password

# Optional
LOG_LEVEL=info # Options: debug, info, warn, error, fatal

Option 2: API Key Authentication (Recommended for Production)

bash
# Required
METABASE_URL=https://your-metabase-instance.com
METABASE_API_KEY=your_api_key

# Optional
LOG_LEVEL=info # Options: debug, info, warn, error, fatal

You can set these environment variables directly or use a .env file with dotenv.

Deployment with Smithery

To use this MCP server with Claude or other AI assistants, fork this repository and deploy using Smithery:

Steps to Deploy:

  1. Fork this repository to your GitHub account
  2. Go to Smithery and connect with your GitHub account
  3. Deploy the forked repository through Smithery's interface

Claude Desktop Integration

Configure your Claude Desktop to use the Smithery-hosted version:

MacOS: Edit ~/Library/Application Support/Claude/claude_desktop_config.json

Windows: Edit %APPDATA%/Claude/claude_desktop_config.json

API Key Authentication:

json
{
  "mcpServers": {
    "metabase-mcp": {
      "command": "npx",
      "args": [
        "-y",
        "@smithery/cli@latest",
        "run",
        "YOUR_GITHUB_USERNAME/metabase-mcp-server",
        "--config",
        "{\"metabaseUrl\":\"https://your-metabase-instance.com\",\"metabaseApiKey\":\"your_api_key\",\"metabasePassword\":\"\",\"metabaseUserEmail\":\"\"}"
      ]
    }
  }
}

Username and Password Authentication:

json
{
  "mcpServers": {
    "metabase-mcp": {
      "command": "npx",
      "args": [
        "-y",
        "@smithery/cli@latest",
        "run",
        "YOUR_GITHUB_USERNAME/metabase-mcp-server",
        "--config",
        "{\"metabaseUrl\":\"https://your-metabase-instance.com\",\"metabaseApiKey\":\"\",\"metabasePassword\":\"your_password\",\"metabaseUserEmail\":\"your_email@example.com\"}"
      ]
    }
  }
}

Security Considerations

  • recommend using API key authentication for production environments
  • Keep your API keys and credentials secure
  • Consider using environment variables instead of hardcoding credentials
  • Apply appropriate network security measures to restrict access to your Metabase instance

Contributing

Contributions are welcome! Please feel free to submit a Pull Request.

常见问题

Metabase Analytics Integration Server 是什么?

让 AI 助手以对话方式无缝连接 Metabase,访问 dashboard、card、database 并执行查询,支持 API key 或 session 认证安全管理数据。

Metabase Analytics Integration Server 提供哪些工具?

提供 16 个工具,包括 list_dashboards、list_cards、list_databases

相关 Skills

技术栈评估

by alirezarezvani

Universal
热门

对比框架、数据库和云服务,结合 5 年 TCO、安全风险、生态活力与迁移复杂度做量化评估,适合技术选型、栈升级和替换路线决策。

帮你系统比较技术栈优劣,不只看功能,还把TCO、安全性和生态健康度一起量化,选型和迁移决策更稳。

数据与存储
未扫描15.4k

资深数据科学家

by alirezarezvani

Universal
热门

覆盖实验设计、特征工程、预测建模、因果推断与模型评估,适合用 Python/R/SQL 做 A/B 测试、时序分析和生产级 ML 落地,支撑数据驱动决策。

从 A/B 测试、因果分析到预测建模一条龙搞定,既有硬核统计方法也懂业务沟通,特别适合把数据结论真正落地。

数据与存储
未扫描15.4k

资深架构师

by alirezarezvani

Universal
热门

适合系统设计评审、ADR记录和扩展性规划,分析依赖与耦合,权衡单体或微服务、数据库与技术栈选型,并输出Mermaid、PlantUML、ASCII架构图。

搞系统设计、技术选型和扩展规划时,用它能更快理清架构决策与依赖关系,还能直接产出 Mermaid/PlantUML 图,方案讨论效率很高。

数据与存储
未扫描15.4k

相关 MCP Server

SQLite 数据库

编辑精选

by Anthropic

热门

SQLite 是让 AI 直接查询本地数据库进行数据分析的 MCP 服务器。

这个服务器解决了 AI 无法直接访问 SQLite 数据库的问题,适合需要快速分析本地数据集的开发者。不过,作为参考实现,它可能缺乏生产级的安全特性,建议在受控环境中使用。

数据与存储
85.9k

by Anthropic

热门

PostgreSQL 是让 Claude 直接查询和管理你的数据库的 MCP 服务器。

这个服务器解决了开发者需要手动编写 SQL 查询的痛点,特别适合数据分析师或后端开发者快速探索数据库结构。不过,由于是参考实现,生产环境使用前务必评估安全风险,别指望它能处理复杂事务。

数据与存储
85.9k

by Firecrawl

热门

Firecrawl 是让 AI 直接抓取网页并提取结构化数据的 MCP 服务器。

它解决了手动写爬虫的麻烦,让 Claude 能直接访问动态网页内容。最适合需要实时数据的研究者或开发者,比如监控竞品价格或抓取新闻。但要注意,它依赖第三方 API,可能涉及隐私和成本问题。

数据与存储
6.3k

评论