home / mcp / metabase ai assistant mcp server

Metabase AI Assistant MCP Server

πŸš€ The most powerful MCP Server for Metabase - 111+ tools for AI SQL generation, dashboard automation & enterprise BI. Works with Claude, Cursor, ChatGPT.

Installation
Add the following to your MCP client configuration file.

Configuration

View docs
{
  "mcpServers": {
    "enessari-metabase-ai-assistant": {
      "command": "npx",
      "args": [
        "-y",
        "metabase-ai-assistant"
      ],
      "env": {
        "METABASE_URL": "https://your-metabase.com",
        "METABASE_API_KEY": "mb_your_api_key"
      }
    }
  }
}

Metabase AI Assistant MCP Server enables you to generate SQL from natural language, create dashboards, manage Metabase users, and automate BI workflows inside a managed MCP environment. It exposes a robust set of tools for database exploration, AI-assisted SQL, dashboard orchestration, and governance, all while enforcing enterprise security and structured, machine-readable outputs.

How to use

You run the MCP server alongside your Metabase instance and connect to it with an MCP client. The server accepts natural language requests, translates them into SQL, creates dashboards, and manages BI workflows with structured outputs. Use it to transform plain language prompts into executable queries, dashboards, and management actions while benefiting from built‑in security controls and logging.

How to install

Prerequisites you need on your machine before installing include Node.js and npm (Node Package Manager). Ensure you have network access to install packages and to reach your Metabase instance.

# Install the MCP server globally (recommended)
npm install -g metabase-ai-assistant

# Or install locally in a project directory
# npm init -y
# npm install metabase-ai-assistant --save

# Quick run (after installation, see How to use for client setup)
npx metabase-ai-assistant

Configuration and runtime options

Configure the MCP client to launch the server and connect to your Metabase instance. You can run the server via a standard MCP client setup snippet that specifies the command to start the assistant and the environment variables needed to reach Metabase.

{
  "mcpServers": {
    "metabase": {
      "command": "npx",
      "args": ["-y", "metabase-ai-assistant"],
      "env": {
        "METABASE_URL": "https://your-metabase.com",
        "METABASE_API_KEY": "mb_your_api_key"
      }
    }
  }
}

Security and governance

The MCP server supports a read-only mode to prevent destructive operations by default. It logs all activities for audit purposes and validates environment variables to prevent misconfigurations. Make sure to review and understand the security controls before enabling write operations.

Examples of what you can accomplish

Natural Language β†’ SQL: Ask for revenue by category, and the server returns a formatted SQL query and results.

Instant Dashboard Creation: Request an executive dashboard for sales, and the server builds a configured dashboard with templates.

Deep Database Exploration: Inquire about related tables and relationships, and receive ER diagram information.

Available tools

db_list

List all databases accessible to Metabase via the MCP server.

db_schemas

Retrieve schemas within a specified database.

db_tables

Fetch tables along with their fields for a given schema.

sql_execute

Execute arbitrary SQL queries against a connected database.

db_table_create

Create a new table using an AI-assisted definition.

db_view_create

Create a view within a database.

db_matview_create

Create a materialized view for faster access to complex queries.

db_index_create

Create indexes on tables to optimize performance.

db_vacuum_analyze

Run VACUUM and ANALYZE to maintain database health.

db_query_explain

Explain the query plan for a given SQL statement.

db_table_stats

Fetch statistics for a given table.

db_index_usage

Analyze how indexes are used by queries.

db_schema_explore

Fast exploration of database schemas.

db_schema_analyze

Deep analysis of database schema structure.

db_relationships_detect

Detect foreign keys and relationships between tables.

ai_sql_generate

Convert natural language prompts into executable SQL.

ai_sql_optimize

Provide optimization suggestions for SQL queries.

ai_sql_explain

Explain SQL in plain English for better understanding.

ai_relationships_suggest

Suggest meaningful table relationships for a schema.

mb_auto_describe

Auto-generate descriptions for Metabase cards and dashboards.

mb_question_create

Create new questions (queries) within Metabase.

mb_questions

List all questions stored in Metabase.

mb_question_create_parametric

Create parametric questions with variables.

mb_card_get

Retrieve details about a specific card.

mb_card_update

Update a Metabase card's configuration.

mb_card_delete

Delete a Metabase card.

mb_card_archive

Archive a Metabase card.

mb_card_data

Get the JSON data backing a Metabase card.

mb_card_copy

Copy a Metabase card.

mb_card_clone

Clone a Metabase card.

mb_dashboard_create

Create new dashboards in Metabase.

mb_dashboards

List all dashboards in Metabase.

mb_dashboard_get

Retrieve details for a specific dashboard.

mb_dashboard_update

Update dashboard configuration.

mb_dashboard_delete

Delete a dashboard.

mb_dashboard_add_card

Add a card to a dashboard.

mb_dashboard_add_filter

Add filters to a dashboard.

mb_dashboard_layout_optimize

Optimize dashboard layout for clarity.

mb_dashboard_template_executive

Apply executive dashboard templates.

mb_user_list

List Metabase users.

mb_user_get

Get user details.

mb_user_create

Create a new user.

mb_user_update

Update user information.

mb_user_disable

Disable a user account.

mb_permission_group_list

List permission groups.

mb_permission_group_create

Create new permission groups.

mb_meta_overview

Instance health overview and metrics.

mb_meta_query_performance

Analyze query performance statistics.

mb_meta_content_usage

Track content usage across the workspace.

mb_meta_user_activity

Monitor user activity within Metabase.

mb_meta_table_dependencies

Show table dependencies across the schema.

mb_meta_impact_analysis

Assess the impact of changes on dashboards and cards.