integrations tools metabase
Metabase MCP for your AI agent
Cogny's Metabase integration exposes 10 tools (10 read) to an AI agent over MCP. The same tools are available on every plan, from your own AI client or inside the Cogny app.
- 10readonly reads data.
- 0writecreates or changes something.
- 0destructivedeletes, removes or replaces something.
Over MCP your own AI client asks before it runs a write. To take a tool away from your agent, block it in Settings → Integrations. Plans, approvals and limits
set it up.
Add Cogny to your AI client once, then connect Metabase in Cogny. Every Metabase tool below appears in the client.
- Claude CodeRun
claude mcp add --transport http cogny https://app.cogny.com/mcp, then authorise in the browser. - Claude.aiSettings → Connectors → Add custom connector, URL
https://app.cogny.com/mcp, then log in and pick your workspace. - ChatGPTSettings → Apps → Advanced settings → Developer mode → Create app, URL
https://app.cogny.com/mcp, authentication OAuth. - CursorIn Cogny, Settings → Data & Integrations → Connect AI Clients shows the block to paste into
.mcp.json, with an API key. - CodexRun
codex mcp add cogny --url https://app.cogny.com/mcp.
Notes
Metabase connects with your Metabase address (for example https://metabase.yourcompany.com, or a Metabase Cloud address ending in .metabaseapp.com) and an API key. API keys exist from Metabase 0.49 on; an admin creates them under Admin → Settings → Authentication → API keys.
Every query runs through Metabase with the key's permissions. An API key belongs to one Metabase group, and that group's permissions decide which databases, tables, collections, saved questions and dashboards the tools can see and run. Create a group for Cogny and give it:
- view access to the collections whose questions and dashboards Cogny should use;
- view access to the databases Cogny should read;
- "Query builder and native" query access on the databases it should run SQL on (called native query editing in older Metabase versions). Without it,
run_native_queryis refused for that database andrun_cardstill works.
Don't put the key in the Administrators group. For a hard read-only guarantee, connect the database to Metabase with a database user that can only read.
run_card and run_native_query return 500 rows by default and at most 2,000 per call, and say when a result was cut. Aggregate in the query (GROUP BY) rather than paging through raw rows.
run_native_query accepts one SELECT statement (a WITH clause is fine), written in the database's own SQL dialect. Statements that write, create tables or lock rows are refused before they reach Metabase, and so are backslashes inside strings and nested comments. MongoDB databases are not supported for SQL; run their saved questions with run_card.
Metabase has to be reachable from the internet over https. If it only accepts known addresses, allow 207.175.17.47; every Cogny connection comes from that address.
Known gaps
- Read only. No tools create, change or delete questions, models, dashboards, collections, alerts or subscriptions.
- No writes to your databases through Metabase.
run_cardruns a question as saved. Dashboard filters are not applied to the cards on a dashboard; pass the values torun_cardas the question's own parameters instead.- No exports (CSV, XLSX) and no results beyond 2,000 rows per call.
- No access to Metabase's admin settings, users, groups or permissions.
- Older Metabase versions (before 0.49) have no API keys and can't be connected.
- A Metabase that is only reachable inside a private network can't be connected.
what each tool does.
Read 10 · only reads data
list_databasesReadList the databases connected to your Metabase, with the ids the other tools take.list_tablesReadList the tables Metabase knows in one database, with their ids and schemas.get_table_metadataReadGet one table's columns with their types, descriptions and foreign keys.list_collectionsReadList the collections in your Metabase, the folders that hold saved questions and dashboards.list_collection_itemsReadList the saved questions, models, dashboards and sub-collections in one collection.searchReadSearch your Metabase for saved questions, models, metrics and dashboards by name or description.get_cardReadGet a saved question's or model's definition: its SQL or query, parameters and result columns.run_cardReadRun a saved question or model in your Metabase and return its rows.run_native_queryReadRun a read-only SQL query against one of your Metabase databases and return the rows.get_dashboardReadGet a dashboard's cards, text, tabs and filters, with the card ids run_card takes.
Exact input schemas come from tools/list once Metabase is connected; the free plan is enough to check. Missing something? Your agent can ask for it with request_feature.