Metabase MCP server for AI agents

Live

API KEY

BUSINESS INTELLIGENCE

Analytics

Metabase gives your agent business intelligence in each user's Metabase instance: run saved questions and SQL queries, build cards, dashboards, and collections, and read database metadata, segments, and timelines.

  • Per-user credentials: each call uses the actual user's API key, never a shared bot.
  • Encrypted per-tenant vault: AES-256, resolved at request time, never in LLM context.
  • Scoped before every call: pre-call scope check, 90-day SIEM-exportable audit chain.
Metabase
agent · Acme Q3
Run
Run the Weekly Signups question for the last 4 weeks.
S
metabase_card_query
146ms
Analytics agent
Weekly signups were 1,204, 1,318, 1,276, and 1,451. The last week is up 14% on the week before.
Sources: Metabase, 1 saved question
metabase
4 rows
18:29
Message Claude...

Tools your analytics agent reaches for on Metabase, scoped per user.

CALL ANY TOOL
77 tools for business intelligence in Metabase: run saved questions and SQL queries, create and update cards, dashboards, and collections, and read database, table, and field metadata.
metabase_action_execute
Execute action
Run an action, which writes to the connected database (insert, update, delete, or custom SQL). Returns the action's result, such as rows-affected or created-row. Get the parameter IDs from metabase_action_get first. This changes data in the source database.
Parameters
Name
Type
Required
Description
action_id
integer
Required
ID of the action to run, from metabase_actions_list.
parameters
object
Optional
Parameter values keyed by parameter ID (from metabase_action_get). Example: {"id": 17, "status": "shipped"}.
metabase_action_get
Get action
metabase_actions_list
List actions
metabase_card_copy
Copy card
metabase_card_create
Create card
metabase_card_delete
Delete card
metabase_card_query
Query card
metabase_card_update
Update card
metabase_cards_list
List cards
metabase_collection_get
Get collection
metabase_collections_list
List collections
metabase_dashboard_create
Create dashboard
metabase_dashboard_delete
Delete dashboard
metabase_dashboard_query_metadata_get
Get dashboard query metadata
metabase_dashboard_update
Update dashboard
metabase_database_rescan_values
Database rescan values
metabase_database_schemas_list
List database schemas
metabase_database_sync_schema
Database sync schema
metabase_field_summary_get
Get field summary
metabase_native_query_run
Run native query
metabase_notification_send
Send notification
metabase_notifications_list
List notifications
metabase_search
Search
metabase_segment_get
Get segment
metabase_segment_update
Update segment
metabase_segments_list
List segments
metabase_snippet_create
Create snippet
metabase_table_update
Update table
metabase_tables_list
List tables
metabase_timeline_event_get
Get timeline event

For more tools, view docs.

Build your Agent
Same auth pattern across LangChain, OpenAI, Anthropic, and Google ADK.
Python · LlamaIndex
import { ScalekitClient } from "@scalekit-sdk/node";
import { createReactAgent } from "@langchain/langgraph/prebuilt";

const sk = new ScalekitClient(env.SCALEKIT_ENV_URL, env.SCALEKIT_CLIENT_ID, env.SCALEKIT_CLIENT_SECRET);

// Metabase tools scoped to this user
const { tools } = await sk.tools.listScopedTools("user_123", {
  filter: { connectionNames: ["metabase"], toolNames: [
    "metabase_search",
    "metabase_card_query",
    "metabase_native_query_run"] },
  pageSize: 100,
});

const agent = createReactAgent({ llm, tools });
await agent.invoke({ messages: [{ role: "user", content: "Run the Weekly Signups question and compare it with last month" }] });
import OpenAI from "openai";
import { ScalekitClient } from "@scalekit-sdk/node";

const sk = new ScalekitClient(env.SCALEKIT_ENV_URL, env.SCALEKIT_CLIENT_ID, env.SCALEKIT_CLIENT_SECRET);
const openai = new OpenAI();

const { tools } = await sk.tools.listScopedTools("user_123", {
  filter: { connectionNames: ["metabase"] }, pageSize: 100,
});

const res = await openai.chat.completions.create({
  model: "gpt-5",
  messages: [{ role: "user", content: "Run the Weekly Signups question and compare it with last month" }],
  tools,
});

// Execute the tool call with the user's vaulted Metabase API key
await sk.tools.executeTool(res.choices[0].message.tool_calls[0], "user_123");
import Anthropic from "@anthropic-ai/sdk";
import { ScalekitClient } from "@scalekit-sdk/node";

const sk = new ScalekitClient(env.SCALEKIT_ENV_URL, env.SCALEKIT_CLIENT_ID, env.SCALEKIT_CLIENT_SECRET);
const anthropic = new Anthropic();

const { tools } = await sk.tools.listScopedTools("user_123", {
  filter: { connectionNames: ["metabase"] }, pageSize: 100,
});

const msg = await anthropic.messages.create({
  model: "claude-sonnet-5",
  max_tokens: 1024,
  messages: [{ role: "user", content: "Run the Weekly Signups question and compare it with last month" }],
  tools,
});

// Tool call runs with the user's vaulted Metabase API key
await sk.tools.executeTool(msg.content, "user_123");
import { Agent } from "@google/adk/agents";
import { ScalekitClient } from "@scalekit-sdk/node";

const sk = new ScalekitClient(env.SCALEKIT_ENV_URL, env.SCALEKIT_CLIENT_ID, env.SCALEKIT_CLIENT_SECRET);

const { tools } = await sk.tools.listScopedTools("user_123", {
  filter: { connectionNames: ["metabase"] }, pageSize: 100,
});

const agent = new Agent({
  name: "analytics_agent",
  model: "gemini-2.5-pro",
  instruction: "Metabase tools scoped to this user",
  tools,
});

await agent.run("Run the Weekly Signups question and compare it with last month");
Try these prompts
Copy any prompt into your agent. Each maps directly to a Metabase tool. Click to copy, paste into your agent, done.
Questions and queries
Copy the prompt
Copied
Run the Weekly Signups saved question.
Copy the prompt
Copied
Run a SQL query counting orders by status in the analytics database.
Copy the prompt
Copied
Search Metabase for anything about churn.
Dashboards and collections
Copy the prompt
Copied
Create a dashboard called Q4 Growth in the Marketing collection.
Copy the prompt
Copied
List the most viewed dashboards and questions.
Copy the prompt
Copied
Copy the Sales Overview dashboard for the EMEA team.
Data model
Copy the prompt
Copied
List the tables in the public schema of the warehouse database.
Copy the prompt
Copied
Sync the schema so Metabase picks up the new events table.
Copy the prompt
Copied
Add a launch event to the Product Launches timeline for March 4.
SEE HOW AUTH WORKS
Each user connects their own Metabase API key once, and Scalekit sends it with every call. Keys stay vaulted, every call is scope checked, and every action is logged.
1
Authorize
Your user connects
Metabase
once. We tie it to their identity and the meetings they approved — no shared bot account, no org-wide access
Who:
user ‘A’
when:
Once per user
access:
Limited to user
2
Store
Their
Metabase
token lives in a vault scoped to them. User A's meetings are never reachable by an agent acting for user B, even on the same connection
vault:
encrypted
scope:
per-user
tokens:
auto-refreshed
3
Resolve
When your agent calls a
Metabase
tool, we fetch the right token server-side. It never touches your agent, never appears in the LLM context, never shows up in your logs
speed:
~40ms
check:
before every call
seen by:
nobody
4
Audit
Every
Metabase
tool call is logged — who triggered it, which meeting was fetched, what came back. 90 days of history, tied to the user who authorized it
history:
90 days
export:
SIEM-ready
logged:
every call
Test other agents
See the same per-user auth pattern across other analytics and BI connectors.
GTM and RevOps Teams
Revenue forecast commentary
Pulls open pipeline from Salesforce and HubSpot, calculates coverage against quota, flags at-risk stages, posts commentary to Slack, and logs every snapshot to Google Sheets.
GTM and RevOps Teams
Competitive intelligence briefing agent
Scans Gong calls for competitor mentions, matches each one to its Notion battlecard, and DMs every affected rep a single Slack digest per cycle. Every call runs as the PMM who owns the briefing, never a shared bot.
Test other agents
See the same per-user auth pattern across other analytics and BI connectors.
GTM
Revenue forecast agent
Score pipeline coverage against quota across Salesforce and HubSpot, post forecast commentary to Slack, log snapshots to Sheets.
GTM
Competitive intelligence briefing agent
Scan Gong calls for competitor mentions, match each one to its Notion battlecard, and DM every affected rep a single Slack digest.
Why Scalekit
Secure your agent's access. Connectors ship in minutes
01.
Shared tokens break per-user analytics
A shared Metabase API key looks fine in a demo. In production every query and dashboard change looks like one service account, and you cannot tell which user triggered it. Scalekit resolves the credential of the actual user who triggered the agent, never a shared bot.
// shared key
audit → bot_service_account

// scalekit
audit → user_abc ✓
02.
Authentication is not authorization
03.
Multi-tenancy is architectural
04.
Metabase today. Ten connectors tomorrow.
“Our agents act across Salesforce, Gong, Google Drive, and more, on behalf of every customer. Scalekit behind the scenes meant we can keep adding tools without ever rebuilding how credentials or tool calling work.”
Venu Madhav Kattagoni
Head of Engineering / Von
FAQs
Frequently Asked Questions
Does the agent access Metabase as the user or through a shared key?
As the user. Each user connects their own Metabase API key once, and Scalekit sends it with every call. Audit logs attribute every query and dashboard change to that user, not a shared service account.
Where is the Metabase API key stored?
In Scalekit's managed AES-256 token vault, namespaced per tenant. To rotate it, the user reconnects with a new API key. Revocation is a single dashboard action. Credentials never appear in prompts, logs, or LLM context.
Can I limit what the agent does in Metabase?
Yes. Filter by tool name in listScopedTools to expose only what you want, for example the read and query tools without metabase_action_execute, which writes to the connected database, or metabase_card_delete and metabase_dashboard_delete, which cannot be undone. Scalekit also enforces scope checks before every API call.
What happens when a user revokes Metabase access?
The connection is invalidated on the next tool call. Subsequent requests for that user fail closed with a clear error. Other users in the tenant remain unaffected. The event is logged for audit.
Can the agent run SQL against my databases through Metabase?
Yes. metabase_native_query_run runs a SQL query against a connected database without saving it, and metabase_query_run runs any Metabase query object. Queries run with the access of the Metabase user the API key acts as, which metabase_user_current_get returns.
Start in your coding agent
Up and running in one command
Install the Scalekit skill in your editor of choice. Connector, auth, tools, prompt, all wired up
Claude Code REPL
/plugin marketplace add scalekit-inc/claude-code-authstack
/plugin install agentkit@scalekit-auth-stack
Cursor Code REPL
# ~/.cursor/mcp.json
{
""mcpServers"": {
""metabase"": {
""url"": ""https://mcp.scalekit.com/metabase"",
""headers"": { ""Authorization"": ""Bearer $SCALEKIT_TOKEN"" }
}
}
}
Codex Code REPL
# ~/.codex/config.toml
[mcp_servers.metabase]
url = ""https://mcp.scalekit.com/metabase""
auth_env = ""SCALEKIT_TOKEN""
Copilot Code REPL
# .vscode/mcp.json
{
""servers"": {
""metabase"": {
""url"": ""https://mcp.scalekit.com/metabase"",
""type"": ""http""
}
}
}