Skip to main content
Glama
ryanmaule

Metabase MCP Server

by ryanmaule

Metabase MCP 服务器

一个将 AI 助手与 Metabase 分析平台集成的模型上下文协议 (MCP) 服务器。

概述

此 MCP 服务器提供了与 Metabase API 的集成,使具备 MCP 功能的 LLM 能够直接与您的分析数据进行交互,该服务器充当了您的分析平台与对话式 AI 之间的桥梁。

主要功能

  • 资源访问:通过直观的 metabase:// URI 导航 Metabase 资源

  • 两种身份验证方法:支持基于会话和 API 密钥的身份验证

  • 结构化数据访问:JSON 格式的响应,便于 AI 助手使用

  • 全面日志记录:详细的日志记录,便于调试和监控

  • 错误处理:稳健的错误处理,提供清晰的错误消息

Related MCP server: Metabase MCP Server

可用工具

该服务器为 AI 助手提供了以下工具:

数据访问工具

  • list_dashboards:检索 Metabase 实例中所有可用的仪表板

  • list_cards:获取 Metabase 中所有已保存的问题/卡片

  • list_databases:查看所有已连接的数据库源

  • list_collections:列出 Metabase 中的所有集合

  • list_tables:列出特定数据库中的所有表

  • get_table_fields:获取特定表中的所有字段/列

执行工具

  • execute_card:运行已保存的问题并检索结果(支持可选参数)

  • execute_query:针对任何已连接的数据库执行自定义 SQL 查询

仪表板管理

  • get_dashboard_cards:从特定仪表板中提取所有卡片

  • create_dashboard:创建具有指定名称和参数的新仪表板

  • update_dashboard:更新现有仪表板的名称、描述或参数

  • delete_dashboard:删除仪表板

  • add_card_to_dashboard:通过位置规范和可选的标签页分配,在仪表板中添加或更新卡片

卡片/问题管理

  • create_card:使用 SQL 查询创建新的问题/卡片

  • update_card_visualization:更新卡片的视觉化设置

集合管理

  • create_collection:创建新的集合以组织仪表板和问题

配置

该服务器支持两种身份验证方法:

选项 1:用户名和密码身份验证

# 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

选项 2:API 密钥身份验证(生产环境推荐)

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

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

您可以直接设置这些环境变量,或使用带有 dotenv.env 文件。

使用 Smithery 部署

要将此 MCP 服务器与 Claude 或其他 AI 助手一起使用,请 fork 此存储库并使用 Smithery 进行部署:

部署步骤:

  1. 将此存储库 fork 到您的 GitHub 帐户

  2. 前往 Smithery 并使用您的 GitHub 帐户连接

  3. 通过 Smithery 的界面部署 fork 后的存储库

Claude Desktop 集成

配置您的 Claude Desktop 以使用 Smithery 托管的版本:

MacOS:编辑 ~/Library/Application Support/Claude/claude_desktop_config.json

Windows:编辑 %APPDATA%/Claude/claude_desktop_config.json

API 密钥身份验证:

{
  "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\":\"\"}"
      ]
    }
  }
}

用户名和密码身份验证:

{
  "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\"}"
      ]
    }
  }
}

安全注意事项

  • 建议在生产环境中使用 API 密钥身份验证

  • 请妥善保管您的 API 密钥和凭据

  • 考虑使用环境变量而不是硬编码凭据

  • 采取适当的网络安全措施以限制对 Metabase 实例的访问

贡献

欢迎贡献!请随时提交 Pull Request。

A
license - permissive license
Not graded
quality - not tested
D
maintenance

Maintenance

Maintainers
Response time
Release cycle
Releases (12mo)
Commit activity

Resources

Unclaimed servers have limited discoverability.

Looking for Admin?

If you are the server author, to access and configure the admin panel.

Related MCP Servers

  • A
    license
    Not graded
    quality
    D
    maintenance
    Enables AI assistants to interact with Metabase analytics platform, allowing them to query databases, manage dashboards and cards, execute SQL queries, and access analytics data through natural language.
    61
    MIT
  • A
    license
    Not graded
    quality
    C
    maintenance
    Enables AI assistants to interact with Metabase analytics platform, allowing them to query databases, manage dashboards, execute SQL queries, and organize collections through natural language.
    61
    MIT
  • A
    license
    Not graded
    quality
    D
    maintenance
    Enables AI assistants to interact with Metabase analytics platform, allowing users to query databases, manage dashboards and cards, execute SQL queries, and access analytics data through natural language.
    61
    1
    MIT
  • A
    license
    A
    quality
    D
    maintenance
    Enables AI assistants to interact with Metabase for database operations, SQL queries, dashboard management, and analytics automation.
    28
    MIT

View all related MCP servers

Related MCP Connectors

  • Connect your AI assistants to Keboola and expose your data, transformations, SQL queries, ...

  • Provides AI assistants with direct access to Mapbox developer APIs and documentation.

  • AI access to Hitsteps analytics, live visitors, uptime, goals, alerts, and chats.

View all MCP Connectors

Latest Blog Posts

MCP directory API

We provide all the information about MCP servers via our MCP API.

curl -X GET 'https://glama.ai/api/mcp/v1/servers/ryanmaule/metabase-mcp'

If you have feedback or need assistance with the MCP directory API, please join our Discord server