@hypequery/mcp 0.1.0 → 0.2.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/README.md CHANGED
@@ -24,7 +24,7 @@ pnpm add @hypequery/mcp
24
24
  Create `mcp-config.ts`:
25
25
 
26
26
  ```typescript
27
- import { MetricExecutor } from '@hypequery/datasets';
27
+ import { createDatasetClient } from '@hypequery/datasets';
28
28
  import { createQueryBuilder } from '@hypequery/clickhouse';
29
29
  import { OrdersDataset, CustomersDataset } from './datasets/index.js';
30
30
 
@@ -45,14 +45,15 @@ export const datasets = {
45
45
  },
46
46
  };
47
47
 
48
- // Export your executor
49
- const builderFactory = createQueryBuilder({
50
- host: process.env.CLICKHOUSE_HOST,
48
+ // Export the semantic runner consumed by the MCP server
49
+ const db = createQueryBuilder({
50
+ url: process.env.CLICKHOUSE_URL,
51
51
  username: process.env.CLICKHOUSE_USER,
52
52
  password: process.env.CLICKHOUSE_PASSWORD,
53
+ database: process.env.CLICKHOUSE_DATABASE,
53
54
  });
54
55
 
55
- export const executor = new MetricExecutor({ builderFactory });
56
+ export const analytics = createDatasetClient({ queryBuilder: db });
56
57
  ```
57
58
 
58
59
  ### 2. Run the MCP Server
@@ -204,15 +205,19 @@ You can also use the MCP server programmatically in your application:
204
205
 
205
206
  ```typescript
206
207
  import { createMCPServer } from '@hypequery/mcp';
207
- import { MetricExecutor } from '@hypequery/datasets';
208
+ import { createDatasetClient } from '@hypequery/datasets';
208
209
  import { datasets } from './datasets/index.js';
209
- import { queryBuilder } from './db/index.js';
210
210
 
211
- const executor = new MetricExecutor({ builderFactory: queryBuilder });
211
+ const analytics = createDatasetClient({
212
+ url: process.env.CLICKHOUSE_URL,
213
+ username: process.env.CLICKHOUSE_USER,
214
+ password: process.env.CLICKHOUSE_PASSWORD,
215
+ database: process.env.CLICKHOUSE_DATABASE,
216
+ });
212
217
 
213
218
  const server = await createMCPServer({
214
219
  datasets,
215
- executor,
220
+ analytics,
216
221
  name: 'my-analytics-mcp',
217
222
  version: '1.0.0',
218
223
  });
@@ -250,8 +255,8 @@ The MCP server also exposes a `dataset_guide` prompt that provides natural langu
250
255
  Your config file can use environment variables for database credentials:
251
256
 
252
257
  ```typescript
253
- const queryBuilder = createQueryBuilder({
254
- host: process.env.CLICKHOUSE_HOST || 'localhost',
258
+ const analytics = createDatasetClient({
259
+ url: process.env.CLICKHOUSE_URL || 'http://localhost:8123',
255
260
  username: process.env.CLICKHOUSE_USER || 'default',
256
261
  password: process.env.CLICKHOUSE_PASSWORD,
257
262
  database: process.env.CLICKHOUSE_DATABASE || 'default',
@@ -263,7 +268,7 @@ const queryBuilder = createQueryBuilder({
263
268
  ### MCP server not connecting
264
269
 
265
270
  1. Check that the config file path is absolute, not relative
266
- 2. Ensure the config file exports both `datasets` and `executor`
271
+ 2. Ensure the config file exports both `datasets` and `analytics`
267
272
  3. Check Claude Desktop logs for errors
268
273
 
269
274
  ### Queries failing
package/dist/bin.d.ts CHANGED
@@ -3,10 +3,10 @@
3
3
  * MCP Server CLI
4
4
  *
5
5
  * This is a standalone executable that starts the MCP server.
6
- * Users can configure it by creating a config file that exports datasets and executor.
6
+ * Users can configure it by creating a config file that exports datasets and analytics.
7
7
  *
8
8
  * Usage:
9
- * npx hypequery-mcp --config ./mcp-config.js
9
+ * npx hypequery-mcp --config ./mcp-config.mjs
10
10
  */
11
11
  export {};
12
12
  //# sourceMappingURL=bin.d.ts.map
package/dist/bin.js CHANGED
@@ -3,10 +3,10 @@
3
3
  * MCP Server CLI
4
4
  *
5
5
  * This is a standalone executable that starts the MCP server.
6
- * Users can configure it by creating a config file that exports datasets and executor.
6
+ * Users can configure it by creating a config file that exports datasets and analytics.
7
7
  *
8
8
  * Usage:
9
- * npx hypequery-mcp --config ./mcp-config.js
9
+ * npx hypequery-mcp --config ./mcp-config.mjs
10
10
  */
11
11
  import { createMCPServer } from './server.js';
12
12
  import { pathToFileURL } from 'url';
@@ -29,29 +29,29 @@ async function main() {
29
29
  if (configIndex === -1 || !args[configIndex + 1]) {
30
30
  console.error('Error: --config flag is required');
31
31
  console.error('');
32
- console.error('Usage: hypequery-mcp --config ./mcp-config.js');
32
+ console.error('Usage: hypequery-mcp --config ./mcp-config.mjs');
33
33
  console.error('');
34
- console.error('The config file should export { datasets, executor }:');
34
+ console.error('The config file should export { datasets, analytics }:');
35
35
  console.error('');
36
36
  console.error(' export const datasets = { ... };');
37
- console.error(' export const executor = new MetricExecutor(...);');
37
+ console.error(' export const analytics = createDatasetClient({ ... });');
38
38
  process.exit(1);
39
39
  }
40
40
  const configPath = resolve(process.cwd(), args[configIndex + 1]);
41
41
  try {
42
42
  // Dynamic import of the config file
43
43
  const configModule = await import(pathToFileURL(configPath).href);
44
- const { datasets, executor } = configModule;
44
+ const { datasets, analytics } = configModule;
45
45
  if (!datasets) {
46
46
  throw new Error('Config file must export "datasets"');
47
47
  }
48
- if (!executor) {
49
- throw new Error('Config file must export "executor"');
48
+ if (!analytics) {
49
+ throw new Error('Config file must export "analytics"');
50
50
  }
51
51
  // Create and start the MCP server
52
52
  await createMCPServer({
53
53
  datasets,
54
- executor,
54
+ analytics,
55
55
  name: 'hypequery-mcp-server',
56
56
  version: '0.1.0',
57
57
  });
package/dist/index.d.ts CHANGED
@@ -10,6 +10,6 @@ export { getDatasetSchemaTool } from './tools/introspect.js';
10
10
  export { queryMetricTool } from './tools/query-metric.js';
11
11
  export { queryDatasetTool } from './tools/query-dataset.js';
12
12
  export { datasetGuidePrompt } from './prompts/dataset-guide.js';
13
- export type { DatasetRegistry, QueryMetricArgs, QueryDatasetArgs, GetDatasetSchemaArgs, MCPToolResponse, DatasetSchema, DimensionSchema, MetricSchema, RelationshipSchema, DatasetListItem, DatasetsListResponse, QueryResultResponse, QueryResultMeta, } from './types.js';
13
+ export type { DatasetRegistry, QueryMetricArgs, QueryDatasetArgs, QueryToolOptions, GetDatasetSchemaArgs, MCPToolResponse, DatasetSchema, DimensionSchema, MetricSchema, RelationshipSchema, DatasetListItem, DatasetsListResponse, QueryResultResponse, QueryResultMeta, } from './types.js';
14
14
  export { MAX_QUERY_LIMIT, DEFAULT_QUERY_LIMIT } from './types.js';
15
15
  //# sourceMappingURL=index.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAAA;;;;;GAKG;AAEH,OAAO,EAAE,kBAAkB,EAAE,eAAe,EAAE,KAAK,eAAe,EAAE,MAAM,aAAa,CAAC;AACxF,OAAO,EAAE,gBAAgB,EAAE,MAAM,0BAA0B,CAAC;AAC5D,OAAO,EAAE,oBAAoB,EAAE,MAAM,uBAAuB,CAAC;AAC7D,OAAO,EAAE,eAAe,EAAE,MAAM,yBAAyB,CAAC;AAC1D,OAAO,EAAE,gBAAgB,EAAE,MAAM,0BAA0B,CAAC;AAC5D,OAAO,EAAE,kBAAkB,EAAE,MAAM,4BAA4B,CAAC;AAGhE,YAAY,EACV,eAAe,EACf,eAAe,EACf,gBAAgB,EAChB,oBAAoB,EACpB,eAAe,EACf,aAAa,EACb,eAAe,EACf,YAAY,EACZ,kBAAkB,EAClB,eAAe,EACf,oBAAoB,EACpB,mBAAmB,EACnB,eAAe,GAChB,MAAM,YAAY,CAAC;AACpB,OAAO,EAAE,eAAe,EAAE,mBAAmB,EAAE,MAAM,YAAY,CAAC"}
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAAA;;;;;GAKG;AAEH,OAAO,EAAE,kBAAkB,EAAE,eAAe,EAAE,KAAK,eAAe,EAAE,MAAM,aAAa,CAAC;AACxF,OAAO,EAAE,gBAAgB,EAAE,MAAM,0BAA0B,CAAC;AAC5D,OAAO,EAAE,oBAAoB,EAAE,MAAM,uBAAuB,CAAC;AAC7D,OAAO,EAAE,eAAe,EAAE,MAAM,yBAAyB,CAAC;AAC1D,OAAO,EAAE,gBAAgB,EAAE,MAAM,0BAA0B,CAAC;AAC5D,OAAO,EAAE,kBAAkB,EAAE,MAAM,4BAA4B,CAAC;AAGhE,YAAY,EACV,eAAe,EACf,eAAe,EACf,gBAAgB,EAChB,gBAAgB,EAChB,oBAAoB,EACpB,eAAe,EACf,aAAa,EACb,eAAe,EACf,YAAY,EACZ,kBAAkB,EAClB,eAAe,EACf,oBAAoB,EACpB,mBAAmB,EACnB,eAAe,GAChB,MAAM,YAAY,CAAC;AACpB,OAAO,EAAE,eAAe,EAAE,mBAAmB,EAAE,MAAM,YAAY,CAAC"}
package/dist/server.d.ts CHANGED
@@ -4,7 +4,7 @@
4
4
  * Exposes datasets and metrics via Model Context Protocol (MCP)
5
5
  * for use with Claude Desktop, Cursor, and other MCP-compatible tools.
6
6
  */
7
- import type { MetricExecutor } from '@hypequery/datasets';
7
+ import type { DatasetClient } from '@hypequery/datasets';
8
8
  import type { DatasetRegistry } from './types.js';
9
9
  export interface MCPServerConfig {
10
10
  /**
@@ -12,9 +12,9 @@ export interface MCPServerConfig {
12
12
  */
13
13
  datasets: DatasetRegistry;
14
14
  /**
15
- * Metric executor for running queries
15
+ * Semantic analytics for running metric and dataset queries
16
16
  */
17
- executor: MetricExecutor;
17
+ analytics: DatasetClient;
18
18
  /**
19
19
  * Server name (shown in MCP client)
20
20
  */
@@ -23,6 +23,10 @@ export interface MCPServerConfig {
23
23
  * Server version
24
24
  */
25
25
  version?: string;
26
+ /**
27
+ * Trusted tenant id used to scope tenant-keyed datasets.
28
+ */
29
+ tenantId?: string;
26
30
  }
27
31
  export declare class HypequeryMCPServer {
28
32
  private server;
@@ -1 +1 @@
1
- {"version":3,"file":"server.d.ts","sourceRoot":"","sources":["../src/server.ts"],"names":[],"mappings":"AAAA;;;;;GAKG;AAUH,OAAO,KAAK,EAAE,cAAc,EAAE,MAAM,qBAAqB,CAAC;AAM1D,OAAO,KAAK,EAAE,eAAe,EAAE,MAAM,YAAY,CAAC;AAElD,MAAM,WAAW,eAAe;IAC9B;;OAEG;IACH,QAAQ,EAAE,eAAe,CAAC;IAE1B;;OAEG;IACH,QAAQ,EAAE,cAAc,CAAC;IAEzB;;OAEG;IACH,IAAI,CAAC,EAAE,MAAM,CAAC;IAEd;;OAEG;IACH,OAAO,CAAC,EAAE,MAAM,CAAC;CAClB;AAED,qBAAa,kBAAkB;IAC7B,OAAO,CAAC,MAAM,CAAS;IACvB,OAAO,CAAC,MAAM,CAAkB;gBAEpB,MAAM,EAAE,eAAe;IAmBnC,OAAO,CAAC,aAAa;IA6NrB;;OAEG;IACG,KAAK;IAQX;;OAEG;IACG,IAAI;CAGX;AAED;;GAEG;AACH,wBAAsB,eAAe,CAAC,MAAM,EAAE,eAAe,GAAG,OAAO,CAAC,kBAAkB,CAAC,CAI1F"}
1
+ {"version":3,"file":"server.d.ts","sourceRoot":"","sources":["../src/server.ts"],"names":[],"mappings":"AAAA;;;;;GAKG;AAUH,OAAO,KAAK,EAAE,aAAa,EAAE,MAAM,qBAAqB,CAAC;AAMzD,OAAO,KAAK,EAAE,eAAe,EAAE,MAAM,YAAY,CAAC;AAElD,MAAM,WAAW,eAAe;IAC9B;;OAEG;IACH,QAAQ,EAAE,eAAe,CAAC;IAE1B;;OAEG;IACH,SAAS,EAAE,aAAa,CAAC;IAEzB;;OAEG;IACH,IAAI,CAAC,EAAE,MAAM,CAAC;IAEd;;OAEG;IACH,OAAO,CAAC,EAAE,MAAM,CAAC;IAEjB;;OAEG;IACH,QAAQ,CAAC,EAAE,MAAM,CAAC;CACnB;AA6BD,qBAAa,kBAAkB;IAC7B,OAAO,CAAC,MAAM,CAAS;IACvB,OAAO,CAAC,MAAM,CAAkB;gBAEpB,MAAM,EAAE,eAAe;IAoBnC,OAAO,CAAC,aAAa;IAuOrB;;OAEG;IACG,KAAK;IAQX;;OAEG;IACG,IAAI;CAGX;AAED;;GAEG;AACH,wBAAsB,eAAe,CAAC,MAAM,EAAE,eAAe,GAAG,OAAO,CAAC,kBAAkB,CAAC,CAI1F"}
package/dist/server.js CHANGED
@@ -12,10 +12,31 @@ import { getDatasetSchemaTool } from './tools/introspect.js';
12
12
  import { queryMetricTool } from './tools/query-metric.js';
13
13
  import { queryDatasetTool } from './tools/query-dataset.js';
14
14
  import { datasetGuidePrompt } from './prompts/dataset-guide.js';
15
+ function isRecord(value) {
16
+ return !!value && typeof value === 'object';
17
+ }
18
+ function getTenantKey(dataset) {
19
+ const config = dataset.config;
20
+ const configTenantKey = isRecord(config) ? config.tenantKey : undefined;
21
+ const tenantKey = dataset.tenantKey ?? configTenantKey;
22
+ return typeof tenantKey === 'string' && tenantKey.length > 0 ? tenantKey : undefined;
23
+ }
24
+ function validateTenantConfig(config) {
25
+ if (config.tenantId) {
26
+ return;
27
+ }
28
+ const tenantScopedDatasets = Object.entries(config.datasets ?? {})
29
+ .filter(([, ds]) => getTenantKey(ds))
30
+ .map(([name]) => name);
31
+ if (tenantScopedDatasets.length > 0) {
32
+ throw new Error(`MCP server tenantId is required for tenant-scoped datasets: ${tenantScopedDatasets.join(', ')}`);
33
+ }
34
+ }
15
35
  export class HypequeryMCPServer {
16
36
  server;
17
37
  config;
18
38
  constructor(config) {
39
+ validateTenantConfig(config);
19
40
  this.config = config;
20
41
  this.server = new Server({
21
42
  name: config.name ?? 'hypequery-mcp-server',
@@ -110,6 +131,10 @@ export class HypequeryMCPServer {
110
131
  type: 'number',
111
132
  description: 'Maximum number of rows to return (optional)',
112
133
  },
134
+ offset: {
135
+ type: 'number',
136
+ description: 'Number of rows to skip before returning results (optional)',
137
+ },
113
138
  },
114
139
  required: ['dataset', 'metric'],
115
140
  },
@@ -171,6 +196,10 @@ export class HypequeryMCPServer {
171
196
  type: 'number',
172
197
  description: 'Maximum number of rows to return (optional)',
173
198
  },
199
+ offset: {
200
+ type: 'number',
201
+ description: 'Number of rows to skip before returning results (optional)',
202
+ },
174
203
  },
175
204
  required: ['dataset'],
176
205
  },
@@ -187,9 +216,9 @@ export class HypequeryMCPServer {
187
216
  case 'get_dataset_schema':
188
217
  return await getDatasetSchemaTool(this.config.datasets, args);
189
218
  case 'query_metric':
190
- return await queryMetricTool(this.config.datasets, this.config.executor, args);
219
+ return await queryMetricTool(this.config.datasets, this.config.analytics, args, { tenantId: this.config.tenantId });
191
220
  case 'query_dataset':
192
- return await queryDatasetTool(this.config.datasets, this.config.executor, args);
221
+ return await queryDatasetTool(this.config.datasets, this.config.analytics, args, { tenantId: this.config.tenantId });
193
222
  default:
194
223
  throw new Error(`Unknown tool: ${name}`);
195
224
  }
@@ -0,0 +1,137 @@
1
+ import { z } from 'zod';
2
+ import type { MetricFilter } from '@hypequery/datasets';
3
+ export declare const queryMetricArgsSchema: z.ZodObject<{
4
+ dimensions: z.ZodOptional<z.ZodArray<z.ZodString, "many">>;
5
+ filters: z.ZodOptional<z.ZodArray<z.ZodObject<{
6
+ field: z.ZodString;
7
+ operator: z.ZodEnum<["eq", "neq", "gt", "gte", "lt", "lte", "in", "notIn", "between", "like"]>;
8
+ value: z.ZodEffects<z.ZodAny, any, any>;
9
+ }, "strict", z.ZodTypeAny, {
10
+ field: string;
11
+ operator: "eq" | "neq" | "gt" | "gte" | "lt" | "lte" | "in" | "notIn" | "between" | "like";
12
+ value?: any;
13
+ }, {
14
+ field: string;
15
+ operator: "eq" | "neq" | "gt" | "gte" | "lt" | "lte" | "in" | "notIn" | "between" | "like";
16
+ value?: any;
17
+ }>, "many">>;
18
+ grain: z.ZodOptional<z.ZodEnum<["day", "week", "month", "quarter", "year"]>>;
19
+ orderBy: z.ZodOptional<z.ZodArray<z.ZodObject<{
20
+ field: z.ZodString;
21
+ direction: z.ZodEnum<["asc", "desc"]>;
22
+ }, "strict", z.ZodTypeAny, {
23
+ field: string;
24
+ direction: "asc" | "desc";
25
+ }, {
26
+ field: string;
27
+ direction: "asc" | "desc";
28
+ }>, "many">>;
29
+ limit: z.ZodOptional<z.ZodNumber>;
30
+ offset: z.ZodOptional<z.ZodNumber>;
31
+ } & {
32
+ dataset: z.ZodOptional<z.ZodString>;
33
+ metric: z.ZodOptional<z.ZodString>;
34
+ }, "strict", z.ZodTypeAny, {
35
+ dataset?: string | undefined;
36
+ metric?: string | undefined;
37
+ dimensions?: string[] | undefined;
38
+ filters?: {
39
+ field: string;
40
+ operator: "eq" | "neq" | "gt" | "gte" | "lt" | "lte" | "in" | "notIn" | "between" | "like";
41
+ value?: any;
42
+ }[] | undefined;
43
+ grain?: "day" | "week" | "month" | "quarter" | "year" | undefined;
44
+ orderBy?: {
45
+ field: string;
46
+ direction: "asc" | "desc";
47
+ }[] | undefined;
48
+ limit?: number | undefined;
49
+ offset?: number | undefined;
50
+ }, {
51
+ dataset?: string | undefined;
52
+ metric?: string | undefined;
53
+ dimensions?: string[] | undefined;
54
+ filters?: {
55
+ field: string;
56
+ operator: "eq" | "neq" | "gt" | "gte" | "lt" | "lte" | "in" | "notIn" | "between" | "like";
57
+ value?: any;
58
+ }[] | undefined;
59
+ grain?: "day" | "week" | "month" | "quarter" | "year" | undefined;
60
+ orderBy?: {
61
+ field: string;
62
+ direction: "asc" | "desc";
63
+ }[] | undefined;
64
+ limit?: number | undefined;
65
+ offset?: number | undefined;
66
+ }>;
67
+ export declare const queryDatasetArgsSchema: z.ZodObject<{
68
+ dimensions: z.ZodOptional<z.ZodArray<z.ZodString, "many">>;
69
+ filters: z.ZodOptional<z.ZodArray<z.ZodObject<{
70
+ field: z.ZodString;
71
+ operator: z.ZodEnum<["eq", "neq", "gt", "gte", "lt", "lte", "in", "notIn", "between", "like"]>;
72
+ value: z.ZodEffects<z.ZodAny, any, any>;
73
+ }, "strict", z.ZodTypeAny, {
74
+ field: string;
75
+ operator: "eq" | "neq" | "gt" | "gte" | "lt" | "lte" | "in" | "notIn" | "between" | "like";
76
+ value?: any;
77
+ }, {
78
+ field: string;
79
+ operator: "eq" | "neq" | "gt" | "gte" | "lt" | "lte" | "in" | "notIn" | "between" | "like";
80
+ value?: any;
81
+ }>, "many">>;
82
+ grain: z.ZodOptional<z.ZodEnum<["day", "week", "month", "quarter", "year"]>>;
83
+ orderBy: z.ZodOptional<z.ZodArray<z.ZodObject<{
84
+ field: z.ZodString;
85
+ direction: z.ZodEnum<["asc", "desc"]>;
86
+ }, "strict", z.ZodTypeAny, {
87
+ field: string;
88
+ direction: "asc" | "desc";
89
+ }, {
90
+ field: string;
91
+ direction: "asc" | "desc";
92
+ }>, "many">>;
93
+ limit: z.ZodOptional<z.ZodNumber>;
94
+ offset: z.ZodOptional<z.ZodNumber>;
95
+ } & {
96
+ dataset: z.ZodOptional<z.ZodString>;
97
+ metrics: z.ZodOptional<z.ZodArray<z.ZodString, "many">>;
98
+ }, "strict", z.ZodTypeAny, {
99
+ dataset?: string | undefined;
100
+ dimensions?: string[] | undefined;
101
+ filters?: {
102
+ field: string;
103
+ operator: "eq" | "neq" | "gt" | "gte" | "lt" | "lte" | "in" | "notIn" | "between" | "like";
104
+ value?: any;
105
+ }[] | undefined;
106
+ grain?: "day" | "week" | "month" | "quarter" | "year" | undefined;
107
+ orderBy?: {
108
+ field: string;
109
+ direction: "asc" | "desc";
110
+ }[] | undefined;
111
+ limit?: number | undefined;
112
+ offset?: number | undefined;
113
+ metrics?: string[] | undefined;
114
+ }, {
115
+ dataset?: string | undefined;
116
+ dimensions?: string[] | undefined;
117
+ filters?: {
118
+ field: string;
119
+ operator: "eq" | "neq" | "gt" | "gte" | "lt" | "lte" | "in" | "notIn" | "between" | "like";
120
+ value?: any;
121
+ }[] | undefined;
122
+ grain?: "day" | "week" | "month" | "quarter" | "year" | undefined;
123
+ orderBy?: {
124
+ field: string;
125
+ direction: "asc" | "desc";
126
+ }[] | undefined;
127
+ limit?: number | undefined;
128
+ offset?: number | undefined;
129
+ metrics?: string[] | undefined;
130
+ }>;
131
+ export declare function parseToolArgs<T>(schema: z.ZodType<T>, toolName: string, args: unknown): T;
132
+ export declare function toMetricFilters(filters?: Array<{
133
+ field: string;
134
+ operator: MetricFilter['operator'];
135
+ value?: unknown;
136
+ }>): MetricFilter[];
137
+ //# sourceMappingURL=args.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"args.d.ts","sourceRoot":"","sources":["../../src/tools/args.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;AACxB,OAAO,KAAK,EAAE,YAAY,EAAE,MAAM,qBAAqB,CAAC;AAuBxD,eAAO,MAAM,qBAAqB;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;EAGhC,CAAC;AAEH,eAAO,MAAM,sBAAsB;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;EAGjC,CAAC;AAWH,wBAAgB,aAAa,CAAC,CAAC,EAAE,MAAM,EAAE,CAAC,CAAC,OAAO,CAAC,CAAC,CAAC,EAAE,QAAQ,EAAE,MAAM,EAAE,IAAI,EAAE,OAAO,GAAG,CAAC,CAMzF;AAED,wBAAgB,eAAe,CAC7B,OAAO,GAAE,KAAK,CAAC;IAAE,KAAK,EAAE,MAAM,CAAC;IAAC,QAAQ,EAAE,YAAY,CAAC,UAAU,CAAC,CAAC;IAAC,KAAK,CAAC,EAAE,OAAO,CAAA;CAAE,CAAM,GAC1F,YAAY,EAAE,CAMhB"}
@@ -0,0 +1,49 @@
1
+ import { z } from 'zod';
2
+ import { MAX_QUERY_LIMIT } from '../types.js';
3
+ const filterSchema = z.object({
4
+ field: z.string().min(1),
5
+ operator: z.enum(['eq', 'neq', 'gt', 'gte', 'lt', 'lte', 'in', 'notIn', 'between', 'like']),
6
+ value: z.any().refine(value => value !== undefined, 'Required'),
7
+ }).strict();
8
+ const orderBySchema = z.object({
9
+ field: z.string().min(1),
10
+ direction: z.enum(['asc', 'desc']),
11
+ }).strict();
12
+ const baseQuerySchema = z.object({
13
+ dimensions: z.array(z.string().min(1)).optional(),
14
+ filters: z.array(filterSchema).optional(),
15
+ grain: z.enum(['day', 'week', 'month', 'quarter', 'year']).optional(),
16
+ orderBy: z.array(orderBySchema).optional(),
17
+ limit: z.number().int().nonnegative().max(MAX_QUERY_LIMIT).optional(),
18
+ offset: z.number().int().nonnegative().optional(),
19
+ }).strict();
20
+ export const queryMetricArgsSchema = baseQuerySchema.extend({
21
+ dataset: z.string().min(1).optional(),
22
+ metric: z.string().min(1).optional(),
23
+ });
24
+ export const queryDatasetArgsSchema = baseQuerySchema.extend({
25
+ dataset: z.string().min(1).optional(),
26
+ metrics: z.array(z.string().min(1)).optional(),
27
+ });
28
+ function formatZodError(error) {
29
+ return error.issues
30
+ .map(issue => {
31
+ const path = issue.path.length > 0 ? issue.path.join('.') : 'arguments';
32
+ return `${path}: ${issue.message}`;
33
+ })
34
+ .join('; ');
35
+ }
36
+ export function parseToolArgs(schema, toolName, args) {
37
+ const result = schema.safeParse(args);
38
+ if (!result.success) {
39
+ throw new Error(`Invalid ${toolName} arguments: ${formatZodError(result.error)}`);
40
+ }
41
+ return result.data;
42
+ }
43
+ export function toMetricFilters(filters = []) {
44
+ return filters.map(filter => ({
45
+ field: filter.field,
46
+ operator: filter.operator,
47
+ value: filter.value,
48
+ }));
49
+ }
@@ -3,7 +3,7 @@
3
3
  *
4
4
  * Executes an ad-hoc dataset query with custom dimensions and metrics.
5
5
  */
6
- import type { MetricExecutor } from '@hypequery/datasets';
7
- import type { DatasetRegistry, MCPToolResponse } from '../types.js';
8
- export declare function queryDatasetTool(datasets: DatasetRegistry, executor: MetricExecutor, args: unknown): Promise<MCPToolResponse>;
6
+ import type { DatasetClient } from '@hypequery/datasets';
7
+ import type { DatasetRegistry, MCPToolResponse, QueryToolOptions } from '../types.js';
8
+ export declare function queryDatasetTool(datasets: DatasetRegistry, analytics: DatasetClient, args: unknown, options?: QueryToolOptions): Promise<MCPToolResponse>;
9
9
  //# sourceMappingURL=query-dataset.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"query-dataset.d.ts","sourceRoot":"","sources":["../../src/tools/query-dataset.ts"],"names":[],"mappings":"AAAA;;;;GAIG;AAEH,OAAO,KAAK,EAAE,cAAc,EAAE,MAAM,qBAAqB,CAAC;AAE1D,OAAO,KAAK,EAAE,eAAe,EAAoB,eAAe,EAAwC,MAAM,aAAa,CAAC;AAE5H,wBAAsB,gBAAgB,CACpC,QAAQ,EAAE,eAAe,EACzB,QAAQ,EAAE,cAAc,EACxB,IAAI,EAAE,OAAO,GACZ,OAAO,CAAC,eAAe,CAAC,CAgE1B"}
1
+ {"version":3,"file":"query-dataset.d.ts","sourceRoot":"","sources":["../../src/tools/query-dataset.ts"],"names":[],"mappings":"AAAA;;;;GAIG;AAEH,OAAO,KAAK,EAAE,aAAa,EAAgB,MAAM,qBAAqB,CAAC;AACvE,OAAO,KAAK,EAAE,eAAe,EAAE,eAAe,EAAuB,gBAAgB,EAAE,MAAM,aAAa,CAAC;AAG3G,wBAAsB,gBAAgB,CACpC,QAAQ,EAAE,eAAe,EACzB,SAAS,EAAE,aAAa,EACxB,IAAI,EAAE,OAAO,EACb,OAAO,GAAE,gBAAqB,GAC7B,OAAO,CAAC,eAAe,CAAC,CA8D1B"}
@@ -3,11 +3,10 @@
3
3
  *
4
4
  * Executes an ad-hoc dataset query with custom dimensions and metrics.
5
5
  */
6
- import { runDatasetQuery } from '@hypequery/datasets/internal';
7
- export async function queryDatasetTool(datasets, executor, args) {
8
- // Parse and validate args
9
- const validatedArgs = args;
10
- const { dataset: datasetName, dimensions, metrics, filters, grain, orderBy, limit } = validatedArgs;
6
+ import { parseToolArgs, queryDatasetArgsSchema, toMetricFilters } from './args.js';
7
+ export async function queryDatasetTool(datasets, analytics, args, options = {}) {
8
+ const validatedArgs = parseToolArgs(queryDatasetArgsSchema, 'query_dataset', args);
9
+ const { dataset: datasetName, dimensions, metrics, filters, grain, orderBy, limit, offset } = validatedArgs;
11
10
  if (!datasetName) {
12
11
  throw new Error('dataset parameter is required');
13
12
  }
@@ -22,23 +21,21 @@ export async function queryDatasetTool(datasets, executor, args) {
22
21
  const query = {
23
22
  dimensions: dimensions || [],
24
23
  measures: metrics || [],
25
- filters: filters || [],
24
+ filters: toMetricFilters(filters),
26
25
  orderBy: orderBy || [],
27
26
  };
28
27
  if (grain) {
29
28
  query.by = grain;
30
29
  }
31
- // Apply limit with maximum cap
32
- const MAX_LIMIT = 10000;
33
30
  if (limit !== undefined) {
34
- query.limit = Math.min(limit, MAX_LIMIT);
31
+ query.limit = limit;
35
32
  }
36
- const result = await runDatasetQuery(dataset, query, {
37
- builderFactory: executor.getBuilderFactory(),
38
- context: {
39
- runtime: {
40
- tenant: undefined,
41
- },
33
+ if (offset !== undefined) {
34
+ query.offset = offset;
35
+ }
36
+ const result = await analytics.execute(dataset, query, {
37
+ runtime: {
38
+ tenant: options.tenantId ? { id: options.tenantId } : undefined,
42
39
  },
43
40
  });
44
41
  // Format the response with proper types
@@ -48,6 +45,7 @@ export async function queryDatasetTool(datasets, executor, args) {
48
45
  sql: result.meta?.sql,
49
46
  timingMs: result.meta?.timingMs,
50
47
  rowCount: result.data.length,
48
+ ...(result.meta?.pagination ? { pagination: result.meta.pagination } : {}),
51
49
  },
52
50
  };
53
51
  return {
@@ -3,7 +3,7 @@
3
3
  *
4
4
  * Executes a metric query with optional dimensions, filters, grain, and sorting.
5
5
  */
6
- import type { MetricExecutor } from '@hypequery/datasets';
7
- import type { DatasetRegistry, MCPToolResponse } from '../types.js';
8
- export declare function queryMetricTool(datasets: DatasetRegistry, executor: MetricExecutor, args: unknown): Promise<MCPToolResponse>;
6
+ import type { DatasetClient } from '@hypequery/datasets';
7
+ import type { DatasetRegistry, MCPToolResponse, QueryToolOptions } from '../types.js';
8
+ export declare function queryMetricTool(datasets: DatasetRegistry, analytics: DatasetClient, args: unknown, options?: QueryToolOptions): Promise<MCPToolResponse>;
9
9
  //# sourceMappingURL=query-metric.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"query-metric.d.ts","sourceRoot":"","sources":["../../src/tools/query-metric.ts"],"names":[],"mappings":"AAAA;;;;GAIG;AAEH,OAAO,KAAK,EAAE,cAAc,EAAe,MAAM,qBAAqB,CAAC;AACvE,OAAO,KAAK,EAAE,eAAe,EAAmB,eAAe,EAAwC,MAAM,aAAa,CAAC;AAE3H,wBAAsB,eAAe,CACnC,QAAQ,EAAE,eAAe,EACzB,QAAQ,EAAE,cAAc,EACxB,IAAI,EAAE,OAAO,GACZ,OAAO,CAAC,eAAe,CAAC,CAqE1B"}
1
+ {"version":3,"file":"query-metric.d.ts","sourceRoot":"","sources":["../../src/tools/query-metric.ts"],"names":[],"mappings":"AAAA;;;;GAIG;AAEH,OAAO,KAAK,EAAE,aAAa,EAAe,MAAM,qBAAqB,CAAC;AACtE,OAAO,KAAK,EAAE,eAAe,EAAE,eAAe,EAAuB,gBAAgB,EAAE,MAAM,aAAa,CAAC;AAG3G,wBAAsB,eAAe,CACnC,QAAQ,EAAE,eAAe,EACzB,SAAS,EAAE,aAAa,EACxB,IAAI,EAAE,OAAO,EACb,OAAO,GAAE,gBAAqB,GAC7B,OAAO,CAAC,eAAe,CAAC,CAqE1B"}
@@ -3,10 +3,10 @@
3
3
  *
4
4
  * Executes a metric query with optional dimensions, filters, grain, and sorting.
5
5
  */
6
- export async function queryMetricTool(datasets, executor, args) {
7
- // Parse and validate args
8
- const validatedArgs = args;
9
- const { dataset: datasetName, metric: metricName, dimensions, filters, grain, orderBy, limit } = validatedArgs;
6
+ import { parseToolArgs, queryMetricArgsSchema, toMetricFilters } from './args.js';
7
+ export async function queryMetricTool(datasets, analytics, args, options = {}) {
8
+ const validatedArgs = parseToolArgs(queryMetricArgsSchema, 'query_metric', args);
9
+ const { dataset: datasetName, metric: metricName, dimensions, filters, grain, orderBy, limit, offset } = validatedArgs;
10
10
  if (!datasetName) {
11
11
  throw new Error('dataset parameter is required');
12
12
  }
@@ -25,22 +25,22 @@ export async function queryMetricTool(datasets, executor, args) {
25
25
  // Build the query with proper types
26
26
  const query = {
27
27
  dimensions: dimensions || [],
28
- filters: filters || [],
28
+ filters: toMetricFilters(filters),
29
29
  orderBy: orderBy || [],
30
30
  };
31
31
  if (grain) {
32
32
  query.by = grain;
33
33
  }
34
- // Apply limit with maximum cap
35
- const MAX_LIMIT = 10000;
36
34
  if (limit !== undefined) {
37
- query.limit = Math.min(limit, MAX_LIMIT);
35
+ query.limit = limit;
36
+ }
37
+ if (offset !== undefined) {
38
+ query.offset = offset;
38
39
  }
39
40
  // Execute the query
40
- const result = await executor.run(metric, query, {
41
+ const result = await analytics.execute(metric, query, {
41
42
  runtime: {
42
- builderFactory: executor.getBuilderFactory(),
43
- tenant: undefined,
43
+ tenant: options.tenantId ? { id: options.tenantId } : undefined,
44
44
  },
45
45
  });
46
46
  // Format the response with proper types
@@ -50,6 +50,7 @@ export async function queryMetricTool(datasets, executor, args) {
50
50
  sql: result.meta?.sql,
51
51
  timingMs: result.meta?.timingMs,
52
52
  rowCount: result.data.length,
53
+ ...(result.meta?.pagination ? { pagination: result.meta.pagination } : {}),
53
54
  },
54
55
  };
55
56
  return {
package/dist/types.d.ts CHANGED
@@ -18,6 +18,7 @@ export interface QueryMetricArgs {
18
18
  grain?: TimeGrain;
19
19
  orderBy?: MetricOrderBy[];
20
20
  limit?: number;
21
+ offset?: number;
21
22
  }
22
23
  /**
23
24
  * Arguments for query_dataset tool
@@ -30,6 +31,10 @@ export interface QueryDatasetArgs {
30
31
  grain?: TimeGrain;
31
32
  orderBy?: MetricOrderBy[];
32
33
  limit?: number;
34
+ offset?: number;
35
+ }
36
+ export interface QueryToolOptions {
37
+ tenantId?: string;
33
38
  }
34
39
  /**
35
40
  * Arguments for get_dataset_schema tool
@@ -113,6 +118,15 @@ export interface QueryResultMeta {
113
118
  sql?: string;
114
119
  timingMs?: number;
115
120
  rowCount: number;
121
+ /**
122
+ * Offset pagination state. Present when the query specified a `limit`.
123
+ * `hasMore` lets callers know whether to request the next `offset` page.
124
+ */
125
+ pagination?: {
126
+ limit: number;
127
+ offset: number;
128
+ hasMore: boolean;
129
+ };
116
130
  }
117
131
  /**
118
132
  * Query result response
@@ -1 +1 @@
1
- {"version":3,"file":"types.d.ts","sourceR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AAM,CAAC;IACb,MAAM,EAAE,MAAM,CAAC;IACf,WAAW,EAAE,MAAM,CAAC;CACrB;AAED;;GAEG;AACH,MAAM,WAAW,eAAe;IAC9B,IAAI,EAAE,MAAM,CAAC;IACb,WAAW,EAAE,MAAM,CAAC;IACpB,cAAc,EAAE,MAAM,CAAC;IACvB,WAAW,EAAE,MAAM,CAAC;CACrB;AAED;;GAEG;AACH,MAAM,WAAW,oBAAoB;IACnC,QAAQ,EAAE,eAAe,EAAE,CAAC;IAC5B,KAAK,EAAE,MAAM,CAAC;CACf;AAED;;GAEG;AACH,MAAM,WAAW,eAAe;IAC9B,GAAG,CAAC,EAAE,MAAM,CAAC;IACb,QAAQ,CAAC,EAAE,MAAM,CAAC;IAClB,QAAQ,EAAE,MAAM,CAAC;IACjB;;;OAGG;IACH,UAAU,CAAC,EAAE;QACX,KAAK,EAAE,MAAM,CAAC;QACd,MAAM,EAAE,MAAM,CAAC;QACf,OAAO,EAAE,OAAO,CAAC;KAClB,CAAC;CACH;AAED;;GAEG;AACH,MAAM,WAAW,mBAAmB;IAClC,IAAI,EAAE,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,EAAE,CAAC;IAChC,IAAI,EAAE,eAAe,CAAC;CACvB;AAED;;GAEG;AACH,eAAO,MAAM,eAAe,QAAQ,CAAC;AACrC,eAAO,MAAM,mBAAmB,MAAM,CAAC"}
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@hypequery/mcp",
3
- "version": "0.1.0",
3
+ "version": "0.2.0",
4
4
  "description": "Model Context Protocol (MCP) server for Hypequery semantic layer",
5
5
  "license": "Apache-2.0",
6
6
  "type": "module",
@@ -20,9 +20,9 @@
20
20
  "dist"
21
21
  ],
22
22
  "dependencies": {
23
+ "@hypequery/datasets": "^0.2.0",
23
24
  "@modelcontextprotocol/sdk": "^1.29.0",
24
- "zod": "^3.23.8",
25
- "@hypequery/datasets": "0.1.0"
25
+ "zod": "^3.23.8"
26
26
  },
27
27
  "devDependencies": {
28
28
  "@types/node": "^20.11.30",