
Mcp Hydrolix
io.github.hydrolix由 GitHub 账号 hydrolix 发布v0.2.3更新于 Oct 24, 2026
An MCP server to query Hydrolix
概览
让助手在 Hydrolix 集群上执行以查询为主的 SQL,并浏览数据库、表和结构信息。
- 可以做什么
- 针对 Hydrolix 集群提供四个工具:run_select_query 执行 SQL 查询,list_databases 列出数据库,list_tables 列出某个数据库中的表,get_table_info 返回表结构等元数据。查询可带可选的结果单元格预算,以及必填的用途说明,该说明会作为注释随查询记录。末尾的 FORMAT 子句会被移除,因为传输格式由服务器决定。
- 适用场景
- 当你希望助手探索或查询已存放在 Hydrolix 中的数据时使用,例如列出数据库、查看表结构,或对带时间范围的数据运行分析型 SQL。适合已经拥有 Hydrolix 集群和凭据的用户。
- 运行要求
- 需要本地 Python 运行环境:Python 3.13 或 uv 包管理器(uv 会按需下载 mcp-hydrolix 包)。需要 Hydrolix 集群地址(HYDROLIX_URL,或已弃用的 HYDROLIX_HOST),以及服务账号令牌(HYDROLIX_TOKEN)或用户名和密码(HYDROLIX_USER 与 HYDROLIX_PASSWORD)。需要能访问该集群的网络。需要在桌面客户端中配置。
安装
在 SourceWeft 中
- 打开 控制台中的 Mcp Hydrolix,将其添加到工作区。
- 为需要使用其工具的对话启用该服务。
Desktop only,通过 STDIO。 STDIO 服务会启动本地进程,因此需要 SourceWeft 桌面宿主。
其他 MCP 客户端
参照 仓库 中的启动说明。
README
Hydrolix MCP Server
[PyPI - Version] [Install in VS Code] [Install in VS Code Insiders]
An MCP server for Hydrolix.
Quickstart
Get up and running in a few minutes. This section covers Claude Desktop and Claude Code.
Step 1 — Prerequisites
Before you begin, make sure you have:
- Hydrolix credentials — your cluster hostname plus either a username/password or a service account token. If you don't have these, ask your Hydrolix administrator.
- Claude Desktop — download from claude.ai/download.
Step 2 — Install the MCP server
Choose the method that matches your setup:
Option A: Using uv (recommended)
uv manages Python automatically and downloads mcp-hydrolix on demand, so no separate install step is needed. If you don't have uv, install it:
macOS / Linux:
Windows (PowerShell):
Option B: Using pip
Requires Python 3.13+. If you need to install Python, download it from python.org.
Step 3 — Configure Claude Desktop
-
Open the Claude Desktop configuration file:
- macOS:
~/Library/Application Support/Claude/claude_desktop_config.json - Windows:
%APPDATA%\Claude\claude_desktop_config.json - Linux:
~/.config/Claude/claude_desktop_config.json
- macOS:
-
Add the following entry to the
"mcpServers"object (create the file with this content if it doesn't exist yet):
Replace <your-hydrolix-hostname>, <your-username>, and <your-password> with your actual credentials.
[!NOTE] If you used Option B (pip), use
"command": "mcp-hydrolix"with no"args"field instead.
[!TIP] If the file already has other entries, add the
"mcp-hydrolix"block inside the existing"mcpServers"object rather than replacing the whole file.
[!NOTE] If you authenticate with a service account token instead of username/password, see Authentication.
Command not found?
Claude Desktop launches without your shell's PATH, so it may not locate the binary even if it is installed. Find the full path and use it as the "command" value in the config.
Option A (uv): find uvx:
- macOS / Linux:
which uvx - Windows:
where.exe uvx
Option B (pip): find mcp-hydrolix:
- macOS / Linux:
which mcp-hydrolix - Windows:
where.exe mcp-hydrolix
If which/where.exe returns nothing, the binary isn't on your PATH. The cleanest fix is to switch to Option A (uv), which manages the Python environment and PATH for you.
Step 4 — Restart Claude Desktop
Restart the app to apply the configuration.
macOS / Windows users: Make sure to fully quit Claude before restarting. On macOS, press Cmd+Q or right-click the Dock icon and choose Quit. On Windows, use the system tray icon.
Step 5 — Verify it's working
-
Open a new conversation in Claude Desktop. Look for a tools/hammer icon near the text input — this confirms the MCP server connected successfully.
-
Try this prompt to confirm everything is working:
Using your Hydrolix MCP tools, list the available databases.
Claude should call the list_databases tool and return a list of databases from your cluster.
Using Claude Code instead?
If you prefer the command line, make sure uv is installed (Option A from Step 2), then run:
Then open Claude Code and test with the same prompt:
Using your Hydrolix MCP tools, list the available databases.
Using VS Code instead?
Click the Install in VS Code badge at the top of this README for a one-click install. If you prefer the UI flow, open the Command Palette (Cmd+Shift+P / Ctrl+Shift+P), run MCP: Add Server, choose Command (stdio), and reuse the uvx ... command and env block from Step 3.
Tools
-
run_select_query- Execute SQL queries on your Hydrolix cluster.
- Input:
query(string): The SQL query to execute. - Input:
max_cells(integer, optional): Result cell budget (rows × columns); when the server sets a cap, a caller can only lower it. - Input:
purpose(string, required): Why the query is being run; recorded with the query ashdx_query_comment. - A trailing
FORMATclause is removed; the server selects the wire format.
-
list_databases- List all databases on your Hydrolix cluster.
-
list_tables- List all tables in a database.
- Input:
database(string): The name of the database.
-
get_table_info- Get table metadata such as schema
- Input:
database(string): The name of the database. - Input:
table(string): The name of the table.
Effective Usage
Due to the wide variety in LLM architectures, not all models will proactively use the tools above, and few will use them effectively without guidance, even with the carefully-constructed tool descriptions provided to the model. To get the best results out of your model while using the Hydrolix MCP server, we recommend the following:
- Refer to your Hydrolix database by name and request tool usage in your prompts (e.g., "Using MCP tools to access my Hydrolix database, please ...")
- This encourages the model to use the MCP tools available and minimizes hallucinations.
- Include time ranges in your prompts (e.g., "Between December 5 2023 and January 18 2024, ...") and specifically request that the output be ordered by timestamp.
- This prompts the model to write more efficient queries that take advantage of primary key optimizations
Health Check Endpoint
When running with HTTP or SSE transport, a health check endpoint is available at /health. This endpoint:
- Returns
200 OKwith the Hydrolix query-head's Clickhouse version if the server is healthy and can connect to Hydrolix - Returns
503 Service Unavailableif the server cannot connect to the Hydrolix query-head
Example:
Configuration
The Hydrolix MCP server is configured using a standard MCP server entry. Consult your client's documentation for specific instructions on where to find or declare MCP servers. An example setup using Claude Desktop is documented below.
The recommended way to launch the Hydrolix MCP server is via the uv project manager, which will manage installing all other dependencies in an isolated environment.
Authentication
The server supports multiple authentication methods with the following precedence (highest to lowest):
- Per-request Bearer token: Service account token provided via
Authorization: Bearer <token>header - Per-request GET parameter: Service account token provided via
?token=<token>query parameter - Environment-based credentials: Credentials configured via environment variables
- Service account token (
HYDROLIX_TOKEN), or - Username and password (
HYDROLIX_USERandHYDROLIX_PASSWORD)
- Service account token (
When multiple authentication methods are configured, the server will use the first available method in the precedence order above. Per-request authentication is only available when using HTTP or SSE transport modes. The ?token= form exists for clients that cannot send headers; set HYDROLIX_ALLOW_TOKEN_QUERY_PARAM=false on deployments where every client sends the Authorization header (see Per-request credentials).
Note: Using a service account token with a readonly role is recommended.
MCP Server definition using username and password (JSON):
MCP Server definition using service account token (JSON):
MCP Server definition using username and password (YAML):
MCP Server definition using service account token (YAML):
Configuration Example (Claude Desktop)
-
Open the Claude Desktop configuration file located at:
- On macOS:
~/Library/Application Support/Claude/claude_desktop_config.json - On Windows:
%APPDATA%/Claude/claude_desktop_config.json
- On macOS:
-
Add a
mcp-hydrolixserver entry to themcpServersconfig block to use username and password:
To leverage service account use the following config block:
-
Update the environment variable definitions to point to your Hydrolix cluster.
-
(Recommended) Locate the command entry for
uvxand replace it with the absolute path to theuvxexecutable. This ensures that the correct version ofuvxis used when starting the server. You can find this path usingwhich uvxorwhere.exe uvx. -
Restart Claude Desktop to apply the changes. If you are using Windows, ensure Claude is stopped completely by closing the client using the system tray icon.
Configuration Example (Claude Code)
To configure the Hydrolix MCP server for Claude Code, run the following command:
Environment Variables
The following variables are used to configure the Hydrolix connection. These variables may be provided via the MCP config block (as shown above), a .env file, or traditional environment variables.
Required Variables
You MUST set one of the following to identify the cluster:
HYDROLIX_URL(recommended): The canonical public URL of your Hydrolix cluster, e.g.https://mycluster.hydrolix.live. For typical out-of-cluster deployments this single variable is sufficient — it supplies the host, port (scheme-default 443/80), and TLS settings for both the HTTP query endpoint and the REST/versionprobe.HYDROLIX_HOST(deprecated): The hostname of your Hydrolix server. Still honored for backwards compatibility but should be replaced byHYDROLIX_URL.
When HYDROLIX_MCP_SERVER_TRANSPORT is http or sse, HYDROLIX_URL specifically is required (a forthcoming OAuth metadata endpoint would advertise it). HYDROLIX_HOST alone is not sufficient for these transports.
Authentication Variables
At least one authentication method must be configured when using the stdio transport:
HYDROLIX_TOKEN: Service account token for environment-based authenticationHYDROLIX_USERandHYDROLIX_PASSWORD: Username and password for environment-based authentication (both must be provided together)
In summary:
- For stdio, you MUST use HYDROLIX_TOKEN or HYDROLIX_USER+HYDROLIX_PASS (environmental credentials)
- For http/sse, you MAY use HYDROLIX_TOKEN or HYDROLIX_USER+HYDROLIX_PASS (environmental credentials), but you may instead use per-request credentials.
If no credentials are provided via the environment or the request, the request will fail.
Using Per-Request Authentication with HTTP Transport
When using HTTP or SSE transport, you can omit environment-based credentials and instead provide authentication per-request. This is useful for multi-user scenarios or with clients that don't support running MCP servers locally.
Example mcpServers configuration connecting to a remote HTTP server with per-request authentication:
Example minimal .env configuration for running your own HTTP server without environment credentials:
Though not part of the MCP specification, many MCP clients allow adding headers to MCP-issued requests. When this is possible, we recommend configuring the MCP client to pass a service account token via the Authorization: Bearer <sa-token-here> header instead of as a query parameter for greater security.
Note: The bind host and port settings are only used when transport is set to "http" or "sse".
Optional Variables
See docs/CONFIG.md for endpoint overrides, deprecated variable aliases, and the full set of optional tuning variables (timeouts, query SETTINGS overrides, result truncation, HTTP/SSE worker tuning, proxy, metrics, and escape hatches).
Maintainers
Tasks that need operational privileges — running the end-to-end suite against a
live Hydrolix cluster, and cutting a release — are documented separately in
MAINTAINERS.md.
来源:README.md,提交 bb179ac
工具
0版本历史
1- v0.2.3最新Sep 16, 2026
评分
已满足适用检查项的 50%
该评分衡量此收录条目的完整程度,依据注册中心条目、端点与公开来源计算得出。它不是对服务器本身的评价,也不表示服务器安全或当前可用:可连通性是带日期的检查结果,评分也不包含安装量或用户评价。
- 近 30 天内可连通25 分
请保持端点能够响应 MCP 握手;SourceWeft 每 30 天探测一次。
- 已声明认证方式10 分
请在注册中心条目中声明凭据请求头,或保持端点能够响应探测,以便判定其认证方式。
- 已列出工具15 分
请让服务器在无凭据时响应 tools/list,或发布可在沙箱中无凭据启动的软件包。
- 描述必需15 分
- 图标10 分
- 文档15 分
- 许可证10 分