Metabase MCP Server

MCP Server for Metabase - 111 tools for SQL generation, dashboards & PostgreSQL

Local serverstdio

What is the Metabase MCP server?

If you already use Metabase, the metabase mcp server is the piece that lets your assistant work with it directly. MCP Server for Metabase - 111 tools for SQL generation, dashboards & PostgreSQL.

What the server does

That's it! Your AI assistant now has full Metabase superpowers. 🦸

Installation

The server ships on npm as metabase-ai-assistant, so your MCP client can launch it on demand — there is no separate build step. Add the server block to your client's configuration, restart it, and the tools register themselves.

Available tools

The toolset is worth reading before you wire it up, because it tells you what the integration is really for:

  • FeatureThis Project
  • db_list — List all databases
  • db_schemas — Get schemas in a database
  • db_tables — Get tables with fields
  • sql_execute — Execute SQL queries
  • db_table_create — Create tables (AI-prefixed)
  • db_view_create — Create views
  • db_matview_create — Create materialized views
  • db_index_create — Create indexes
  • db_vacuum_analyze — VACUUM and ANALYZE
  • db_query_explain — EXPLAIN query plans
  • db_table_stats — Table statistics

Credentials and setup notes

Configuration is passed through the environment: METABASE_URL, METABASE_API_KEY, ANTHROPIC_API_KEY, OPENAI_API_KEY. Treat anything key-shaped as a real credential — scope it to the minimum the server needs, and rotate it if it ever lands in a shared config.

Worth knowing first

  • It runs with your machine's permissions. That is convenient and also the reason to think about what you point it at before you approve a tool call.
  • With 14 tools registered it takes up a noticeable share of the context window; turn it off in projects that never touch Metabase.
  • Missing credentials fail quietly in some clients — if no tools show up, check the environment block first.
  • Keep per-call confirmation enabled while you learn its behaviour; it is the cheapest safeguard you have.

Where it fits

This sits in the database access group, where several servers overlap in what they claim to do but differ sharply once you actually set them up. Metabase's toolset — Feature, db_list, db_schemas and 11 more — is a fair guide to whether it matches your workflow. It is maintained by enessari; worth a glance at recent repository activity before you build anything load-bearing on it.

This entry was verified against Metabase's own documentation before publication; SyncDev keeps the directory reviewed rather than auto-generated.

Available tools

ToolWhat it does
Feature**This Project**
db_listList all databases
db_schemasGet schemas in a database
db_tablesGet tables with fields
sql_executeExecute SQL queries
db_table_createCreate tables (AI-prefixed)
db_view_createCreate views
db_matview_createCreate materialized views
db_index_createCreate indexes
db_vacuum_analyzeVACUUM and ANALYZE
db_query_explainEXPLAIN query plans
db_table_statsTable statistics
db_index_usageIndex usage analysis
db_schema_exploreFast schema exploration

How to install the Metabase MCP server

### Add to Claude Desktop / Cursor

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

Configuration as documented by the project. Restart the client after saving.

Configuration

VariableDescriptionRequired
METABASE_URLEndpoint or connection string the server talks to.Yes
METABASE_API_KEYCredential the server authenticates with.Yes
ANTHROPIC_API_KEYCredential the server authenticates with.Yes
OPENAI_API_KEYCredential the server authenticates with.Yes

Example prompts to try

  • Use Metabase to Feature.
  • Use Metabase to db list.
  • Use Metabase to db schemas.

Frequently asked questions

It connects Metabase to MCP-compatible AI assistants such as Claude and Cursor, exposing 14 tools (Feature, db_list, db_schemas, and more) that the assistant can call on your behalf. Instead of copying data back and forth by hand, the assistant works with Metabase directly.