The easy-to-use open source Business Intelligence and Embedded Analytics tool that lets everyone work with data :bar_chart:
TypeScript analyticsbibusiness-intelligencebusinessintelligenceclojuredashboarddatadata-analysisdata-visualizationdatabasemetabasemysqlpostgrespostgresqlreportingslacksql-editorvisualization
docs - AI updates (#74122)
Alex Yarosh1e9b47ab53fa
diff --git a/docs/ai/mcp.md b/docs/ai/mcp.mdindex 26c6f1c9d1a..bd042ae881d 100644--- a/docs/ai/mcp.md+++ b/docs/ai/mcp.md@@ -54,6 +54,14 @@ Some explanation: OAuth discovery starts with Metabase returning a `WWW-AuthentiIf the site URL doesn't match an address your MCP client can reach, like if you're running Metabase in Docker and the site URL got auto-detected from an internal hostname like `metabase-dev:3000`, the client will register but fail the handshake. Your MCP client will typically report a connection failure rather than prompting you to authenticate (for example, Claude Code shows `✗ Failed to connect` rather than `! Needs authentication`).+## With the MCP server, your client provides the AI++MCP server requests are handled by whatever AI client you're using (like an desktop AI app or editor plugin). The MCP server just provides tools (like searching for an entity or running the query) for your AI.++For example, if you ask your AI client to use your Metabase's MCP server "what's our q3 revenue," your client will interact with the MCP server to figure out which tools it needs to field your request. Your AI can decide that it needs to use the tool **construct_query** and **execute_query**, and what those queries might be. Then your client will call those tools for Metabase to run.++You don't need to have an [AI provider](settings.md#supported-providers) configured in Metabase to use your Metabase's MCP server. If you _do_ have an AI provider configured in Metabase to power Metabot, that provider will _not_ be used for MCP server requests. MCP calls by your local client have no effect on token usage for your Metabase's AI connection.+## Available toolsSome clients (like Claude Desktop) will ask you to approve each tool the first time it's used. The MCP server builds on Metabase's [Agent API](./agent-api.md), and exposes the following tools. If you're building a custom integration and need full control, use the [Agent API](./agent-api.md) directly instead.@@ -66,6 +74,8 @@ Some clients (like Claude Desktop) will ask you to approve each tool the first t- **construct_query**: Construct a query against a table or metric. Returns an opaque query string that can be executed with `execute_query`.- **execute_query**: Execute a previously constructed query and return the results with column metadata, row count, and execution time.- **query**: Query a table or metric and return results.+- **create_question**: Create questions.+- **create_dashboard**: Create dashboards.## Use the MCP server with file-based developmentdiff --git a/docs/ai/metabot.md b/docs/ai/metabot.mdindex b90a2addbec..95f621b8a95 100644--- a/docs/ai/metabot.md+++ b/docs/ai/metabot.md@@ -15,16 +15,17 @@ To set up Metabot, see [Metabot settings](./settings.md).## What Metabot can do-Metabot can help you to:+Here's a non-exhaustive list of things Metabot can help with:-- [AI exploration](#ai-exploration).+- [Answer data questions asked with natural language](#ai-exploration).- [Create a chart using the query builder](#how-metabot-uses-the-query-builder) from a natural language query.- [Generate SQL in the native editor](../questions/native-editor/writing-sql.md) from natural language. (Currently, only SQL is supported.)- [Edit SQL directly in the native editor](#inline-sql-editing).- [Analyze a chart](#analyze-charts-with-metabot).- [Fix errors in SQL code](#have-metabot-fix-sql-queries).-- Answer questions from our documentation (as in, the literature you're reading right now).-- [Chat with Metabot in Slack](./metabot-slack.md).+- [Generate transforms](../data-studio/transforms/transforms-overview.md#use-metabot-to-generate-code-for-transforms)+- [Generate charts in documents](../documents/introduction.md)+- [Answer questions from Slack](./metabot-slack.md).Like with all generative AI, you'll always need to double-check results.@@ -129,8 +130,6 @@ When answering questions in AI exploration, Metabot searches a limited set of coMetabot is getting smarter all the time, but there are some things it can't do yet:-- **Custom expressions.** Metabot can't use [custom expressions](../questions/query-builder/expressions-list.md) in query builder questions.-- **Multi-level aggregation.** Metabot is limited to a single level of aggregation and grouping.- **SQL variables.** Metabot can't generate SQL queries that include [SQL parameters](../questions/native-editor/sql-parameters.md) (like filters or field filters).- **Goal lines.** Metabot can't add [goal lines](../questions/visualizations/line-bar-and-area-charts.md#goal-lines) to charts.- **Chart formatting.** Metabot can't change visualization settings like colors, axis labels, or number formatting.diff --git a/docs/ai/overview.md b/docs/ai/overview.mdnew file mode 100644index 00000000000..cbbdf4721e9--- /dev/null+++ b/docs/ai/overview.md@@ -0,0 +1,61 @@+---+title: AI in Metabase+summary: Overview of all the ways you can use AI with Metabase.+---++# AI in Metabase++AI is in Metabase optional. You can use Metabase without AI at all. But if you do want to use AI to interact with Metabase, we have you covered.++Here are the different ways to use AI with Metabase:++- [Metabot](#metabot)+- [MCP server](#mcp-server)+- [Agent-driven file-based development workflow](#agent-driven-development-workflow)++## Metabot++**Best for: daily tasks in Metabase; granular control over people's AI usage.**++Metabot is Metabase's built-in AI agent. Metabot can help you with most daily tasks around Metabase, like answering questions about your data, creating queries, generating SQL code, explaining charts, or creating Documents. If you're embedding Metabase into your product, you can get the Metabot agent through the [AI chat component](../embedding/components.md#ai-chat). See [non-exhaustive list of things Metabot can do](metabot.md#what-metabot-can-do), as well as its [limitations](metabot.md#current-limitations).++**Controls:** Metabot will only see what the person using it can see. Metabot also comes with additional permission controls and usage limits so that you control who can use which Metabot tools (e.g. chat vs SQL generation) and how many tokens they can spend.++**Provider**: Choose from:++- Metabase's own AI Service (available as an add-on exclusively for Metabase Cloud)+- Third-party models via an API key (Anthropic models only for now).++**Plans**: available on all plans. You can only use Metabase's AI Service on Metabase Cloud.++See [full docs for Metabot](metabot.md) and [embedded AI chat](../embedding/components.md#ai-chat).++## MCP server++**Best for: asking ad-hoc, ephemeral questions; combining data from Metabase with data from other tools.**++Connect your favorite third-party AI tool - like Claude or Codex - to the Metabase MCP server. MCP server's main functionality is designed to for answering in-the-moment questions like "hey btw what's our q3 revenue?". The MCP server is also useful when combined with other MCP servers. for eFample, you can ask Claude a question about your customers that combines data from Metabase, your CRM, and your support ticket platform.++Compared to the built-in Metabot, MCP server has somewhat restricted functionality (for example, it can't generate code or built transforms for now). See [the ever-expanding list of MCP server tools](mcp.md#available-tools).++**Controls**: Metabase MCP server requires people to authenticate into Metabase, and all the responses it provides will be scoped to their permissions. However, Unlike built-in Metabot, MCP server doesn't come with granular control over which _tools_ people can use, or disable MCP server altogether.++**Provider**: Requests to Metabase MCP server are handled by the provider you choose connect to the MCP server (e.g. Claude, Cursor, etc).++**Plans**: MCP server is available on all plans.++See [full docs for MCP server](mcp.md).++## Agent-driven development workflow++**Best for: developers creating stuff that other people will use.**++Use a coding agent like Claude Code to understand your database's metadata, generate Metabase content as YAML files locally, verify the schema, then sync and import the generated into your production Metabase. Sky's the limit on what you can accomplish.++**Controls**: Only admins can sync content to Metabase instances.++**Provider**: Everything is handled by your coding agent of choice.++**Plans**: Agent-driven workflows require a Pro/Enterprise plan.++See [full docs for agent-driven workflow](./file-based-development.md)