home / mcp / 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.
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.
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.
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-assistantConfigure 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"
}
}
}
}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.
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.
List all databases accessible to Metabase via the MCP server.
Retrieve schemas within a specified database.
Fetch tables along with their fields for a given schema.
Execute arbitrary SQL queries against a connected database.
Create a new table using an AI-assisted definition.
Create a view within a database.
Create a materialized view for faster access to complex queries.
Create indexes on tables to optimize performance.
Run VACUUM and ANALYZE to maintain database health.
Explain the query plan for a given SQL statement.
Fetch statistics for a given table.
Analyze how indexes are used by queries.
Fast exploration of database schemas.
Deep analysis of database schema structure.
Detect foreign keys and relationships between tables.
Convert natural language prompts into executable SQL.
Provide optimization suggestions for SQL queries.
Explain SQL in plain English for better understanding.
Suggest meaningful table relationships for a schema.
Auto-generate descriptions for Metabase cards and dashboards.
Create new questions (queries) within Metabase.
List all questions stored in Metabase.
Create parametric questions with variables.
Retrieve details about a specific card.
Update a Metabase card's configuration.
Delete a Metabase card.
Archive a Metabase card.
Get the JSON data backing a Metabase card.
Copy a Metabase card.
Clone a Metabase card.
Create new dashboards in Metabase.
List all dashboards in Metabase.
Retrieve details for a specific dashboard.
Update dashboard configuration.
Delete a dashboard.
Add a card to a dashboard.
Add filters to a dashboard.
Optimize dashboard layout for clarity.
Apply executive dashboard templates.
List Metabase users.
Get user details.
Create a new user.
Update user information.
Disable a user account.
List permission groups.
Create new permission groups.
Instance health overview and metrics.
Analyze query performance statistics.
Track content usage across the workspace.
Monitor user activity within Metabase.
Show table dependencies across the schema.
Assess the impact of changes on dashboards and cards.