How to Connect Metabase to Claude Using MCP
Last updated Apr 24, 2026

What Changed in Metabase 60
Before April 2026, connecting an AI assistant to Metabase required community-built packages that needed your Metabase username, password, or a manually created API key stored in a config file. That setup worked but broke whenever Metabase updated its session API.
Metabase 60 shipped an official Model Context Protocol (MCP) server built into the platform itself. MCP is an open standard that AI clients like Claude, Cursor, and VS Code Copilot use to call external tools. The Metabase implementation means the platform becomes a first-class data tool that any MCP-aware AI assistant can query — without third-party packages or stored credentials.
As of launch, Metabase's MCP server supports Anthropic models only. You supply your own API key and pay directly for token usage.
What You Need Before Starting
- Metabase 60 or later (self-hosted or Metabase Cloud)
- Admin access to your Metabase instance
- An Anthropic API key (create one at console.anthropic.com)
- An MCP-compatible AI client: Claude Desktop, Claude Code, Cursor, or VS Code with the MCP extension
Step 1: Enable AI in Metabase Admin
Log in to your Metabase instance as an admin. Go to Admin > AI from the top navigation.
On the AI settings page:
- Select Anthropic as your provider from the dropdown.
- Paste your Anthropic API key into the API key field.
- Click Connect.
- Once connected, choose a model from the Model dropdown (Claude Sonnet is the default recommendation).
After you save, Metabase enables four features: Metabot (natural-language question answering), inline SQL generation, the MCP server, and the Agent API. Each has its own toggle if you want to enable them selectively.
Step 2: Enable the MCP Server Toggle
Still in Admin > AI, find the MCP Server section and flip the toggle to on. This activates the endpoint at:
https://your-metabase.example.com/api/mcp
The server uses OAuth 2.0 for authentication. Metabase runs its own embedded OAuth server, so you do not need to configure an external identity provider. When a user connects their AI client, they complete a short browser-based OAuth flow and the client stores a scoped token. All MCP queries run under that user's Metabase permissions — row-level security and collection access policies apply automatically.
Step 3: Connect Claude Desktop
Open your Claude Desktop config file:
- macOS:
~/Library/Application Support/Claude/claude_desktop_config.json - Windows:
%APPDATA%\Claude\claude_desktop_config.json
Add or update the mcpServers section:
{
"mcpServers": {
"metabase": {
"url": "https://your-metabase.example.com/api/mcp",
"transport": "streamable-http"
}
}
}
Save the file and restart Claude Desktop. On first use, Claude will open a browser tab for the Metabase OAuth flow. Approve the connection and you're done.
Step 3 (Alternate): Connect Claude Code
If you use Claude Code in the terminal, run:
/mcp add metabase https://your-metabase.example.com/api/mcp --transport streamable-http
Claude Code handles the OAuth redirect automatically.
Step 4: What You Can Do Once Connected
The MCP server exposes five core tools to the AI client:
- search — find tables, metrics, and saved questions by keyword
- get_table — retrieve schema details for a specific table
- get_table_field_values — sample values from a column (useful for filter suggestions)
- construct_query — build a structured Metabase query from a description
- execute_query — run a query and return results with column metadata
In practice, you can open Claude and ask: "What were total orders by region last quarter?" Claude calls search to locate the relevant table, construct_query to build the filter, and execute_query to return results — all in one message. The query runs under your permissions, so you only see data your Metabase role allows.
Step 5: Verify the Connection
After connecting your AI client, run a simple test. In Claude, type:
"List the tables available in my Metabase."
If the MCP connection is working, Claude will call the search tool and return a list of tables from your instance. If it fails, the most common causes are:
- The MCP server toggle is off in Admin > AI.
- The instance URL in your config has a trailing slash (remove it).
- Your Anthropic key has expired or hit its rate limit.
You can also test the endpoint directly with curl:
curl -I https://your-metabase.example.com/api/mcp
A 401 response confirms the endpoint is live and waiting for OAuth. A 404 means the MCP toggle is off.
Permissions and Security Notes
Every query the AI client runs is scoped to the authenticated user's Metabase permissions. An analyst with read-only access to three collections cannot use the MCP connection to query tables outside those collections. This makes the setup safe for teams with multi-tenant data or strict row-level security.
The Disable all AI features toggle in Admin > AI is a master kill switch. Turning it on hides Metabot, inline SQL, the MCP server, and the Agent API simultaneously. Use it if you need to temporarily pause AI access without removing your API key configuration.
Common Issues
OAuth redirect fails on self-hosted instances: Set the MB_SITE_URL environment variable to the public URL users access Metabase from. Without it, the OAuth callback URL will point to localhost.
Model not available: Metabase 60 only supports Anthropic. If your team uses another provider, you will need to wait for future Metabase releases or use a community MCP package that accepts any OpenAI-compatible endpoint.
Slow query responses: The MCP server calls Metabase's internal query engine, which is subject to the same timeouts as the UI. Long-running queries that time out in the dashboard will also time out in the AI client.
Summary
Metabase 60 makes the AI-to-analytics connection straightforward: add an Anthropic key in admin settings, enable the MCP toggle, and point your AI client at /api/mcp. The OAuth flow handles credentials, and existing Metabase permissions carry over automatically. For teams already running Metabase as their BI layer, this is the lowest-friction path to querying data in plain English without rebuilding any infrastructure.
FAQ
Does Metabase MCP work with AI clients other than Claude?
Yes. The Metabase MCP server is compatible with any MCP-aware client, including Cursor, VS Code with the MCP extension, and other tools that support the streamable-http transport. However, the AI model that Metabase itself uses for Metabot and inline SQL generation is currently limited to Anthropic models — you must supply an Anthropic API key in Admin > AI settings.
Is the Metabase MCP server available on the free open-source version?
Yes. Metabase 60 open-sourced its AI features, including the MCP server. Self-hosted users on the free Community edition can enable the MCP server by adding their own Anthropic API key. Metabase Cloud users get the same feature on paid plans.
Can I restrict which users can connect AI clients via MCP?
The MCP server uses OAuth 2.0 and enforces each user's existing Metabase permissions. You cannot grant an AI client access beyond what the authenticated user can already see in Metabase. Admins can disable the MCP server for the entire instance using the master kill switch in Admin > AI, but there is no per-user MCP toggle as of version 60.
How is the official Metabase MCP server different from community packages?
Community packages like metabase-mcp on GitHub require storing your Metabase username and password (or a manually created session token) in a local config file. The official server uses OAuth 2.0, so credentials are never stored locally. It is also maintained by the Metabase team and tested against each release, whereas community packages may lag behind API changes.
What happens if my Anthropic API key runs out of credits?
If the Anthropic key attached to Metabase hits its rate limit or runs out of credits, Metabot and inline SQL generation will stop working, but the MCP server connection itself stays active. Your AI client can still call the MCP tools (search, execute_query, etc.) because those tools call Metabase's query engine directly, not the Anthropic API. The Anthropic key is only used when Metabase generates SQL suggestions or Metabot answers.
