MCP Server
Use MCP for common tasks
What to ask your AI app to answer questions, embed a dashboard, edit a client dashboard and change the semantic model.
Ask in plain words. The AI app picks the tools. Each section shows what to ask and what happens.
Ask a question about your data
What was total revenue last month, by region?The app calls ask_question. It turns the question into SQL, runs it, and returns the rows with a chart. On the hosted connector, apps that show MCP Apps draw the chart in the chat. Ask a follow-up, such as Only the top 5 regions.
To keep the answer, ask Save this as a dashboard. The app calls save_chart_as_dashboard, which makes a workspace metric and a new dashboard. It asks you for APPLY_TO_PRODUCTION first.
To show a metric that already exists, ask Show the Revenue metric from the Sales dashboard. The app calls render_metric_tile.
Embed a dashboard in your app
Embed my Sales dashboard in my Next.js app.The app follows the embed-existing-dashboard prompt:
- Finds your data apps with
list_data_apps, or creates one. - Makes sure the data app has an API token.
- Lists the dashboards and creates the embed with
create_embed. - Generates a guest token on the server with
generate_guest_token. - Writes the frontend code with
generate_embed_code.
Keep the API token on your server. Only the guest token goes to the browser.
Change one client’s dashboard
Add the Calls per day widget from the standard template to the dashboard of client acme-co.The app calls list_tenants to check the client ID, then list_widgets and add_widget. Only that client’s dashboard changes. To check what the client sees, ask for a demo link (get_demo_link).
This workflow creates client end-user dashboards, even when it uses a template. Embedded end users can use existing Custom SQL metrics and filters, but cannot edit Custom SQL metrics or submit filter definitions containing Custom SQL. See the Dashboard Embed API for the restriction. To import a dashboard into your own workspace, use the separate Import Dashboard API.
Turn tested SQL into a metric
Make this SQL a metric on the Operations dashboard. Dry run first.For a client dashboard the app uses create_or_update_metric_from_query. For an internal workspace metric with no client, it uses create_workspace_metric. Both:
- Check the SQL against the datasource.
- Return a dry-run plan.
- Save only after you type
APPLY_TO_PRODUCTION.
If the SQL is wrong, the error names the table or column and its line. See SQL errors.
Change the semantic model
Add a description to orders.amount: "Order total in USD".- The app reads the model with
search_semantic_modelandget_semantic_entity. - It checks the change with
propose_semantic_change. You get a plan and a content hash. - It can test questions with
eval_semantic_model. - It applies the change with
apply_semantic_change, after you typeAPPLY_TO_PRODUCTION.
The change applies to everyone who uses the model. If someone changed the model in the meantime, the apply stops with a conflict. Ask the app to propose the change again.
On the hosted connector you can also work in a saved draft with semantic_model_draft, and ask Bryn with ask_bryn_semantic_model. Publishing the model stays a step you do in Databrain.
Brand an embed
Make my embed match our brand: primary color #4F46E5, Inter font, dark mode.The app calls customize_embed_theme. Guest tokens made before the change keep the old look until you make a new one or reload your app.
Next, look up any tool in the tools reference.