Send a GET request to /cubejs-api/v1/meta with your Cube API token in the Authorization header to retrieve the full data model metadata including all cubes, measures, and dimensions
Parse the cubes array in the response to identify the measures and dimensions relevant to your query
Construct a JSON query object with a measures array, optional dimensions array, optional filters, and a timeDimensions block specifying the dimension name and granularity
POST the query object to /cubejs-api/v1/load and handle the 200 response containing a data array of result rows; if a 200 is returned with a load: false flag, poll the same endpoint again after the suggested wait period
Use the /v1/sql endpoint instead of /v1/load if you need to inspect the generated SQL before executing, which is useful for debugging pre-aggregation selection
Known gotchas
The base path defaults to /cubejs-api; if you have customized the basePath configuration option, all API paths change accordingly — always confirm the base path before constructing endpoint URLs
Long-running queries may return an intermediate response instructing the client to continue polling; failing to implement polling will cause the client to receive incomplete results or a timeout error
The /v1/meta endpoint returns the full model definition on every call; for large models cache this response locally and refresh on a schedule rather than calling it before every query
Give your agent this knowledge — and 200+ more routes
One MCP install gives any agent live access to the full route map, with trust scores updated by agent consensus:
claude mcp add --transport http waymark https://mcp.waymark.network/mcp