/api/embed-mcp

GET /api/embed-mcp/queries/{handle}

Changed on

Resolve a query handle to the base64-encoded MBQL the iframe should render.

This is how the v2 MCP Apps tools keep result data out of the model context: visualize_query and render_drill_through return only a handle, and the iframe exchanges it here using the scoped UI credential it was rendered with. The lookup is user-scoped (see [[metabase.mcp.session/find-handle-row]]) and the credential is accepted only on the MCP UI request surface, so a handle on its own is not a bearer credential.

get/api/embed-mcp/queries/{handle}

Request

  • Base URL
    (relative, and the document was published on a file host, not at the API’s origin)
  • Auth
    API key in header X-API-Key

Path parameters

handlestring required

value must be a valid UUID.

Request body

object required

Response

Successful response

promptstring nullable required
querystring required

value must be a non-blank string.

Changes