h

hydrolix

@hydrolix/mcp-hydrolix
Hosted
0 Stars 366 次浏览 hydrolix 更新于 2026-08-23

MCP 服务配置

复制以下 JSON 到 OPClaw 或其他 MCP 客户端的配置文件中即可使用

{
  "mcpServers": {
    "mcp-hydrolix": {
      "args": [
        "run",
        "--with",
        "mcp-hydrolix",
        "--python",
        "3.13",
        "mcp-hydrolix"
      ],
      "command": "uv",
      "env": {
        "HYDROLIX_HOST": "\u003chydrolix-host\u003e",
        "HYDROLIX_PASSWORD": "\u003chydrolix-password\u003e",
        "HYDROLIX_USER": "\u003chydrolix-user\u003e"
      }
    }
  }
}

可用工具 (3 个)

该服务在 MCP 协议中暴露的工具,AI 可按需调用

list_databases

List available Hydrolix databases

该工具无需必填参数,直接调用即可

list_tables

List available Hydrolix tables in a database

该工具无需必填参数,直接调用即可

run_select_query

Run a SELECT query in a Hydrolix time-series database using the Clickhouse SQL dialect.Queries run using this tool will timeout after 30 seconds.The primary key on tables queried this way is always a timestamp. Queries should include eithera LIMIT clause or a filter based on the primary key as a performance guard to ensure they returnin a reasonable amount of time. Queries should select specific fields and avoid the use ofSELECT * to avoid performance issues. The performance guard used for the query should be clearlycommunicated with the user, and the user should be informed that the query may take a long timeto run if the performance guard is not used. When choosing a performance guard, the user spreference should be requested and used if available. When using aggregations, the performanceguard should take form of a primary key filter, or else the LIMIT should be applied in asubquery before applying the aggregations.When matching columns based on substrings, prefix or suffix matches should be used instead offull-text search whenever possible. When searching for substrings, the syntax column LIKE %suffix or column LIKE prefix% should be used.Example query. Purpose: get logs from the application.logs table. Primary key: timestamp .Performance guard: 10 minute recency filter. SELECT message, timestamp FROM application.logs WHERE timestamp u003e now() - INTERVAL 10 MINUTES Example query. Purpose: get the median humidity from the weather.measurements table. Primarykey: date . Performance guard: 1000 row limit, applied before aggregation. SELECT median(humidity) FROM (SELECT humidity FROM weather.measurements LIMIT 1000) Example query. Purpose: get the lowest temperature from the weather.measurements table overthe last 10 years. Primary key: date . Performance guard: date range filter. SELECT min(temperature) FROM weather.measurements WHERE date u003e now() - INTERVAL 10 YEARS Example query. Purpose: get the app name with the most log messages from the application.logs table in the window between new year and valentine s day of 2024. Primary key: timestamp .Performance guard: date range filter. SELECT app, count(*) FROM application.logs WHERE timestamp u003e 2024-01-01 AND timestamp u003c 2024-02-14 GROUP BY app ORDER BY count(*) DESC LIMIT 1

该工具无需必填参数,直接调用即可

服务介绍

Hydrolix MCP 服务器

PyPI - 版本

用于 Hydrolix 的 MCP 服务器。

工具

  • run_select_query

    • 在您的 Hydrolix 集群上执行 SQL 查询。
    • 输入: sql (字符串): 要执行的 SQL 查询。
    • 所有 Hydrolix 查询都使用 readonly = 1 运行,以确保它们是安全的。
  • list_databases

    • 列出您 Hydrolix 集群上的所有数据库。
  • list_tables

    • 列出数据库中的所有表。
    • 输入: database (字符串): 数据库的名称。

有效使用

由于 LLM 架构的多样性,并非所有模型都会主动使用上述工具,即使提供了精心构建的工具描述,也很少有模型能够在没有指导的情况下有效地使用这些工具。为了在使用 Hydrolix MCP 服务器时从您的模型中获得最佳结果,我们建议如下:

  • 通过名称引用您的 Hydrolix 数据库,并在提示中请求工具使用(例如,“使用 MCP 工具访问我的 Hydrolix 数据库,请...”)
    • 这鼓励模型使用可用的 MCP 工具,并减少幻觉。
  • 在提示中包含时间范围(例如,“2023年12月5日至2024年1月18日之间,...”)并特别要求按时间戳排序输出。
    • 这促使模型编写更高效的查询,利用主键优化。

配置

Hydrolix MCP 服务器使用标准的 MCP 服务器条目进行配置。请参阅客户端文档以获取有关在哪里查找或声明 MCP 服务器的具体说明。下面记录了使用 Claude Desktop 的示例设置。

推荐使用 uv 项目管理器启动 Hydrolix MCP 服务器,它将在隔离环境中管理安装所有其他依赖项。

MCP 服务器定义 (JSON):

json
{
"command": "uv",
"args": [
"run",
"--with",
"mcp-hydrolix",
"--python",
"3.13",
"mcp-hydrolix"
],
"env": {
"HYDROLIX_HOST": "",
"HYDROLIX_USER": "",
"HYDROLIX_PASSWORD": ""
}
}

MCP 服务器定义 (YAML):

yaml
command: uv
args:

  • run
  • --with
  • mcp-hydrolix
  • --python
  • "3.13"
  • mcp-hydrolix
    env:
    HYDROLIX_HOST:
    HYDROLIX_USER:
    HYDROLIX_PASSWORD:

配置示例 (Claude Desktop)

  1. 打开位于以下位置的 Claude Desktop 配置文件:

    • 在 macOS 上:~/Library/Application Support/Claude/claude_desktop_config.json
    • 在 Windows 上:%APPDATA%/Claude/claude_desktop_config.json
  2. 向 mcpServers 配置块添加一个 mcp-hydrolix 服务器条目:

json
{
"mcpServers": {
"mcp-hydrolix": {
"command": "uv",
"args": [
"run",
"--with",
"mcp-hydrolix",
"--python",
"3.13",
"mcp-hydrolix"
],
"env": {
"HYDROLIX_HOST": "",
"HYDROLIX_USER": "",
"HYDROLIX_PASSWORD": ""
}
}
}
}

  1. 更新环境变量定义以指向您的 Hydrolix 集群。

  2. (推荐)找到 uv 命令条目,并将其替换为 uv 可执行文件的绝对路径。这确保在启动服务器时使用正确的 uv 版本。您可以使用 which uv 或 where.exe uv 查找此路径。

  3. 重启 Claude Desktop 以应用更改。如果您使用的是 Windows,请确保通过系统托盘图标完全停止 Claude 客户端。

环境变量

以下变量用于配置 Hydrolix 连接。这些变量可以通过 MCP 配置块(如上所示)、.env 文件或传统的环境变量提供。

必需变量* HYDROLIX_HOST: 您的Hydrolix服务器的主机名

  • HYDROLIX_USER: 用于身份验证的用户名
  • HYDROLIX_PASSWORD: 用于身份验证的密码

可选变量

  • HYDROLIX_PORT: 您的Hydrolix服务器的端口号
    • 默认值: 8088
    • 除非使用非标准端口,否则通常不需要设置
  • HYDROLIX_VERIFY: 启用/禁用SSL证书验证
    • 默认值: "true"
    • 设置为"false"以禁用证书验证(不建议在生产环境中使用)
  • HYDROLIX_DATABASE: 要使用的默认数据库
    • 默认值: 无(使用服务器默认值)
    • 设置此项以自动连接到特定数据库

相关 MCP 服务