Skip to main content
Glama
Arkanji

metabase-mcp-server

by Arkanji

Server Configuration

Describes the environment variables required to run the server.

NameRequiredDescriptionDefault
METABASE_URLYesYour Metabase instance URL (do not include /api)
METABASE_API_KEYYesYour Metabase API key
METABASE_EXPORT_DIRNoWhere export_dataset writes CSV/JSON files~/Downloads/

Instructions

Guidance the server publishes about itself, which clients place ahead of the tool catalog so the model reads it before choosing anything.

This server publishes no instructions, or was last inspected before Glama recorded them.

Capabilities

Features and capabilities supported by this server

Protocol revision2025-11-25

CapabilityDetails
tools
{
  "listChanged": true
}

Tools

Functions exposed to the LLM to take actions

NameDescription
list_databasesA

List all databases connected to Metabase with their ID, name, and engine type.

list_tablesA

List all tables in a database. Returns table ID, name, and schema.

get_table_fieldsA

Get field IDs, names, and types for a table. You MUST call this before building query_dataset calls — field IDs are required for filters and aggregations.

preview_tableA

Return a small sample of rows from a table to understand its data shape. Useful for inspecting JSON column structures or understanding field formats before writing queries.

searchA

Search across questions, dashboards, and tables by keyword.

query_datasetA

Run an MBQL query against a Metabase database. Metabase enforces a hard server-side cap of 2000 rows — use aggregations to work around this. If is_truncated is true and you need more rows, call again with offset: 2000, then 4000, etc. Only do this for small result sets (<10K rows). For larger exports, use export_dataset instead. For time comparisons (WoW, MoM, trends), use a single query with a date breakout instead of multiple queries. MBQL examples: aggregation: [["count"]] or [["sum", ["field", 87, null]]]. filter: ["=", ["field", 10, null], "active"]. breakout: [["field", 42, {"temporal-unit": "month"}]].

run_native_queryA

Run a native SQL query against a Metabase database. Requires that your API key has native query (SQL) permission in Metabase. IMPORTANT: You must include a LIMIT clause in your SQL to avoid large result sets. Write operations (INSERT, UPDATE, DELETE, DROP, etc.) and multi-statement queries are rejected. The server strips SQL comments before validation.

run_saved_questionB

Execute a saved question (card) by ID. Works for both MBQL and native SQL cards.

get_card_metadataA

Get a saved question's definition (query type, database, SQL/MBQL) without executing it.

list_saved_questionsA

List all saved questions/cards, optionally filtered by database.

list_dashboardsA

List all dashboards.

get_dashboardA

Get a dashboard's cards and layout.

cross_db_overlapA

Compare a field across two databases to find overlapping values (e.g. find which email addresses exist in both your CRM and marketing databases). Handles cross-DB join limitations by fetching both sets and computing intersection in memory. Caps at 500K rows per side — add filters for larger tables. Supports cancellation.

export_datasetA

Export full row-level data to a local CSV or JSON file. Auto-paginates through the 2000-row Metabase cap internally. The file path is returned in the response. Use this when you need complete data for external analysis (Excel, Google Sheets). For analytical queries, use query_dataset with aggregations instead. Caps at 500K rows — add filters for larger tables. Output directory is configurable via METABASE_EXPORT_DIR env var (defaults to ~/Downloads/).

Prompts

Interactive templates invoked by user choice

NameDescription

No prompts

Resources

Contextual data attached and managed by the client

NameDescription

No resources

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/Arkanji/metabase-mcp-server'

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