Skip to main content
Glama

Metabase MCP Server

by MikelA92

execute_native_query

Execute custom SQL queries directly against Metabase databases to retrieve data not available through existing saved cards. Run SELECT statements to perform ad-hoc analysis and extract specific information from your database.

Instructions

⚠️ [MODERATE RISK] Execute an ad-hoc native SQL query directly against a database. Use this when you need to run custom SQL that doesn't exist as a saved card. Risk: Moderate - executes arbitrary SQL (read-only with API key, but can be slow or resource-intensive). Always validate SQL before executing.

Input Schema

NameRequiredDescriptionDefault
databaseIdYesThe ID of the database to query
queryYesThe SQL query to execute (SELECT statements only recommended)

Input Schema (JSON Schema)

{ "properties": { "databaseId": { "description": "The ID of the database to query", "minimum": 1, "type": "integer" }, "query": { "description": "The SQL query to execute (SELECT statements only recommended)", "minLength": 1, "type": "string" } }, "required": [ "databaseId", "query" ], "type": "object" }

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

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