metabase-mcp

metabase-mcp

3

The Metabase MCP Server connects AI assistants with the Metabase analytics platform, providing tools for resource access, data execution, and improved interaction through structured data formats and authentication methods. This server enhances analytical capabilities by facilitating AI-driven conversations with analytics data.

Metabase MCP Server

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

Key Features

  • Resource Access via Metabase URIs
  • Two Authentication Methods: session-based and API key
  • JSON-formatted Structured Data Access
  • Comprehensive Logging for debugging and monitoring
  • Robust Error Handling

Available Tools

Data Access Tools

  • list_cards: Get saved questions/cards
  • list_databases: View connected database sources
  • list_collections: List collections
  • list_tables: List tables in a database
  • get_table_fields: Get fields/columns in a table

Execution Tools

  • execute_card: Run saved questions
  • execute_query: Execute custom SQL queries

Card/Question Management

  • create_card: Create new questions/cards

Collection Management

  • create_collection: Create new collections

Configuration

Supports Username/Password and API Key authentication, with environment variable setup.

Installation

Prerequisites

  • Node.js 18.0.0 or higher
  • Active Metabase instance

Development Setup

  • Install dependencies with npm
  • Build and start the server using npm scripts

Docker Support

Docker image available for containerized deployment, supports stdio-based interaction for AI assistants.

Security Considerations

  • Use API key authentication for production
  • Secure API keys and credentials with Docker secrets or environment variables