hypequery manages ClickHouse analytics in TypeScript code
hypequery is a code-based for TypeScript developers building on ClickHouse. Metrics and dimensions can be defined once and reused across dashboards, apps, and APIs. It does not require adopting a separate analytics platform or maintaining large YAML s.
The definitions compile into ClickHouse SQL, so there is no extra service, proxy, or runtime to deploy. It is designed for multi-tenant products, with query-layer safeguards that block cross-tenant data access and helpers for connecting to an existing system. A dataset is declared as a fixed list of allowed dimensions and measures, so it can also act as a safe catalog for AI agents.
The package includes an MCP server that can give a a typed catalog to query. A serve() entry point can expose a dataset as an , letting the same type-safe definitions power dashboards and APIs.
Key points
- ClickHouse analytics metrics and dimensions are defined once in TypeScript code.
- The library generates ClickHouse SQL without needing a separate service or proxy.
- Multi-tenant safeguards aim to stop queries from crossing customer or workspace boundaries.
- The MCP server can give a a typed catalog of safe data to query.
- serve() can expose the same dataset definitions through an for dashboards and APIs.