Skip to main content
Glama
hluaguo

metabase-mcp

by hluaguo

Metabase MCP Server - Connect AI Assistants to Your Metabase Analytics

PyPI version Python 3.12+ License: MIT FastMCP

A high-performance Model Context Protocol (MCP) server for Metabase, enabling AI assistants like Claude, Cursor, and other MCP clients to interact seamlessly with your Metabase instance. Query databases, execute SQL, manage dashboards, and automate analytics workflows with natural language through AI-powered database operations.

Perfect for: Data analysts, developers, and teams looking to integrate AI assistants with their Metabase business intelligence platform for automated SQL queries, dashboard management, and data exploration.

Key Features

Database Operations

  • List Databases: Browse all configured Metabase databases

  • Table Discovery: Explore tables with metadata and descriptions

  • Field Inspection: Get detailed field/column information with smart pagination

Query & Analytics

  • SQL Execution: Run native SQL queries with parameter support and templating

  • MongoDB Support: Execute native MongoDB queries with automatic JSON conversion for aggregation pipelines

  • Card Management: Execute, create, and manage Metabase questions/cards (SQL and MongoDB)

  • Collection Organization: Create and manage collections for better organization

  • Natural Language Queries: Let AI assistants translate questions into SQL or MongoDB queries

Authentication & Security

  • API Key Support: Secure authentication via Metabase API keys (recommended)

  • Session-based Auth: Alternative email/password authentication

  • Environment Variables: Secure credential management via .env files

AI Assistant Integration

  • Claude Desktop: Native integration with Anthropic's Claude AI

  • Cursor IDE: Seamless integration for AI-assisted development

  • Any MCP Client: Compatible with all Model Context Protocol clients

Enhanced Performance & Reliability

  • Context-aware Logging: Real-time logging with debug, info, warning, and error levels visible to AI clients

  • Proper Error Handling: FastMCP ToolError exceptions for better error messages and debugging

  • Middleware Stack: Built-in error handling and logging middleware for production reliability

  • Best Practices: Follows latest FastMCP patterns with duplicate prevention and clean configuration

  • Modern Python: Uses Python 3.12+ type hints (| syntax) for better type safety

Related MCP server: Metabase MCP Server

Quick Start

Prerequisites

  • Python 3.12+

  • Metabase instance with API access

  • uvx or uv package manager

Installation

Option 1: Using uvx (Easiest - No Installation Required)

# Run directly without installing (like npx for Python)
uvx metabase-mcp

# With environment variables
METABASE_URL=https://your-instance.com METABASE_API_KEY=your-key uvx metabase-mcp

Option 2: Install from PyPI

# Install globally
uv tool install metabase-mcp

# Or with pip
pip install metabase-mcp

# Then run
metabase-mcp

Option 3: Development Setup (From Source)

# Clone the repository
git clone https://github.com/cheukyin175/metabase-mcp.git
cd metabase-mcp

# Install dependencies
uv sync

# Run the server
uv run python server.py

Configuration

Create a .env file with your Metabase credentials:

cp .env.example .env

Configuration Options

METABASE_URL=https://your-metabase-instance.com
METABASE_API_KEY=your-api-key-here

Option 2: Email/Password Authentication

METABASE_URL=https://your-metabase-instance.com
METABASE_USER_EMAIL=your-email@example.com
METABASE_PASSWORD=your-password

Optional: Metabase API HTTP Timeout

METABASE_HTTP_TIMEOUT=30.0  # Default: 30.0 seconds

Optional: Custom Host/Port for SSE/HTTP

HOST=localhost  # Default: 0.0.0.0
PORT=9000      # Default: 8000

Usage

Run the Server

Quick Start (No Setup Required)

# Run directly with uvx
uvx metabase-mcp

# With custom Metabase instance
METABASE_URL=https://your-instance.com METABASE_API_KEY=your-key uvx metabase-mcp

From Source (Development)

# STDIO transport (default)
uv run python server.py

# SSE transport (uses HOST=0.0.0.0, PORT=8000 by default)
uv run python server.py --sse

# HTTP transport (uses HOST=0.0.0.0, PORT=8000 by default)
uv run python server.py --http

# Custom host and port via environment variables
HOST=localhost PORT=9000 uv run python server.py --sse
HOST=192.168.1.100 PORT=8080 uv run python server.py --http

Cursor Integration

You can manually configure Cursor by editing your Cursor settings.

For SSE transport: You must start the server before using Cursor:

uv run python server.py --sse

Claude Desktop Integration

Add this to ~/Library/Application Support/Claude/claude_desktop_config.json:

{
    "mcpServers": {
        "metabase-mcp": {
            "command": "uvx",
            "args": ["metabase-mcp"],
            "env": {
                "METABASE_URL": "https://your-metabase-instance.com",
                "METABASE_API_KEY": "your-api-key-here"
            }
        }
    }
}

Option 2: Using Local Installation

If you've cloned the repository:

{
    "mcpServers": {
        "metabase-mcp": {
            "command": "uv",
            "args": [
                "run",
                "--directory",
                "/absolute/path/to/metabase-mcp",
                "python",
                "server.py"
            ],
            "env": {
                "METABASE_URL": "https://your-metabase-instance.com",
                "METABASE_API_KEY": "your-api-key-here"
            }
        }
    }
}

Option 3: Using FastMCP CLI

fastmcp install server.py -n "Metabase MCP"

Available Tools

Database Operations

Tool

Description

list_databases

List all configured databases in Metabase

list_tables

Get all tables in a specific database with metadata

get_table_fields

Retrieve field/column information for a table

Query Operations

Tool

Description

execute_query

Execute native SQL queries with parameter support

execute_mongodb_query

Execute native MongoDB queries with automatic JSON conversion for aggregation pipelines

execute_card

Run saved Metabase questions/cards

Card Management

Tool

Description

list_cards

List all saved questions/cards

create_card

Create new questions/cards with SQL queries

create_mongodb_card

Create new MongoDB questions/cards with native query support

Collection Management

Tool

Description

list_collections

Browse all collections

create_collection

Create new collections for organization

Transport Methods

The server supports multiple transport methods:

  • STDIO (default): For IDE integration (Cursor, Claude Desktop)

  • SSE: Server-Sent Events for web applications

  • HTTP: Standard HTTP for API access

uv run python server.py                        # STDIO (default)
uv run python server.py --sse                  # SSE (HOST=0.0.0.0, PORT=8000)
uv run python server.py --http                 # HTTP (HOST=0.0.0.0, PORT=8000)
HOST=localhost PORT=9000 uv run python server.py --sse   # Custom host/port

Development

Setup Development Environment

# Install with dev dependencies
uv sync --group dev

# Or with pip
pip install -r requirements-dev.txt

Code Quality

# Run linting
uv run ruff check .

# Format code
uv run ruff format .

# Type checking
uv run mypy server.py

Usage Examples

Query Examples

# List all databases
databases = await list_databases()

# Execute a SQL query
result = await execute_query(
    database_id=1,
    query="SELECT * FROM users LIMIT 10"
)

# Create and run a card
card = await create_card(
    name="Active Users Report",
    database_id=1,
    query="SELECT COUNT(*) FROM users WHERE active = true",
    collection_id=2
)

Project Structure

metabase-mcp/
├── server.py                 # Main MCP server implementation
├── pyproject.toml           # Project configuration and dependencies
└── .env.example             # Environment variables template

Contributing

Contributions are welcome! Please feel free to submit a Pull Request.

License

MIT License - see LICENSE file for details

Resources

Keywords & Topics

metabase mcp model-context-protocol claude cursor ai-assistant fastmcp sql database analytics business-intelligence bi data-analysis anthropic llm python automation api data-science query-builder natural-language-sql

Star History

If you find this project useful, please consider giving it a star! It helps others discover this tool.

Use Cases

  • Natural Language Database Queries: Ask Claude to query your Metabase databases using plain English

  • Automated Report Generation: Use AI to create and manage Metabase cards and collections

  • Data Exploration: Let AI assistants help you discover insights from your data

  • SQL Query Assistance: Get help writing and optimizing SQL queries through AI

  • Dashboard Management: Automate the creation and organization of Metabase dashboards

  • Data Analysis Workflows: Integrate AI-powered analytics into your development workflow

Available Tools

15 tools
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.

ParametersJSON Schema
NameRequiredDescriptionDefault
colNo
rowNo
size_xNo
size_yNo
card_idYes
dashboard_idYes

Output Schema

ParametersJSON Schema
NameRequiredDescription

No output parameters

TDQS

A4.3/5.0
Behavior3/5

Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?

No annotations are provided, so the description carries the full burden of behavioral disclosure. It describes the inputs and outputs but does not mention side effects, authentication needs, constraints (e.g., card must exist, dashboard must exist, or duplicate handling), or what happens on failure. This is adequate but minimal.

Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.

Conciseness5/5

Is the description appropriately sized, front-loaded, and free of redundancy?

The description is efficiently structured as a docstring with a brief summary followed by Args and Returns sections. Each line is necessary, no fluff, and the information is front-loaded with the main action.

Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.

Completeness4/5

Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?

The tool has 6 parameters, an output schema, and moderate complexity. The description covers inputs and the returned object. It lacks details about the grid coordinate system bounds, error cases (e.g., invalid position), or behavior when card already exists. These are minor gaps but do not severely hinder usage.

Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.

Parameters5/5

Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?

The description provides meaningful explanations for all 6 parameters, including their role (e.g., 'Column position on the dashboard grid') and defaults. This adds significant value beyond the schema, which has 0% description coverage. Each parameter is clearly defined, enabling correct usage.

Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.

Purpose5/5

Does the description clearly state what the tool does and how it differs from similar tools?

The description clearly states the action: adding an existing card to a dashboard at a specified position and size. It distinguishes itself from siblings like create_card (which creates new cards) and get_dashboard_cards (which lists existing cards), making its purpose specific and unambiguous.

Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.

Usage Guidelines4/5

Does the description explain when to use this tool, when not to, or what alternatives exist?

The description provides clear parameter details and implies usage for adding cards to dashboards, but it does not explicitly state when to use this tool versus alternatives like update_card_display or context about prerequisites. However, the context is clear enough for an agent to infer appropriate usage.

Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.

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.

ParametersJSON Schema
NameRequiredDescriptionDefault
nameYes
queryYes
database_idYes
descriptionNo
collection_idNo
visualization_settingsNo

Output Schema

ParametersJSON Schema
NameRequiredDescription

No output parameters

TDQS

A3.5/5.0
Behavior2/5

Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?

No annotations provided, so description carries full burden. It states 'Create' (write operation) and lists required fields, but lacks details on permissions, side effects, idempotency, rate limits, or validation behavior. Returns the created object, but no error scenarios.

Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.

Conciseness5/5

Is the description appropriately sized, front-loaded, and free of redundancy?

Two clear sections (Args and Returns) with no extraneous text. Each sentence serves a purpose. Highly efficient and front-loaded.

Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.

Completeness3/5

Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?

Given 6 parameters, 3 required, and no annotations, the description covers creation essentials but lacks behavioral context. Output schema exists (per context), so return description is sufficient. Could improve by noting that collection_id must exist, or that query must be valid SQL.

Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.

Parameters4/5

Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?

Schema coverage is 0%, but description provides brief explanations for each parameter (e.g., 'SQL query for the card', 'Optional description'). This adds meaning beyond the raw schema, though details like query syntax or visualization object format are absent.

Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.

Purpose5/5

Does the description clearly state what the tool does and how it differs from similar tools?

Description clearly states 'Create a new question/card in Metabase' with specific verb 'Create' and resource 'card'. It distinguishes from siblings like 'create_mongodb_card' and 'add_card_to_dashboard' by focusing on standard SQL-based card creation.

Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.

Usage Guidelines2/5

Does the description explain when to use this tool, when not to, or what alternatives exist?

No guidance on when to use this tool versus alternatives. For example, it doesn't specify that this tool is for SQL-based queries and that 'create_mongodb_card' should be used for MongoDB. Missing exclusions or context.

Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.

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.

ParametersJSON Schema
NameRequiredDescriptionDefault
nameYes
colorNo
parent_idNo
descriptionNo

Output Schema

ParametersJSON Schema
NameRequiredDescription

No output parameters

TDQS

B3.3/5.0
Behavior2/5

Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?

With no annotations, the description bears full responsibility for behavioral disclosure. It only indicates creation, but lacks details on permissions, side effects, idempotency, or uniqueness constraints. The description is minimal for a mutation tool.

Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.

Conciseness5/5

Is the description appropriately sized, front-loaded, and free of redundancy?

The description is concise and well-structured: a one-line summary followed by a bulleted Args list and a Returns line. Every sentence serves a purpose with no redundancy.

Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.

Completeness4/5

Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?

For a simple create tool with an output schema, the description covers the action and return value adequately. However, it omits potential error conditions or uniqueness requirements, which would improve completeness.

Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.

Parameters4/5

Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?

The input schema has no property descriptions (0% coverage), but the description explicitly explains each parameter's purpose (e.g., 'name: Name of the collection'). This adds meaningful context beyond the schema, though format or constraints are not detailed.

Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.

Purpose4/5

Does the description clearly state what the tool does and how it differs from similar tools?

The description clearly states 'Create a new collection in Metabase,' specifying the verb (create) and resource (collection). It distinguishes itself from sibling tools like list_collections and create_card, though it does not explicitly contrast them.

Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.

Usage Guidelines2/5

Does the description explain when to use this tool, when not to, or what alternatives exist?

The description provides no guidance on when to use this tool versus alternatives, such as when to create a collection vs. a card. No prerequisites, limitations, or exclusions are mentioned.

Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.

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.

ParametersJSON Schema
NameRequiredDescriptionDefault
nameYes
queryYes
collectionYes
database_idYes
descriptionNo
collection_idNo
visualization_settingsNo

Output Schema

ParametersJSON Schema
NameRequiredDescription

No output parameters

TDQS

A4/5.0
Behavior3/5

Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?

No annotations are provided, so the description carries the full burden. It explains the creation action and return value but does not disclose side effects, permissions, idempotency, or error conditions. The behavioral transparency is adequate but not thorough.

Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.

Conciseness5/5

Is the description appropriately sized, front-loaded, and free of redundancy?

The description is efficiently structured with Args/Returns sections, covering all parameters and return value in a concise manner without superfluous information. Every sentence adds value.

Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.

Completeness4/5

Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?

Given the tool has 7 parameters and an output schema, the description covers the core purpose, parameters, and return value. However, it lacks details on error handling, prerequisites, or distinct use cases relative to sibling tools, leaving some gaps.

Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.

Parameters4/5

Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?

With 0% schema description coverage, the description compensates by listing each parameter with a brief explanation (e.g., 'MongoDB query string (aggregation pipeline or query)'). The descriptions add meaning beyond the raw schema, though some could be more detailed (e.g., format of 'query').

Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.

Purpose5/5

Does the description clearly state what the tool does and how it differs from similar tools?

The description clearly states 'Create a new MongoDB question/card in Metabase,' specifying the verb (Create), resource (MongoDB question/card), and context (Metabase). This distinguishes it from sibling tools like 'create_card' which may target other databases.

Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.

Usage Guidelines3/5

Does the description explain when to use this tool, when not to, or what alternatives exist?

The description implies usage for creating MongoDB cards but does not explicitly compare with alternatives like 'execute_mongodb_query' (run without saving) or 'create_card' (generic). No 'when not to use' guidance is provided.

Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.

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.

ParametersJSON Schema
NameRequiredDescriptionDefault
card_idYes
parametersNo

Output Schema

ParametersJSON Schema
NameRequiredDescription

No output parameters

TDQS

B3.1/5.0
Behavior2/5

Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?

No annotations are provided, so the description carries full burden. It only states that results are returned, without disclosing side effects, authentication needs, rate limits, or whether card execution triggers mutations. The behavior beyond the basic action is opaque.

Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.

Conciseness4/5

Is the description appropriately sized, front-loaded, and free of redundancy?

The description is concise at 5 lines with clear Args and Returns sections. The first sentence is front-loaded with the core purpose. Minor redundancy exists (e.g., 'The ID of the card to execute' is implied), but overall efficient.

Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.

Completeness3/5

Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?

With 2 parameters, no annotations, and an output schema (unseen), the description leaves gaps: it doesn't hint at the result structure (tabular, paginated) or when to use this tool vs. siblings. It is minimally adequate but not fully informative.

Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.

Parameters2/5

Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?

Schema description coverage is 0%, so the description must compensate. It adds minimal value: 'card_id' is labeled as ID, 'parameters' are 'optional for card execution'—nearly repeating the schema types. No details on parameter structure or allowed values are given.

Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.

Purpose5/5

Does the description clearly state what the tool does and how it differs from similar tools?

The description clearly states the verb 'execute', the resource 'saved Metabase question/card', and the outcome 'retrieve results'. This specificity distinguishes it from sibling tools like 'execute_query' (raw SQL) and 'create_card'.

Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.

Usage Guidelines2/5

Does the description explain when to use this tool, when not to, or what alternatives exist?

The description provides no guidance on when to use this tool versus alternatives. It doesn't mention when to prefer 'execute_card' over 'execute_query' or 'execute_mongodb_query', nor does it state prerequisites or exclusions.

Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.

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.

ParametersJSON Schema
NameRequiredDescriptionDefault
queryYes
collectionYes
database_idYes
native_parametersNo

Output Schema

ParametersJSON Schema
NameRequiredDescription

No output parameters

TDQS

A3.7/5.0
Behavior2/5

Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?

With no annotations, the description carries full burden. It only says 'Execute' and returns results, but omits behavioral traits such as whether the query is read-only (likely safe), mutability, side effects, error handling, or performance considerations.

Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.

Conciseness5/5

Is the description appropriately sized, front-loaded, and free of redundancy?

The description is concise, using a clear docstring format with Args and Returns sections. It front-loads the main purpose and avoids unnecessary words.

Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.

Completeness3/5

Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?

Given the complexity of MongoDB native queries and the presence of an output schema, the description covers basic parameters and return value. However, it lacks details on the query format, native_parameters usage, and typical response structure, which are important for correct invocation.

Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.

Parameters4/5

Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?

Schema coverage is 0%, so the description's parameter explanations add value. Each parameter (database_id, collection, query, native_parameters) is described in the docstring. However, the 'query' parameter format (aggregation pipeline or query object) is mentioned but could be more precise.

Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.

Purpose5/5

Does the description clearly state what the tool does and how it differs from similar tools?

The description clearly states 'Execute a MongoDB native query against a Metabase database,' specifying the verb (execute), resource (query), and context (MongoDB/ Metabase). This distinguishes it from siblings like execute_query (likely SQL) and execute_card (card execution).

Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.

Usage Guidelines3/5

Does the description explain when to use this tool, when not to, or what alternatives exist?

The description defines parameters but does not explicitly state when to use this tool over alternatives like execute_query or create_mongodb_card. It implies MongoDB usage but lacks explicit when-to-use or when-not-to-use guidance.

Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.

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.

ParametersJSON Schema
NameRequiredDescriptionDefault
queryYes
database_idYes
native_parametersNo

Output Schema

ParametersJSON Schema
NameRequiredDescription

No output parameters

TDQS

A3.5/5.0
Behavior2/5

Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?

With no annotations, the description carries full burden. It only states it executes SQL and returns results, without disclosing potential side effects (e.g., whether write operations are allowed), security implications, authentication needs, or rate limits. Critical behavioral context is missing.

Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.

Conciseness5/5

Is the description appropriately sized, front-loaded, and free of redundancy?

The description is extremely concise: a one-line purpose, then clearly labeled Args and Returns sections. Every sentence adds value, and there is no redundancy. It is well-structured and easily parsed.

Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.

Completeness3/5

Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?

Given the complexity of executing arbitrary SQL (3 parameters, potential write operations), the description lacks completeness. It does not explain return value structure (though output schema exists), error handling, or preconditions. However, it covers the basic purpose and parameters adequately for a simple tool.

Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.

Parameters4/5

Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?

The schema has 0% description coverage, so the description compensates by providing plain-language explanations for each parameter: database_id as 'The ID of the database to query', query as 'The SQL query to execute', and native_parameters as 'Optional parameters for the query'. This adds meaning beyond the bare types, though native_parameters could be more specific.

Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.

Purpose5/5

Does the description clearly state what the tool does and how it differs from similar tools?

The description clearly states the action ('Execute a native SQL query') and the resource ('Metabase database'), distinguishing it from siblings like execute_card (executes a saved card) and execute_mongodb_query (executes MongoDB queries).

Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.

Usage Guidelines2/5

Does the description explain when to use this tool, when not to, or what alternatives exist?

The description provides no guidance on when to use this tool versus alternatives (e.g., execute_card, or specific query tools). It does not mention constraints, prerequisites, or typical use cases, leaving the agent to infer context.

Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.

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.

ParametersJSON Schema
NameRequiredDescriptionDefault
dashboard_idYes

Output Schema

ParametersJSON Schema
NameRequiredDescription
resultYes

TDQS

B3.4/5.0
Behavior2/5

Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?

No annotations provided, so the description carries full burden. It implies a read operation but does not explicitly state non-destructiveness, authorization needs, or side effects. Minimal behavioral disclosure.

Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.

Conciseness5/5

Is the description appropriately sized, front-loaded, and free of redundancy?

Concise, well-structured with Args and Returns sections. Every sentence is informative, no fluff.

Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.

Completeness4/5

Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?

Tool is simple with one parameter and output schema exists. Description covers purpose and return fields well. Could mention error handling (e.g., invalid dashboard_id) but not critical.

Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.

Parameters3/5

Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?

Schema description coverage is 0%; description adds 'The ID of the dashboard' for the only parameter. Adds basic meaning but no additional details like source or constraints.

Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.

Purpose5/5

Does the description clearly state what the tool does and how it differs from similar tools?

The description clearly states it retrieves cards and layout for a specific dashboard, listing returned fields. It distinguishes from siblings like list_cards (no dashboard context or layout).

Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.

Usage Guidelines2/5

Does the description explain when to use this tool, when not to, or what alternatives exist?

No guidance on when to use this tool versus alternatives (e.g., list_cards). The description does not mention when not to use it or provide context for selection.

Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.

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.

ParametersJSON Schema
NameRequiredDescriptionDefault
limitNo
table_idYes

Output Schema

ParametersJSON Schema
NameRequiredDescription

No output parameters

TDQS

A4/5.0
Behavior3/5

Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?

With no annotations, the description carries full burden. It discloses the return type ('dictionary with field metadata') and truncation behavior, but lacks details on potential errors, authentication requirements, or performance characteristics. Minimal but adequate.

Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.

Conciseness5/5

Is the description appropriately sized, front-loaded, and free of redundancy?

The description is extremely concise, with two sentences and a formatted arg list. Every sentence adds value: purpose, parameters, and return behavior. No filler or redundancy.

Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.

Completeness4/5

Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?

Given the tool's simplicity (2 params, output schema exists), the description covers purpose, parameter details, return type, and truncation. However, it does not elaborate on what 'field metadata' includes or the exact behavior of truncation, leaving minor gaps.

Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.

Parameters4/5

Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?

Schema description coverage is 0%, so the description compensates by explaining 'table_id: The ID of the table' and 'limit: Maximum number of fields to return (default: 20)'. This adds meaningful context beyond the raw schema structure.

Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.

Purpose5/5

Does the description clearly state what the tool does and how it differs from similar tools?

The description clearly states the verb 'get' and the resource 'fields/columns in a specific table'. It distinctly differentiates from sibling tools like list_tables and list_databases by targeting table fields specifically.

Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.

Usage Guidelines3/5

Does the description explain when to use this tool, when not to, or what alternatives exist?

No explicit guidelines on when to use this tool versus alternatives. Although the name and description imply it's for retrieving column metadata from a table, there is no mention of prerequisites, when to use list_tables first, or scenarios where other tools might be more appropriate.

Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.

list_cardsA

List all saved questions/cards in Metabase.

Returns: Dictionary containing all cards with their metadata.

ParametersJSON Schema
NameRequiredDescriptionDefault

No parameters

Output Schema

ParametersJSON Schema
NameRequiredDescription

No output parameters

TDQS

A4.3/5.0
Behavior4/5

Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?

No annotations are provided, so the description carries the full burden. It discloses the operation is a non-destructive read ('List'), and specifies the return format ('Dictionary containing all cards with their metadata'). This is sufficient for a simple tool.

Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.

Conciseness5/5

Is the description appropriately sized, front-loaded, and free of redundancy?

Two short, front-loaded sentences with no superfluous information. Every sentence adds value: the first describes purpose, the second describes return value.

Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.

Completeness5/5

Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?

Given no parameters and a simple list-all behavior, the description fully covers purpose and output. The presence of an output schema is implied by the return description, and no additional context is needed.

Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.

Parameters4/5

Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?

There are no parameters (schema coverage is 100% trivially). The description adds no parameter info because none exist. Baseline for zero parameters is 4.

Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.

Purpose5/5

Does the description clearly state what the tool does and how it differs from similar tools?

The description clearly states the action as 'List' and the resource as 'saved questions/cards in Metabase'. It distinguishes itself from sibling tools like create_card or execute_card by focusing purely on retrieval.

Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.

Usage Guidelines3/5

Does the description explain when to use this tool, when not to, or what alternatives exist?

The description implies usage as a simple listing tool but provides no explicit guidance on when to use it versus alternatives like get_dashboard_cards or search queries. The purpose is clear, but differentiation from similar tools is not addressed.

Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.

list_collectionsA

List all collections in Metabase.

Returns: Dictionary containing all collections with their metadata.

ParametersJSON Schema
NameRequiredDescriptionDefault

No parameters

Output Schema

ParametersJSON Schema
NameRequiredDescription

No output parameters

TDQS

A4.3/5.0
Behavior4/5

Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?

No annotations provided, so description carries full burden. It correctly states a read operation and mentions return type, but could add detail about metadata scope.

Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.

Conciseness5/5

Is the description appropriately sized, front-loaded, and free of redundancy?

Two sentences, no wasted words, front-loaded with purpose.

Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.

Completeness5/5

Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?

Output schema exists, so description need not detail return format. The simple description is complete for a straightforward list operation.

Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.

Parameters4/5

Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?

No parameters exist. Schema covers all. Description adds no new semantics but baseline is 4 for zero-parameter tools.

Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.

Purpose5/5

Does the description clearly state what the tool does and how it differs from similar tools?

The description clearly states it lists all collections in Metabase, using a specific verb and resource. It distinguishes from sibling tools like create_collection.

Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.

Usage Guidelines3/5

Does the description explain when to use this tool, when not to, or what alternatives exist?

Usage is implied as a general listing tool, but no explicit guidance is given on when to use it vs alternatives, or when not to use it.

Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.

list_dashboardsA

List all dashboards in Metabase.

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

ParametersJSON Schema
NameRequiredDescriptionDefault

No parameters

Output Schema

ParametersJSON Schema
NameRequiredDescription
resultYes

TDQS

A3.9/5.0
Behavior3/5

Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?

No annotations provided, but the description adds useful metadata about the return list (id, name, description, etc.). However, no disclosure of potential side effects, permissions, or performance considerations.

Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.

Conciseness4/5

Is the description appropriately sized, front-loaded, and free of redundancy?

Two concise sentences, front-loaded with the main purpose. Could be slightly tighter, but no redundant information.

Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.

Completeness4/5

Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?

For a simple tool with no parameters and an output schema, the description adequately covers purpose and return format. However, missing usage context like whether it requires authentication or handles large result sets.

Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.

Parameters4/5

Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?

Zero parameters with 100% schema coverage; the description adds value by explaining the return fields, which the schema doesn't specify. This is informative beyond the schema.

Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.

Purpose5/5

Does the description clearly state what the tool does and how it differs from similar tools?

The description clearly states 'List all dashboards' with a specific verb and resource, distinguishing it from siblings like list_cards and list_collections which list different entities.

Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.

Usage Guidelines3/5

Does the description explain when to use this tool, when not to, or what alternatives exist?

No explicit guidance on when or when not to use this tool. The description implies a simple listing use case, but lacks exclusions or alternatives.

Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.

list_databasesA

List all databases configured in Metabase.

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

ParametersJSON Schema
NameRequiredDescriptionDefault

No parameters

Output Schema

ParametersJSON Schema
NameRequiredDescription

No output parameters

TDQS

A4.2/5.0
Behavior4/5

Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?

Descriptively states the return value (dictionary with metadata), providing behavioral context beyond the empty input schema, though no annotations exist to supplement.

Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.

Conciseness5/5

Is the description appropriately sized, front-loaded, and free of redundancy?

Extremely concise: two sentences with front-loaded action and minimal waste.

Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.

Completeness4/5

Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?

For a simple list tool with no parameters and an output schema, the description is adequate, but could optionally include more detail about metadata fields.

Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.

Parameters4/5

Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?

No parameters exist, so schema coverage is 100%; baseline for 0 params is 4, and description adds no additional parameter detail.

Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.

Purpose5/5

Does the description clearly state what the tool does and how it differs from similar tools?

Clearly states it lists all databases in Metabase, which is specific and distinguishes from sibling tools like list_cards or list_tables.

Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.

Usage Guidelines3/5

Does the description explain when to use this tool, when not to, or what alternatives exist?

No explicit guidance on when to use vs alternatives; the tool name and description imply usage for retrieving database list, but no when-not or alternative references.

Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.

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.

ParametersJSON Schema
NameRequiredDescriptionDefault
database_idYes

Output Schema

ParametersJSON Schema
NameRequiredDescription
resultYes

TDQS

A4/5.0
Behavior4/5

Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?

The description discloses the return format (formatted markdown table) and specifies the required input. While read-only behavior is implied, the lack of annotations makes this acceptable for a simple list operation.

Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.

Conciseness5/5

Is the description appropriately sized, front-loaded, and free of redundancy?

The description is brief and well-structured, including purpose, args, and returns in a clean format with no unnecessary words.

Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.

Completeness4/5

Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?

The description covers the core functionality, input, and output format. However, it lacks details on error handling or behavior with invalid database IDs, which would enhance completeness.

Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.

Parameters4/5

Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?

With 0% schema description coverage, the description compensates by explaining that database_id is 'the ID of the database to query', adding semantic meaning beyond the schema's type-only constraint.

Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.

Purpose5/5

Does the description clearly state what the tool does and how it differs from similar tools?

The description clearly states the verb 'list' and resource 'tables' scoped to a specific database, distinguishing it from sibling tools like list_databases or list_cards.

Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.

Usage Guidelines2/5

Does the description explain when to use this tool, when not to, or what alternatives exist?

No guidance on when to use this tool versus alternatives such as get_table_fields or list_databases. The description provides no exclusions or context for selection.

Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.

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.

ParametersJSON Schema
NameRequiredDescriptionDefault
card_idYes
displayYes
visualization_settingsNo

Output Schema

ParametersJSON Schema
NameRequiredDescription

No output parameters

TDQS

A3.8/5.0
Behavior3/5

Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?

With no annotations, the description carries full burden. It discloses that the tool updates display type and optionally accepts visualization settings, but does not mention side effects, permissions, destructive behavior, or error cases.

Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.

Conciseness5/5

Is the description appropriately sized, front-loaded, and free of redundancy?

The description is structured with clear Args and Returns headers. It is concise, with no extraneous text; every sentence serves a purpose in explaining the tool's function and parameters.

Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.

Completeness4/5

Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?

Given the tool has 3 parameters and an output schema exists, the description adequately covers inputs and states the return type. However, it omits potential error conditions and behavioral details that would be useful for an AI agent.

Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.

Parameters4/5

Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?

Input schema has 0% description coverage, so the description must compensate. It effectively explains all three parameters: card_id (ID to update), display (with multiple examples), and visualization_settings (optional). This adds meaning beyond the schema's type-only definitions.

Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.

Purpose5/5

Does the description clearly state what the tool does and how it differs from similar tools?

The description clearly states the tool updates the display type of a saved card in Metabase, using specific verb and resource. It distinguishes from siblings like create_card (create vs update) and execute_card (execute vs update).

Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.

Usage Guidelines2/5

Does the description explain when to use this tool, when not to, or what alternatives exist?

No guidance is provided on when to use this tool versus alternatives, nor any prerequisites like card existence or permissions. The description does not mention exclusions or alternatives.

Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.

Tool Schema Changelog

Recent tool additions, removals, and schema changes observed during successful MCP inspections. Dates show when Glama detected each change.

  1. 15 tool updatesv1.0.0
    • First observedadd_card_to_dashboard
    • First observedcreate_card
    • First observedcreate_collection
    • First observedcreate_mongodb_card
    • First observedexecute_card
    • First observedexecute_mongodb_query
    • First observedexecute_query
    • First observedget_dashboard_cards
    • First observedget_table_fields
    • First observedlist_cards
    • First observedlist_collections
    • First observedlist_dashboards
    • First observedlist_databases
    • First observedlist_tables
    • First observedupdate_card_display

TDQS

A3.8/5.0
Disambiguation5/5

Each tool targets a distinct resource and action (e.g., create vs execute vs list for cards, queries, collections), and even similar tools like create_card and create_mongodb_card are clearly differentiated by database type.

Naming Consistency5/5

All tools follow a consistent verb_noun pattern (e.g., create_card, list_dashboards, execute_query) with underscores, making the API predictable and easy to navigate.

Tool Count5/5

With 15 tools covering card management, collection organization, dashboard operations, database querying, and metadata listing, the count is well-scoped for a Metabase integration without being overwhelming.

Completeness3/5

The tool set covers core querying and listing but has notable gaps: no create_dashboard, no delete operations for cards/collections/dashboards, and limited card updates (only display type). These missing operations could hinder workflows that require full lifecycle management.

Maintenance

ActivityInactive
ResponsivenessSyncing

Resources

Unclaimed servers have limited discoverability.

Looking for Admin?

If you are the server author, to access and configure the admin panel.

Related MCP Connectors

Related MCP Servers

  • A
    license
    Not graded
    quality
    D
    maintenance
    Enables AI assistants to interact with Metabase analytics platform, allowing them to query databases, manage dashboards and cards, execute SQL queries, and access analytics data through natural language.
    47
    MIT
  • A
    license
    Not graded
    quality
    C
    maintenance
    Enables AI assistants to interact with Metabase analytics platform, allowing them to query databases, manage dashboards, execute SQL queries, and organize collections through natural language.
    47
    MIT
  • A
    license
    Not graded
    quality
    D
    maintenance
    Enables AI assistants to interact with Metabase analytics platform, allowing users to query databases, manage dashboards and cards, execute SQL queries, and access analytics data through natural language.
    47
    1
    MIT
  • A
    license
    Not graded
    quality
    D
    maintenance
    Enables AI assistants to interact with Metabase analytics platform, allowing them to query databases, execute SQL, manage dashboards and cards, and access analytics data through natural language.
    47
    MIT

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