Skip to main content
Glama
voducdan

metabase-mcp

by voducdan

Server Configuration

Describes the environment variables required to run the server.

NameRequiredDescriptionDefault
HOSTNoOptional custom host for SSE/HTTP (default 0.0.0.0)
PORTNoOptional custom port for SSE/HTTP (default 8000)
METABASE_URLYesThe URL of your Metabase instance
METABASE_API_KEYNoYour Metabase API key (recommended)
METABASE_PASSWORDNoYour Metabase password
METABASE_USER_EMAILNoYour Metabase user email
METABASE_HTTP_TIMEOUTNoOptional HTTP timeout in seconds (default 30.0)

Capabilities

Features and capabilities supported by this server

CapabilityDetails
tools
{
  "listChanged": true
}
prompts
{
  "listChanged": false
}
resources
{
  "subscribe": false,
  "listChanged": false
}
extensions
{
  "io.modelcontextprotocol/ui": {}
}
experimental
{}

Tools

Functions exposed to the LLM to take actions

NameDescription
list_databasesA

List all databases configured in Metabase.

Returns: A dictionary containing all available databases with their metadata.

list_tablesA

List all tables in a specific database.

Args: database_id: The ID of the database to query.

Returns: Formatted markdown table showing table details.

get_table_fieldsA

Get all fields/columns in a specific table.

Args: table_id: The ID of the table. limit: Maximum number of fields to return (default: 20).

Returns: Dictionary with field metadata, truncated if necessary.

execute_queryB

Execute a native SQL query against a Metabase database.

Args: database_id: The ID of the database to query. query: The SQL query to execute. native_parameters: Optional parameters for the query.

Returns: Query execution results.

execute_mongodb_queryB

Execute a MongoDB native query against a Metabase database.

Args: database_id: The ID of the MongoDB database to query. collection: The MongoDB collection name. query: The MongoDB query (aggregation pipeline array or query object). native_parameters: Optional parameters for the query.

Returns: Query execution results.

list_cardsB

List all saved questions/cards in Metabase.

Returns: Dictionary containing all cards with their metadata.

execute_cardA

Execute a saved Metabase question/card and retrieve results.

Args: card_id: The ID of the card to execute. parameters: Optional parameters for the card execution.

Returns: Card execution results.

create_cardA

Create a new question/card in Metabase.

Args: name: Name of the card. database_id: ID of the database to query. query: SQL query for the card. description: Optional description. collection_id: Optional collection to place the card in. visualization_settings: Optional visualization configuration.

Returns: The created card object.

create_mongodb_cardA

Create a new MongoDB question/card in Metabase.

Args: name: Name of the card. database_id: ID of the MongoDB database. collection: MongoDB collection name. query: MongoDB query string (aggregation pipeline or query). description: Optional description. collection_id: Optional collection to place the card in. visualization_settings: Optional visualization configuration.

Returns: The created MongoDB card object.

update_cardA

Update properties of a saved question/card in Metabase.

When query is updated, existing template-tags on the card are preserved by default (re-sent alongside the new SQL) so filters wired to the card aren't silently wiped. Pass template_tags to set/replace them atomically with the SQL update.

Args: card_id: The ID of the card to update. name: New name for the card. description: New description for the card. query: New SQL query for the card. database_id: New database ID (required if changing query). display: Display type (e.g. "table", "bar", "line", "pie", "scalar", "row", "area", "combo", "pivot", "smartscalar", "funnel", "waterfall", "map"). collection_id: Move the card to a different collection. visualization_settings: Visualization settings to apply. archived: Set to true to archive the card, false to unarchive. template_tags: Replacement template-tags map (tag-name -> config). If provided, replaces the card's template-tags. If omitted while query is set, existing template-tags are preserved unchanged.

Returns: The updated card object.

create_modelA

Create a new model in Metabase.

A model is a special type of saved question that acts as a curated dataset. Models can define metadata for their columns and serve as building blocks for other questions.

Args: name: Name of the model. database_id: ID of the database to query. query: SQL query that defines the model. description: Optional description of the model. collection_id: Optional collection to place the model in. result_metadata: Optional list of column metadata dicts. Each dict can include keys like "name", "display_name", "base_type", "semantic_type", "description", and "field_ref". visualization_settings: Optional visualization configuration.

Returns: The created model object.

update_modelA

Update an existing model in Metabase.

Args: card_id: The ID of the model to update. name: New name for the model. description: New description for the model. query: New SQL query for the model. database_id: New database ID (required if changing query). collection_id: Move the model to a different collection. result_metadata: Updated column metadata list. Each dict can include keys like "name", "display_name", "base_type", "semantic_type", "description", and "field_ref". visualization_settings: Visualization settings to apply. archived: Set to true to archive the model, false to unarchive.

Returns: The updated model object.

update_card_displayA

Update the display type of a saved question/card in Metabase.

Args: card_id: The ID of the card to update. display: The display type (e.g. "table", "bar", "line", "pie", "scalar", "row", "area", "combo", "pivot", "smartscalar", "funnel", "waterfall", "map"). visualization_settings: Optional visualization settings to apply with the display change.

Returns: The updated card object.

list_dashboardsA

List all dashboards in Metabase.

Returns: A list of dashboards with their metadata including id, name, description, collection_id, and creator info.

create_dashboardA
Create a new dashboard in Metabase.

Args:
    name: Name of the dashboard.
    description: Optional description of the dashboard.
    collection_id: Optional collection ID to place the dashboard in.
    parameters: Optional list of parameter/filter configurations for the dashboard.

– Returns: The created dashboard object.

update_dashboardA

Update properties of a dashboard, including its parameter/filter list.

Use parameters to define dashboard-level filters. Each parameter is a dict with keys like id (string, required — a stable identifier), name, slug, type (e.g. "date/all-options", "date/single", "date/range", "category", "string/=", "number/="), and optional default, sectionId, values_source_type, values_source_config.

Args: dashboard_id: The ID of the dashboard to update. name: New name for the dashboard. description: New description for the dashboard. collection_id: Move the dashboard to a different collection. parameters: Full replacement list of dashboard parameters. archived: Set true to archive, false to unarchive.

Returns: The updated dashboard object.

set_card_template_tagsA

Set or update the template tags on a card's native SQL query.

Metabase auto-creates template tags for each {{variable}} in SQL, but they default to type "text". Use this tool to change a tag's type (e.g. to "date" or "number"), set a display name, default value, required flag, or convert to a field filter ("dimension").

Each entry in template_tags is keyed by tag name and may include:

  • type: "text" | "number" | "date" | "dimension" | "card" | "snippet"

  • display-name: human-readable label

  • default: default value

  • required: bool

  • dimension: [field-id, ] # only for type "dimension"

  • widget-type: e.g. "date/single", "date/range", "category" # for dimension

Existing fields (including the auto-generated id UUID and name) are preserved when merge=True.

Args: card_id: The ID of the card whose native query tags should be updated. template_tags: Map of tag-name -> tag-config. merge: If True (default), merge with existing tags. If False, replace entirely.

Returns: The updated card object.

update_card_parametersA

Set the card-level parameters list on a saved question.

Card parameters drive the filter widgets shown on a card's own page AND are what Metabase uses to wire dashboard parameters into the card. For a date filter to render as a date picker (instead of a plain text box), the card must have a matching parameter entry — the template-tag type alone is not enough.

Each parameter is a dict. Common keys:

  • id: the template-tag's UUID (must match dataset_query.native.template-tags[name].id)

  • name: display name, e.g. "Start date"

  • slug: URL slug, e.g. "start_date"

  • type: widget type, e.g. "date/single", "date/range", "date/all-options", "category", "string/=", "number/="

  • target: link back to the template tag, e.g. ["variable", ["template-tag", "start_date"]] (for text/number/date vars) ["dimension", ["template-tag", "start_date"]] (for field filters)

  • default: default value (optional)

  • values_source_type / values_source_config: dropdown data source (optional)

  • values_query_type: "list" | "search" | "none" (optional)

Args: card_id: The ID of the card whose parameters should be updated. parameters: List of parameter configs. When merge=False (default) this replaces the card's entire parameters list. When merge=True, entries are matched by id (or by slug if id is missing) and merged into existing parameters; new entries are appended.

Returns: The updated card object.

set_dashcard_parameter_mappingsA

Wire dashboard parameters to card template tags on specific dashcards.

Each mapping entry must include:

  • dashcard_id: the dashcard to target (from get_dashboard_cards)

  • parameter_id: the dashboard parameter's id (set via update_dashboard)

  • template_tag: the tag name used in the card's SQL (e.g. "start_date")

Optional per-entry fields:

  • kind: "variable" (default) for plain {{tag}} vars, or "dimension" for field-filter tags. Produces the correct target shape.

  • card_id: overrides the dashcard's own card_id in the mapping (rare — needed for series cards).

  • target: raw Metabase target array; if provided, used verbatim and overrides kind/template_tag.

Existing parameter_mappings on each touched dashcard are preserved and extended, unless replace=True (in which case the mappings for each touched dashcard are fully replaced by the entries provided here). Dashcards not referenced in mappings are left untouched.

Args: dashboard_id: The ID of the dashboard. mappings: List of mapping entries as described above. replace: If True, replace parameter_mappings on touched dashcards instead of appending.

Returns: The updated dashboard object.

set_dashcard_inline_parametersA

Attach dashboard filters inline to specific dashcards.

By default, dashboard parameters render as filter widgets at the top of the dashboard. Setting inline_parameters on a dashcard moves those filter widgets to appear attached to that specific card instead of the header.

Each entry in inline_parameters must include:

  • dashcard_id: the dashcard to target (from get_dashboard_cards)

  • parameter_ids: list of dashboard parameter ids (strings) to render inline on this dashcard. The parameters must already exist on the dashboard (see update_dashboard).

Existing inline_parameters on each touched dashcard are preserved and extended, unless replace=True (in which case the list on each touched dashcard is fully replaced by the ids provided here). Dashcards not referenced in inline_parameters are left untouched.

Note: the dashboard parameter should still be mapped to the card's template tag via set_dashcard_parameter_mappings — inline placement only affects where the widget renders, not how values are wired into the card's query.

Args: dashboard_id: The ID of the dashboard. inline_parameters: List of entries as described above. replace: If True, replace inline_parameters on touched dashcards instead of appending.

Returns: The updated dashboard object.

get_dashboard_cardsB

Get the cards and their layout information for a specific dashboard.

Returns each card's id, name, display type, size, and position on the dashboard grid (col, row, size_x, size_y).

Args: dashboard_id: The ID of the dashboard.

Returns: A list of dashboard card objects with layout and card metadata.

list_dashboard_tabsA

List all tabs configured on a dashboard.

Args: dashboard_id: The ID of the dashboard.

Returns: A list of tab objects with id, name, and position. Empty list if the dashboard has no tabs.

list_dashboard_tab_cardsA

List the cards belonging to a specific tab on a dashboard.

Args: dashboard_id: The ID of the dashboard. tab_id: The ID of the tab (from list_dashboard_tabs).

Returns: A list of dashcards on the given tab with layout and card metadata.

add_card_to_dashboardA

Add an existing card to a dashboard at a specified position and size.

Args: dashboard_id: The ID of the dashboard to add the card to. card_id: The ID of the card to add. col: Column position on the dashboard grid (default: 0). row: Row position on the dashboard grid (default: 0). size_x: Width of the card in grid units (default: 6). size_y: Height of the card in grid units (default: 4).

Returns: The created dashboard card object.

update_dashboard_card_positionA

Reposition or resize a single card on a dashboard.

Only the provided fields are updated; omitted fields keep their current values.

Args: dashboard_id: The ID of the dashboard. dashcard_id: The ID of the dashcard (from get_dashboard_cards) to move or resize. col: New column position on the dashboard grid. row: New row position on the dashboard grid. size_x: New width in grid units. size_y: New height in grid units.

Returns: The updated dashboard object.

reposition_dashboard_cardsA

Reposition and/or resize multiple cards on a dashboard in a single update.

Use this to rearrange a dashboard layout atomically. Any dashcards not included in positions keep their current layout.

Args: dashboard_id: The ID of the dashboard. positions: A list of layout updates. Each entry must include dashcard_id and may include any of col, row, size_x, size_y. Omitted fields on an entry keep their current values.

Returns: The updated dashboard object.

list_collectionsA

List all collections in Metabase that the current user has read permissions for.

Args: archived: If true, return only archived collections. exclude_other_user_collections: If true, hide other users' personal collections. namespace: Filter collections by namespace (e.g. "snippets" for snippet folders). personal_only: If true, return only personal collections (where personal_owner_id is not null).

Returns: Dictionary containing all collections with their metadata.

create_collectionA

Create a new collection in Metabase.

Args: name: Name of the collection. description: Optional description. color: Optional color for the collection. parent_id: Optional parent collection ID.

Returns: The created collection object.

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/voducdan/matebase-mcp'

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