Skip to main content
Glama
hluaguo

metabase-mcp

by hluaguo

Server Configuration

Describes the environment variables required to run the server.

NameRequiredDescriptionDefault
HOSTNoHost address for SSE/HTTP transport (default: 0.0.0.0)0.0.0.0
PORTNoPort for SSE/HTTP transport (default: 8000)8000
METABASE_URLYesThe URL of your Metabase instance
METABASE_API_KEYNoAPI key for authentication (recommended)
METABASE_PASSWORDNoPassword for session-based authentication
METABASE_USER_EMAILNoEmail for session-based authentication
METABASE_HTTP_TIMEOUTNoHTTP timeout in seconds (default: 30.0)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_queryA

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_queryA

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_cardsA

List all saved questions/cards in Metabase.

Returns: Dictionary containing all cards with their metadata.

execute_cardB

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_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.

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.

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.

list_collectionsA

List all collections in Metabase.

Returns: Dictionary containing all collections with their metadata.

create_collectionB

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

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