原型 · 预览版:收录官方注册中心里的全部服务器,每 30 分钟同步一次。使用 Google 登录即可撰写评价。原型 · 每 30 分钟更新
PopNx MCP为使用 AI 的人准备的 MCP 服务器 · 用大白话讲清楚

hypequery ClickHouse

作者:hypequery版本 0.14.0i★ 106 (整个仓库的星标)i在你的电脑上运行
注册名称io.github.hypequery/hypequery

安装方法

What it does

Governed ClickHouse analytics for agents: named datasets and metrics as tools, never raw SQL.

  • Connects 在你的电脑上运行
  • Account or key No key needed
  • Category 数据库与数据集

可搭配使用

教 AI 做这类工作的 Skill,可与本项一起使用

timesfm

TimesFM (Time Series Foundation Model) is a pretrained time-series foundation model developed by Google Research for time-series forecasting.

作者:google-research★ 35,5671 个 skill

Skill · 操作手册

安装

选择你使用的 AI 应用,然后复制设置。

通过 2/3 项检查 · 在你的电脑上运行 · ✓ 命令已检查 2026年11月16日

第一步:你用哪个 AI?

选择你用的应用,步骤会显示在下方。

可连接 Claude,但需要先准备

需要先在电脑上安装 Node.js(只需一次) · 仅限电脑上的 Claude 应用(Windows 或 Mac),网页和手机不可用

让 AI 帮你安装

把这段话复制到 Claude 的对话里。AI 会先检查电脑,告诉你要改哪个文件,并且每次都等你同意。

请在这台电脑上为 Claude 安装 MCP server hypequery ClickHouse,按顺序:1) 用 node -v 检查是否有 Node.js。没有的话,请让我从 https://nodejs.org/en/download 安装,不要自己安装。2) 只使用这份配置(已通过 PopNx MCP 检查):{ "mcpServers": { "hypequery": { "command": "npx", "args": [ "-y", "@hypequery/mcp", "--config", "your-value" ] } } } 3) 告诉我要修改的文件完整路径或要运行的命令,等我同意。4) 不需要密钥。5) 按约定执行,然后确认 hypequery ClickHouse 的工具真的出现了。

这段话不包含你的密钥。如果需要密钥,AI 会请你自己粘贴到文件或应用的输入框里。

  1. 安装 Node.js(如果还没有)

    已经装好了吗?先检查 · 打开终端,输入这条命令后按 Enter

    node -v
    • 显示版本号(例如 v26.13.1)= 已安装,可跳过这一步
    • 显示 "command not found"(Windows 显示 "is not recognized")= 还没安装,或刚装好但需要关掉终端再重新打开
    怎么打开终端

    Mac:按 ⌘ + Space,输入 Terminal 后按 Enter

    Windows:打开“开始”菜单,输入 Windows PowerShell,然后选“打开”

    还没安装: 打开官方下载页,选择 LTS 版本和点选式安装程序:Mac 用 .pkg · Windows 用 .msi。双击后一路下一步即可,不需要 curl 命令

    打开 Node.js 下载页 ↗

    装好后关掉终端再打开,重新运行同一条命令,应显示版本号: node -v

    安装一次,所有需要 Node.js 的工具都能用

  2. 打开电脑版 Claude 应用的设置文件

    SettingsDeveloperEdit Config

  3. 粘贴这些设置并保存文件

    {
      "mcpServers": {
        "hypequery": {
          "command": "npx",
          "args": [
            "-y",
            "@hypequery/mcp",
            "--config",
            "your-value"
          ]
        }
      }
    }
  4. 退出 Claude 再重新打开

  5. 试一试

    用 hypequery ClickHouse 告诉我你能帮我做什么,然后做一件给我看

    ✓ 如果 Claude 说正在使用 hypequery ClickHouse,或回答中出现 hypequery ClickHouse 的工具名称,就表示连接成功

菜单名称已于 2026年11月11日 对照 Anthropic 帮助页面核实 · 你的界面可能因版本略有不同

ChatGPT 暂时无法连接 hypequery ClickHouse

hypequery ClickHouse 需要安装在你的电脑上,而 ChatGPT 只能连接在网上运行的服务器

你可以改用这些方式

A · 使用能连接 hypequery ClickHouse 的应用

  • 需要先在电脑上安装 Node.js(只需一次) · 仅限电脑上的 Claude 应用(Windows 或 Mac),网页和手机不可用
  • 需要先在电脑上安装 Node.js(只需一次)
  • 需要先在电脑上安装 Node.js(只需一次) · 没有一键按钮,需要粘贴设置并自行填写
  • 需要先在电脑上安装 Node.js(只需一次) · 没有一键按钮,需要粘贴设置并自行填写

B · 数据库与数据集 类中能连接 ChatGPT 的其他服务器

从同类中使用较多的里挑选,仅限用地址即可连接、无需密钥的

可连接 Claude Code,但需要先准备

需要先在电脑上安装 Node.js(只需一次)

让 AI 帮你安装

把这段话复制到 Claude Code 的对话里。AI 会先检查电脑,告诉你要改哪个文件,并且每次都等你同意。

请在这台电脑上为 Claude Code 安装 MCP server hypequery ClickHouse,按顺序:1) 用 node -v 检查是否有 Node.js。没有的话,请让我从 https://nodejs.org/en/download 安装,不要自己安装。2) 只使用这份配置(已通过 PopNx MCP 检查):claude mcp add --scope user hypequery -- npx -y @hypequery/mcp --config your-value 3) 告诉我要修改的文件完整路径或要运行的命令,等我同意。4) 不需要密钥。5) 按约定执行,然后确认 hypequery ClickHouse 的工具真的出现了。

这段话不包含你的密钥。如果需要密钥,AI 会请你自己粘贴到文件或应用的输入框里。

  1. 安装 Node.js(如果还没有)

    已经装好了吗?先检查 · 打开终端,输入这条命令后按 Enter

    node -v
    • 显示版本号(例如 v26.13.1)= 已安装,可跳过这一步
    • 显示 "command not found"(Windows 显示 "is not recognized")= 还没安装,或刚装好但需要关掉终端再重新打开
    怎么打开终端

    Mac:按 ⌘ + Space,输入 Terminal 后按 Enter

    Windows:打开“开始”菜单,输入 Windows PowerShell,然后选“打开”

    还没安装: 打开官方下载页,选择 LTS 版本和点选式安装程序:Mac 用 .pkg · Windows 用 .msi。双击后一路下一步即可,不需要 curl 命令

    打开 Node.js 下载页 ↗

    装好后关掉终端再打开,重新运行同一条命令,应显示版本号: node -v

    安装一次,所有需要 Node.js 的工具都能用

  2. 打开终端

    Mac:按 Command+空格,输入 Terminal · Windows:打开 PowerShell

  3. 粘贴这条命令并按 Enter

    claude mcp add --scope user hypequery -- npx -y @hypequery/mcp --config your-value
  4. 在 Claude Code 中输入 /mcp

    应能看到 hypequery ClickHouse 在列表中并显示已连接

  5. 试一试

    用 hypequery ClickHouse 告诉我你能帮我做什么,然后做一件给我看

    ✓ 如果 Claude Code 说正在使用 hypequery ClickHouse,或回答中出现 hypequery ClickHouse 的工具名称,就表示连接成功

菜单名称已于 2026年11月11日 对照 Anthropic 帮助页面核实 · 你的界面可能因版本略有不同

可连接 Cursor,但需要先准备

需要先在电脑上安装 Node.js(只需一次) · 没有一键按钮,需要粘贴设置并自行填写

让 AI 帮你安装

把这段话复制到 Cursor 的对话里。AI 会先检查电脑,告诉你要改哪个文件,并且每次都等你同意。

请在这台电脑上为 Cursor 安装 MCP server hypequery ClickHouse,按顺序:1) 用 node -v 检查是否有 Node.js。没有的话,请让我从 https://nodejs.org/en/download 安装,不要自己安装。2) 只使用这份配置(已通过 PopNx MCP 检查):{ "mcpServers": { "hypequery": { "command": "npx", "args": [ "-y", "@hypequery/mcp", "--config", "your-value" ] } } } 3) 告诉我要修改的文件完整路径或要运行的命令,等我同意。4) 不需要密钥。5) 按约定执行,然后确认 hypequery ClickHouse 的工具真的出现了。

这段话不包含你的密钥。如果需要密钥,AI 会请你自己粘贴到文件或应用的输入框里。

  1. 安装 Node.js(如果还没有)

    已经装好了吗?先检查 · 打开终端,输入这条命令后按 Enter

    node -v
    • 显示版本号(例如 v26.13.1)= 已安装,可跳过这一步
    • 显示 "command not found"(Windows 显示 "is not recognized")= 还没安装,或刚装好但需要关掉终端再重新打开
    怎么打开终端

    Mac:按 ⌘ + Space,输入 Terminal 后按 Enter

    Windows:打开“开始”菜单,输入 Windows PowerShell,然后选“打开”

    还没安装: 打开官方下载页,选择 LTS 版本和点选式安装程序:Mac 用 .pkg · Windows 用 .msi。双击后一路下一步即可,不需要 curl 命令

    打开 Node.js 下载页 ↗

    装好后关掉终端再打开,重新运行同一条命令,应显示版本号: node -v

    安装一次,所有需要 Node.js 的工具都能用

  2. 打开 Cursor 的 MCP 设置文件

    ~/.cursor/mcp.json

    粘贴这些设置,填写空着的值并保存

    {
      "mcpServers": {
        "hypequery": {
          "command": "npx",
          "args": [
            "-y",
            "@hypequery/mcp",
            "--config",
            "your-value"
          ]
        }
      }
    }
  3. 在 Cursor 中以 Agent 模式打开 AI 聊天

  4. 试一试

    用 hypequery ClickHouse 告诉我你能帮我做什么,然后做一件给我看

    ✓ 如果 Cursor 说正在使用 hypequery ClickHouse,或回答中出现 hypequery ClickHouse 的工具名称,就表示连接成功

菜单名称已于 2026年11月11日 对照 Cursor 帮助页面核实 · 你的界面可能因版本略有不同

可连接 VS Code,但需要先准备

需要先在电脑上安装 Node.js(只需一次) · 没有一键按钮,需要粘贴设置并自行填写

让 AI 帮你安装

把这段话复制到 VS Code 的对话里。AI 会先检查电脑,告诉你要改哪个文件,并且每次都等你同意。

请在这台电脑上为 VS Code 安装 MCP server hypequery ClickHouse,按顺序:1) 用 node -v 检查是否有 Node.js。没有的话,请让我从 https://nodejs.org/en/download 安装,不要自己安装。2) 只使用这份配置(已通过 PopNx MCP 检查):{ "servers": { "hypequery": { "type": "stdio", "command": "npx", "args": [ "-y", "@hypequery/mcp", "--config", "your-value" ] } } } 3) 告诉我要修改的文件完整路径或要运行的命令,等我同意。4) 不需要密钥。5) 按约定执行,然后确认 hypequery ClickHouse 的工具真的出现了。

这段话不包含你的密钥。如果需要密钥,AI 会请你自己粘贴到文件或应用的输入框里。

  1. 安装 Node.js(如果还没有)

    已经装好了吗?先检查 · 打开终端,输入这条命令后按 Enter

    node -v
    • 显示版本号(例如 v26.13.1)= 已安装,可跳过这一步
    • 显示 "command not found"(Windows 显示 "is not recognized")= 还没安装,或刚装好但需要关掉终端再重新打开
    怎么打开终端

    Mac:按 ⌘ + Space,输入 Terminal 后按 Enter

    Windows:打开“开始”菜单,输入 Windows PowerShell,然后选“打开”

    还没安装: 打开官方下载页,选择 LTS 版本和点选式安装程序:Mac 用 .pkg · Windows 用 .msi。双击后一路下一步即可,不需要 curl 命令

    打开 Node.js 下载页 ↗

    装好后关掉终端再打开,重新运行同一条命令,应显示版本号: node -v

    安装一次,所有需要 Node.js 的工具都能用

  2. 打开 VS Code 的 MCP 设置文件

    MCP: Open User Configuration

    粘贴这些设置,填写空着的值并保存

    {
      "servers": {
        "hypequery": {
          "type": "stdio",
          "command": "npx",
          "args": [
            "-y",
            "@hypequery/mcp",
            "--config",
            "your-value"
          ]
        }
      }
    }
  3. 在 VS Code 中以 Agent 模式打开 AI 聊天

  4. 试一试

    用 hypequery ClickHouse 告诉我你能帮我做什么,然后做一件给我看

    ✓ 如果 VS Code 说正在使用 hypequery ClickHouse,或回答中出现 hypequery ClickHouse 的工具名称,就表示连接成功

菜单名称已于 2026年11月11日 对照 VS Code 帮助页面核实 · 你的界面可能因版本略有不同

其他支持 MCP 的应用(如 Windsurf、Zed、Gemini CLI)添加方式各不相同,请在应用列表中查看

查看所有支持 MCP 的应用 →

JSON 设置在下方“开发者专用”中

卡住了?问问正在用 hypequery ClickHouse 的人💬 讨论 →
开发者专用:终端命令和 JSON 设置

安装在电脑上

Claude Code

claude mcp add --scope user hypequery -- npx -y @hypequery/mcp --config your-value

Claude Desktop (claude_desktop_config.json)

{
  "mcpServers": {
    "hypequery": {
      "command": "npx",
      "args": [
        "-y",
        "@hypequery/mcp",
        "--config",
        "your-value"
      ]
    }
  }
}

Cursor (~/.cursor/mcp.json)

{
  "mcpServers": {
    "hypequery": {
      "command": "npx",
      "args": [
        "-y",
        "@hypequery/mcp",
        "--config",
        "your-value"
      ]
    }
  }
}

VS Code (mcp.json)

{
  "servers": {
    "hypequery": {
      "type": "stdio",
      "command": "npx",
      "args": [
        "-y",
        "@hypequery/mcp",
        "--config",
        "your-value"
      ]
    }
  }
}

这些设置是根据作者在注册中心的条目生成的。如果 README 的写法不同,请以 README 为准。

一览

GitHub 星标i
106 (整个仓库的星标)
该仓库包含多个 MCP 条目,星标在排名中只计算一次
每周下载量i
13,205/周
许可证i
未注明许可证
连接方式
在你的电脑上运行
最新版本i
0.14.0
发布到注册中心i
2026年11月16日
代码最后更新i
2026年11月15日
作者
hypequery
软件包
npm: @hypequery/mcp
注册状态
活跃

哪些应用可以使用它

依据这个服务器的连接方式和各应用自己的文档,检查于 2026年11月10日。

在你的电脑上运行,适用于

ClaudeGooseLM StudioMsty StudioCherry StudioCursorVS Code + GitHub CopilotVisual StudioWindsurf (Devin Desktop)ZedKiroClineContinueJetBrains AI AssistantClaude CodeCodex CLIGemini CLIOpenCodenodecodeWarpLibreChatRaycast

全部应用及其优缺点 →

它能做什么

它在你的电脑上运行;安装后,工具列表会显示在你的 AI 应用中。

基础检查i

我们检查的是任何人都能看到的信息;我们没有阅读代码。不适用的检查项不计入总数。 · 检查于 2026年11月16日

  • ✓ 通过

    作者与仓库一致

    注册名称已通过 GitHub 账户 hypequery 验证,该账户拥有此仓库

  • ✓ 通过

    仍在维护

    代码最后更新于昨天

  • ! 注意

    有许可证

    GitHub 无法识别许可证类型;请打开文件自行查看

  • – 不适用

    端点有响应

    它在你的电脑上运行,没有互联网端点

  • – 不适用

    使用 OAuth 登录

    在你的电脑上运行,改用本地设置

  • … 尚未检查

    工具描述中没有隐藏指令

    它在你的电脑上运行;我们只能读取互联网端点的工具列表

已公开的漏洞(OSV.dev)

尚未检查

我们检查什么 → · JSON

作者:申请重新检查或报告信息错误

讨论

提问、分享技巧或报告无法使用。按“有帮助”数量排序。

还没有帖子,欢迎第一个提问或分享。

此处内容由用户撰写,不代表 PopNx 团队。

登录后发帖

用户评价

还没有评价

登录后写评价

与“数据库与数据集”中的其他服务器比较i

  • 星标数多于此分类中其他 1204 个服务器的 95%
  • 发布到注册中心的时间比此分类中其他 1204 个服务器的 99% 更新
  • 基础检查结果等于或优于此分类中其他 1204 个服务器的 51%

与注册中心里这个分类中所有活跃的服务器比较。只有当发布者拥有该仓库时,星标数才计入。

常见问题

hypequery ClickHouse 安全吗?

它在 3 项适用的基础检查中通过了 2 项。我们没有阅读代码。在添加密钥或令牌之前,请先看看这个服务器要求哪些权限,并使用只具备所需权限的密钥。

它需要哪些密钥或代码?

注册中心没有列出必需的密钥,不过有些服务器会在首次使用时要求你登录。

它在我的电脑上运行还是在云端?

它在你的电脑上运行。你的 AI 应用会在需要时启动它,数据不会经过作者的服务器(除非它自己调用在线服务)。

它还在维护吗?

GitHub 仓库最后更新于昨天,最新版本(0.14.0)于今天进入注册中心。

哪些应用可以使用它?

支持 MCP 的应用,例如 Claude Desktop、Claude Code、Cursor 和 VS Code。你的电脑上还需要有 Node.js。

有什么可以替代它?

同一分类中有:QueryWeaver, Supabase, Neon, DBCode, Keboola MCP

功能相近的其他选择

同一分类、其他作者、命令已通过检查。官方的排在前面,再按星标排序。

如何看卡片:↓ 每周下载量i★ GitHub 星标i三大支柱:评价 · 检查 · 使用情况i更新 = 最新版本发布到注册中心的时间i

QueryWeaver

An MCP server for Text2SQL: transforms natural language into SQL using graph schema understanding.

作者:FalkorDB正在增长★ 109614个月前更新

在你的电脑上运行✓ falkordb.com

Supabase

MCP server for interacting with the Supabase platform

作者:supabase广泛使用↓ 24.6万/周★ 3014 整个仓库的星标3天前更新

电脑或云端✓ 服务方 · supabase.com

Neon

Official Neon MCP server for managing Neon projects and Lakebase Postgres databases.

作者:neondatabase正在增长★ 66310天前更新

在云端运行✓ 服务方 · neon.com

DBCode

Query and explore 100+ databases through your DBCode connections.

作者:dbcodeio起步阶段↓ 80/周★ 367 整个仓库的星标44天前更新

在你的电脑上运行✓ 服务方 · dbcode.io

Keboola MCP

Connect your AI assistants to Keboola and expose your data, transformations, SQL queries, ...

作者:keboola正在增长↓ 1421/周★ 855天前更新

电脑或云端✓ 服务方 · keboola.com
  • QueryWeaver — 需要安装在电脑上 · 不需要密钥
  • Supabase — 云端或安装在电脑上都可以 · 需要密钥 · 在 Claude 的目录中
  • Neon — 在云端运行,无需安装 · 不需要密钥 · 在 Claude 的目录中
  • DBCode — 需要安装在电脑上 · 不需要密钥
  • Keboola MCP — 云端或安装在电脑上都可以 · 不需要密钥

作者的 README

打开 README

按原文从作者的仓库复制。PopNx MCP 没有审查或背书其内容。HTML、图片和脚本已被移除。链接会离开本站。

@hypequery/mcp: governed ClickHouse MCP server

A ClickHouse MCP server for Claude Code, Cursor, Codex and other AI agents. Agents query the datasets and metrics you define, never raw SQL. Run it in five minutes against the public ClickHouse playground: hypequery.com/clickhouse-mcp.

@hypequery/mcp turns your hypequery datasets and metrics into Model Context Protocol tools for Claude, Cursor, and other MCP clients. Agents can discover and query approved analytics without receiving unrestricted SQL access or database credentials.

Install

npm install @hypequery/mcp @hypequery/datasets @hypequery/clickhouse

Expose your semantic layer

// mcp-config.ts

import { publishDatasets } from '@hypequery/datasets';

export const datasets = publishDatasets() .publish(Orders, { metrics: { revenue } }) .build();

export const analytics = createDatasetClient({ queryBuilder: db });

Compile the config, then start the stdio server:

npx hypequery-mcp --config /absolute/path/to/mcp-config.js

Add it to an MCP client:

{

"mcpServers": { "hypequery-clickhouse": { "command": "npx", "args": [ "hypequery-mcp", "--config", "/absolute/path/to/mcp-config.js" ] } } }

Now an agent can ask, “Show revenue by region for the last month,” using the same metric definition as your backend and dashboard.

Connect to a Python HTTP backend

An existing Python server can own definitions, authorization, tenancy and SQL. Opt its dataset/metric routes into ClientQueryProfile and install add_client_contract_endpoint from hypequery.serve. The MCP bridge consumes that endpoint's authorized view; an offline build export cannot be used as live discovery. No Node dataset registry or Python application import is needed.

import {

createMCPHttpExecutor, createMCPProtocolServer, connectMCPServerStdio, } from '@hypequery/mcp';

const url = process.env.HYPEQUERY_CLIENT_CONTRACT_URL; const token = process.env.HYPEQUERY_API_KEY; if (!url || !token) throw new Error('Configure the backend discovery URL and credential.');

const executor = await createMCPHttpExecutor({ url, headers: { authorization: Bearer ${token} }, }); await connectMCPServerStdio(createMCPProtocolServer({ executor }));

The URL is the full discovery endpoint, including its mount prefix. HTTPS is required except for loopback development. URLs cannot contain credentials, queries or fragments. Keep one executor/session per principal; a headers resolver may rotate credentials for that same principal. Browser code must never contain this server credential. To serve the bridge to remote agents, see "Serve over Streamable HTTP" below.

The four tool names stay the same. HTTP mode preserves each authorized endpoint's own dimensions, filters, defaults, time controls and limits. Metric-only groups have queryable: false; inspecting them does not invent a dataset query route. Introspection returns endpoint profiles rather than merging permissions into a synthetic dataset. Unsupported segments, SQL/debug options and caller-selected tenants, tokens, origins or routes are rejected before backend requests.

HTTP query responses preserve the public backend envelope: data, plus optional meta with request ID, timing, row count, pagination and optional cache.hit. Set includeMeta: true when the endpoint advertises metadata and use pagination.hasMore with offset + limit to page. This differs from the existing local executor's cache-status metadata; each mode advertises its actual output schema. Returned rows must contain exactly the selected fields with their advertised scalar/null types. Private diagnostics or unexpected fields fail closed instead of being forwarded to the agent.

The bridge rechecks its authorized view before discovery, prompts and execution, and pins each POST to the validated endpoint schema. View changes or backend 409s invalidate the session: construct a new executor/reconnect explicitly. No query is automatically replayed with new semantics. Backend authorization is still checked on every request, including after discovery.

Budgets default to 30 seconds, 256 KiB discovery/manifests and 1 MiB query responses. HTTP mode has a hard 1 MiB response ceiling, 1,000 rows/filter-list values, 10,000 JSON nodes, 1,000 members per JSON collection and nesting depth 16. Query ceilings can be lowered through queryLimits; unservable default selections are refused rather than silently changed. executionBudget, catalogBudget and maxContractBytes allow smaller deployment limits. Streamed/decompressed bytes are bounded even without Content-Length, and redirects are refused. Request cancellation aborts the HTTP operation; the backend must carry disconnection into its executor (the Python serve adapter does so). End-to-end ClickHouse cancellation remains part of integrated release qualification.

A TypeScript consumer of the MCP SDK needs its Fetch/DOM type names available (e.g. lib: ["ES2022", "DOM"] alongside Node types); this does not require a browser runtime. The repository's installed-artifact smoke checks this without skipLibCheck and without the optional ClickHouse peer installed.

Tools agents receive

  • list_datasets discovers available analytics models;
  • get_dataset_schema explains dimensions, measures, metrics, and relationships;
  • query_metric executes named KPIs;
  • query_dataset explores the fields you chose to publish.

Every tool declares an output schema and returns the same result twice: MCP structuredContent for clients that support typed results, and compact JSON in the text content block for compatibility. Query metadata includes row count, timing when available, pagination state, and cache outcome. Tools also advertise human-readable titles and read-only, non-destructive, idempotent annotations.

Tool failures use a stable structured envelope:

{

"error": { "code": "MCP_INVALID_ARGUMENTS", "category": "correctable_input", "message": "Invalid query_dataset arguments: ...", "retryable": false, "correctable": true } }

Unclassified backend failures are redacted to MCP_EXECUTION_FAILED; database error details and physical SQL are not copied into agent-facing errors.

A hosted server can add retryAfterSeconds, relist, reason (its own stable code), hint (the next action), docsUrl and requestId to an error through MCPToolError's options, and refuse a call over a rate limit with MCP_RATE_LIMITED. mcpToolErrorFromSemanticFailure maps a semantic data-plane failure's code to reason and its relist to relist, and takes the host's retryAfterSeconds, hint, docsUrl and requestId as options. createMCPErrorResponse returns the error in the published envelope.

Safer than raw SQL access

  • Tool schemas come from your TypeScript semantic layer.
  • Advertised schemas and runtime validation use the same canonical catalog compiler and deterministic manifest hash.
  • Filters, fields, ordering, and limits are validated.
  • ClickHouse credentials remain in the server process.
  • SQL text stays hidden by default.
  • Tenant identity comes from trusted host configuration, never the prompt.

For tenant-scoped datasets, run the server programmatically with the trusted tenant ID:

await createMCPServer({

datasets, analytics, name: 'acme-analytics', version: '1.0.0', tenantId: session.accountId, queryLimits: { defaultResultSize: 100, maxResultSize: 1_000, maxOffset: 10_000, }, executionBudget: { timeoutMs: 30_000, maxResponseBytes: 1_048_576, }, });

Every query receives a server-side limit even when the agent omits one. The effective ceiling is the lowest applicable server or Dataset limit. Dimensions, measures, filters, ordering, and pagination offsets also have hard package ceilings that server configuration may lower but cannot raise.

Query calls also have a hard wall-clock deadline and UTF-8 response-byte ceiling. Client cancellation and local deadlines propagate through the semantic client to the backing ClickHouse request. Budget failures use the stable MCP_REQUEST_CANCELLED, MCP_QUERY_TIMEOUT, and MCP_RESULT_TOO_LARGE classifications.

Embed in another MCP transport

The semantic executor is independent of stdio and network lifecycle. A hosted gateway can inject its own MCP transport without reimplementing Hypequery's tools, prompts, catalog schemas, or validation:

import {

createMCPExecutor, createMCPProtocolServer, } from '@hypequery/mcp';

const executor = createMCPExecutor({ datasets, analytics, tenantId: trustedPrincipal.tenantId, });

const server = createMCPProtocolServer({ executor, name: 'acme-hosted-analytics', version: '1.0.0', });

await server.connect(hostTransport);

hostTransport can be an MCP SDK in-memory, stdio, or hosted transport. For an explicit local adapter, use startStdioMCPServer(config). The existing createMCPServer(config) and HypequeryMCPServer.start() APIs remain available for compatibility.

Serve over Streamable HTTP

createMCPHttpHandler serves the same tools to remote agents. It answers Fetch Requests, so it runs on Node (listenMCPHttpServer, createMCPNodeRequestListener), Bun, Deno or Cloudflare Workers. The package imports Node built-ins (node:crypto, node:http, node:stream), so a Worker needs the nodejs_compat compatibility flag:

import {

createMCPExecutor, createMCPHttpHandler, createMCPServeAuthenticator, listenMCPHttpServer, } from '@hypequery/mcp'; import { createJwtStrategy } from '@hypequery/serve';

const handler = createMCPHttpHandler({ authenticate: createMCPServeAuthenticator({ strategies: createJwtStrategy({ jwksUri, issuer, audience: 'https://mcp.example.com/mcp' }), }), createExecutor: principal => createMCPExecutor({ datasets, analytics, tenantId: principal.tenantId }), allowedHosts: ['mcp.example.com'], oauth: { resource: 'https://mcp.example.com/mcp', authorizationServers: ['https://example.auth0.com/'], requiredScopes: ['analytics:read'], }, }); await listenMCPHttpServer(handler, { host: '0.0.0.0', port: 3333 });

Every request checks Host and Origin (DNS-rebinding protection), then its credential. Each session belongs to the principal that opened it and gets its own executor for that principal's tenant. With oauth, the server publishes RFC 9728 protected-resource metadata and answers with RFC 6750 challenges that point at it; your identity provider remains the authorization server. createMCPStaticKeyAuthenticator({ key, tenantId }) is the shared-key alternative. From the CLI: hypequery mcp --http. See Remote MCP over HTTP.

Learn more

License

Apache-2.0.