All tools
M
by Metabase
Run a SQL query
Runs a native SQL query against a connected database and returns the rows.
Updated Sep 27, 2026Available asMCP
Description
Needs native-query permission on the target database.
run-sql-query.md
Run a SQL query
Runs a native SQL query against a connected database and returns the rows.
Needs native-query permission on the target database.
Set up
Use the first option your agent supports.
MCP (official, remote)
Add this server to your agent's MCP settings, then sign in when asked.
{ "mcpServers": { "metabase": { "url": "https://{your-metabase-url}/api/metabase-mcp" } } }
Call the MCP tool execute_sql.
Server URL: https://{your-metabase-url}/api/metabase-mcp
Before doing anything else, make one read-only call to confirm access.
Rules
- Ask the user before anything that sends messages, costs money, or changes data.
- Never print API keys.
Built from these files in the repository
The layout and the rules come from lib/catalog/render-markdown.ts, the set-up wording from lib/catalog/render-access.ts.
Ways in
| Route | Source | Call | Required | Docs |
|---|---|---|---|---|
| Official · remote | execute_sql | OAuth | Docs |
Workflows using Run a SQL query
No workflows yet
No published workflow uses Run a SQL query yet.