# hypequery > Type-safe analytics layer for ClickHouse: a typed query builder, a semantic datasets layer, an HTTP/OpenAPI serve runtime, React hooks, and an MCP server for agents. Each link below points to the clean Markdown version of the page. The full corpus is available at /llms-full.txt. ## Guides - [Authentication](https://www.hypequery.com/llms.mdx/docs/authentication): Add authentication with API keys, typed auth guards, and shared auth context. - [Changelog](https://www.hypequery.com/llms.mdx/docs/changelog): Release notes and updates for hypequery - [chDB (Embedded ClickHouse)](https://www.hypequery.com/llms.mdx/docs/chdb): Run hypequery on embedded ClickHouse with chDB. No server, same builder code. Local dev, CI tests, and serverless with the exact query builder you ship to production. - [Core concepts](https://www.hypequery.com/llms.mdx/docs/core-concepts): Understand the builder, datasets (semantic layer), and runtime in hypequery. - [CORS](https://www.hypequery.com/llms.mdx/docs/cors): Configure CORS for serve({ queries }) when browser clients need cross-origin access. - [Embedded Runtime](https://www.hypequery.com/llms.mdx/docs/embedded-runtime): Run hypequery definitions directly inside your application runtime - [FAQ](https://www.hypequery.com/llms.mdx/docs/faq): Frequently asked questions about hypequery - [Fetch Runtime Integration](https://www.hypequery.com/llms.mdx/docs/fetch): Mount hypequery inside Hono, Cloudflare Workers, Bun, or any Fetch-based runtime using the fetch adapter. - [HTTP + OpenAPI](https://www.hypequery.com/llms.mdx/docs/http-openapi): Expose hypequery metrics through HTTP handlers and autogenerated docs - [Introduction](https://www.hypequery.com/llms.mdx/docs/introduction): Welcome to the hypequery docs. Find all the resources to get started. - [Multi-Tenancy](https://www.hypequery.com/llms.mdx/docs/multi-tenancy): Configure tenant extraction and isolation in the serve({ queries }) runtime. - [Next.js](https://www.hypequery.com/llms.mdx/docs/nextjs): Mount hypequery in a Next.js App Router project. - [Node.js](https://www.hypequery.com/llms.mdx/docs/nodejs): Run hypequery behind a dedicated Node.js server using Hono. - [Observability](https://www.hypequery.com/llms.mdx/docs/observability): Track runtime execution, slow queries, and builder-level query logs in hypequery. - [Quick Start](https://www.hypequery.com/llms.mdx/docs/quick-start): Get started with hypequery. - [Rate Limiting](https://www.hypequery.com/llms.mdx/docs/rate-limiting): Protect serve({ queries }) runtimes with middleware-based rate limiting. - [Re-using Queries](https://www.hypequery.com/llms.mdx/docs/re-using-queries): Turn typed builder logic into reusable query definitions with the query function. - [Roadmap](https://www.hypequery.com/llms.mdx/docs/roadmap): View the hypequery product roadmap - [Runtime Features](https://www.hypequery.com/llms.mdx/docs/runtime-features): Middleware, auth injection, and runtime inspection for serve({ queries }). - [Schemas](https://www.hypequery.com/llms.mdx/docs/schemas): Validate ClickHouse query inputs and outputs with Zod. Use schemas for type-safe TypeScript APIs, runtime validation, and OpenAPI generation. - [Vite](https://www.hypequery.com/llms.mdx/docs/vite): Run hypequery next to a Vite frontend and proxy API requests in development. - [Why hypequery](https://www.hypequery.com/llms.mdx/docs/why-hypequery): What hypequery is for, who it fits, and when to choose it. ## Query building - [Advanced Filtering](https://www.hypequery.com/llms.mdx/docs/query-building/advanced-filtering): Build complex predicates and CrossFilter trees inside your queries - [Aggregation](https://www.hypequery.com/llms.mdx/docs/query-building/aggregation): Group data and calculate summaries with aggregations - [Helper Methods](https://www.hypequery.com/llms.mdx/docs/query-building/helper-methods): Learn about utility methods and additional features in hypequery - [Inserts](https://www.hypequery.com/llms.mdx/docs/query-building/inserts): Insert rows into ClickHouse with a type-safe TypeScript API. Row shapes are derived from your schema, with nullable columns optional and value types checked at compile time. - [Join Relationships](https://www.hypequery.com/llms.mdx/docs/query-building/join-relationships): Define reusable join paths with JoinRelationships and apply them with withRelation() - [Joins](https://www.hypequery.com/llms.mdx/docs/query-building/joins): Combine data from multiple tables - [Ordering](https://www.hypequery.com/llms.mdx/docs/query-building/ordering): Sort results and paginate with orderBy, limit, and offset - [Query Basics](https://www.hypequery.com/llms.mdx/docs/query-building/basics): Learn the hypequery ClickHouse query builder for TypeScript. Build type-safe queries with autocomplete, reusable filters, joins, and strongly typed results. - [Query Caching](https://www.hypequery.com/llms.mdx/docs/query-building/caching): Cache query-builder execute() results with tags, TTLs, and custom providers. - [Select](https://www.hypequery.com/llms.mdx/docs/query-building/select): Select and transform ClickHouse columns with a type-safe TypeScript query builder. Learn aliases, expressions, joins, and strongly typed result shapes. - [SQL Expressions](https://www.hypequery.com/llms.mdx/docs/query-building/sql-expressions): Use raw SQL and expression helpers when the fluent query builder isn't enough - [Subqueries & CTEs](https://www.hypequery.com/llms.mdx/docs/query-building/subqueries-ctes): Learn how to use subqueries and Common Table Expressions (CTEs) in hypequery - [Time Functions](https://www.hypequery.com/llms.mdx/docs/query-building/time-functions): Work with dates, timestamps, and time intervals - [Where](https://www.hypequery.com/llms.mdx/docs/query-building/where): Filter ClickHouse queries in TypeScript with hypequery's where builder. Learn operators, predicates, and reusable filtering patterns for type-safe analytics queries. ## Datasets - [Caching](https://www.hypequery.com/llms.mdx/docs/datasets/caching): Cache semantic query results keyed by the query signature. - [Catalog](https://www.hypequery.com/llms.mdx/docs/datasets/catalog): Export normalized dataset metadata for tools, docs, and agents. - [Definition](https://www.hypequery.com/llms.mdx/docs/datasets/defining-datasets): Create typed dataset definitions over ClickHouse tables and views. - [Dimensions](https://www.hypequery.com/llms.mdx/docs/datasets/dimensions): Define typed fields for selecting, grouping, and filtering dataset queries. - [Execution](https://www.hypequery.com/llms.mdx/docs/datasets/execution): Validate, generate SQL, and execute dataset and metric queries. - [Filters](https://www.hypequery.com/llms.mdx/docs/datasets/filters): Use typed filter helpers in metric, dataset, and measure queries. - [Measures](https://www.hypequery.com/llms.mdx/docs/datasets/measures): Define aggregations such as revenue, counts, averages, minimums, and maximums. - [Metrics](https://www.hypequery.com/llms.mdx/docs/datasets/metrics): Attach named KPIs and derived calculations to datasets. - [Multi-tenancy](https://www.hypequery.com/llms.mdx/docs/datasets/multi-tenancy): Use dataset tenant keys and runtime tenant context to enforce tenant-scoped execution. - [Overview](https://www.hypequery.com/llms.mdx/docs/datasets/overview): Define ClickHouse tables once in TypeScript, then reuse typed semantic definitions across APIs, jobs, dashboards, and agents. - [Relationships](https://www.hypequery.com/llms.mdx/docs/datasets/relationships): Model links between datasets and query to-one related fields one hop deep. - [Serve integration](https://www.hypequery.com/llms.mdx/docs/datasets/serve-integration): Expose dataset and metric definitions through the Serve runtime. - [Time grains](https://www.hypequery.com/llms.mdx/docs/datasets/time-grains): Aggregate metrics by day, week, month, quarter, and year. - [Tool Generation](https://www.hypequery.com/llms.mdx/docs/datasets/tool-generation): Generate catalog-backed dataset tools for agents and function-calling runtimes. ## MCP - [Clients](https://www.hypequery.com/llms.mdx/docs/mcp/clients): Connect Hypequery MCP to Claude Desktop, Cursor, and other MCP clients. - [Configuration](https://www.hypequery.com/llms.mdx/docs/mcp/configuration): Configure the Hypequery MCP server with datasets and a dataset client. - [Overview](https://www.hypequery.com/llms.mdx/docs/mcp/overview): Expose Hypequery datasets and metrics to AI agents through the Model Context Protocol. - [Programmatic usage](https://www.hypequery.com/llms.mdx/docs/mcp/programmatic): Start the Hypequery MCP server from a Node process. - [Safety model](https://www.hypequery.com/llms.mdx/docs/mcp/safety): Use MCP as a governed capability boundary for agents. - [Tools](https://www.hypequery.com/llms.mdx/docs/mcp/tools): Tools exposed by the Hypequery MCP server. ## React - [Advanced Patterns](https://www.hypequery.com/llms.mdx/docs/react/advanced-patterns): Advanced React hooks configuration, HTTP methods, and cache management - [Getting Started](https://www.hypequery.com/llms.mdx/docs/react/getting-started): Install and set up @hypequery/react for type-safe hooks - [Using Queries](https://www.hypequery.com/llms.mdx/docs/react/using-queries): Learn how to use useQuery and useMutation in your React components ## Reference - [CLI reference](https://www.hypequery.com/llms.mdx/docs/reference/api/cli): Command cheatsheet for the hypequery CLI - [ClickHouse Behavior](https://www.hypequery.com/llms.mdx/docs/reference/clickhouse-behavior): The ClickHouse-specific behavior that most often affects how you use hypequery. - [Connecting to ClickHouse](https://www.hypequery.com/llms.mdx/docs/reference/connection): Learn how to connect to ClickHouse databases with hypequery - [Inside the Query Builder](https://www.hypequery.com/llms.mdx/docs/reference/inside-the-query-builder): A plain-English look at how hypequery builds a query before it turns into SQL. - [Package Overview](https://www.hypequery.com/llms.mdx/docs/reference/packages): Quick guide to the official hypequery packages and when to use each one - [Query Builder API](https://www.hypequery.com/llms.mdx/docs/reference/api/query-builder): Quick reference for the hypequery ClickHouse query builder API. - [Query Definition](https://www.hypequery.com/llms.mdx/docs/reference/api/query): Reference for initServe and object-style query definitions. - [React hooks](https://www.hypequery.com/llms.mdx/docs/reference/api/react): Use @hypequery/react to generate typed hooks from your hypequery API - [Serve Runtime](https://www.hypequery.com/llms.mdx/docs/reference/api/runtime): Reference for serve({ queries }) and the exported api surface. - [Trust Boundaries](https://www.hypequery.com/llms.mdx/docs/reference/trust-boundaries): Understand which hypequery APIs are safe for public semantic input and which APIs execute trusted developer-authored SQL. - [Type Helpers](https://www.hypequery.com/llms.mdx/docs/reference/api/types): TypeScript helpers for the current hypequery query and serve APIs.