base_url or metabase({ baseUrl }); agent inputs cannot change the host. Cookies are omitted and redirects are not followed. Operations under ee. call Pro/Enterprise routes, which an open-source instance answers with 404. Metabase’s MCP Apps routes (/api/embed-mcp/*) are left out: they need an MCP session header that only Metabase’s embed sets.
What you get:
- 306 typed API operations
Setup
1
Install
2
Add the plugin
corsair.ts
multiTenancy: true, scope calls with corsair.withTenant(id). See Quick start for KEK + Hub keys, and Multi-tenancy for account isolation.3
Choose authentication
- API Key (Recommended)
Store the Metabase API key before the first call: More: API Key
pnpm corsair setup --plugin=metabase --tenant=acme api_key=<your-key> (leave out --tenant without multiTenancy), or pass it as key in the plugin options. With Hub, each tenant enters their own key on the connect page. See API key auth.Each account needs its Metabase instance origin before the first call: store it as base_url next to the API key (keys.set_base_url('https://example.metabaseapp.com'), or the Base URL field when connecting in Hub). For a single-instance setup pass metabase({ baseUrl }) instead; it overrides the stored value. Use HTTPS, or HTTP only for localhost development. Metabase grants each API key the permissions of its assigned group.4
Connect a tenant
Mint a connect link and send the tenant to it. Hub hosts the page and delivers the result to your app — see Connect / OAuth.
Example API calls
action.get
action.post
What’s next
API reference
Every
metabase.api.* operation with input and output types.Connect / OAuth
createLink, Hub delivery, and tenant connect flows.
Use with agents
Expose this plugin’s operations as MCP tools.