Hydrolix MCP Server

Hydrolix MCP Server

MCP server for secure, efficient SQL access to Hydrolix clusters.

5
Stars
8
Forks
5
Watchers
1
Issues
Hydrolix MCP Server provides a Model Context Protocol (MCP) interface for executing SQL queries, listing databases, and listing tables on Hydrolix clusters. It ensures safe, read-only data access and includes a standardized health-check endpoint. The server integrates easily with various MCP-compatible clients, supporting multiple authentication methods using either credentials or service account tokens.

Key Features

MCP-compliant server interface
Execute read-only SQL queries on Hydrolix clusters
List available databases
List tables within a database
Health check HTTP endpoint
Multiple authentication modes (username/password and token)
JSON and YAML configuration support
Optimized for AI model usage
Guidance for effective query construction
Easy integration with tools like Claude Desktop

Use Cases

Secure SQL data retrieval from Hydrolix clusters by AI models
Automated database and table discovery for data-driven applications
Monitoring Hydrolix server health via HTTP endpoint
Integrating Hydrolix data access into LLM-based tools
Limiting model access to read-only operations for safety
Supporting both user credential and token-based authentications
Facilitating efficient and targeted data queries for analytics.
Embedding Hydrolix backend access into custom applications supporting MCP
Centralizing Hydrolix access for multiple AI-powered agents
Demonstrating best practices for AI-guided SQL querying over large datasets

README

Hydrolix MCP Server

PyPI - Version

An MCP server for Hydrolix.

Tools

  • run_select_query

    • Execute SQL queries on your Hydrolix cluster.
    • Input: sql (string): The SQL query to execute.
    • All Hydrolix queries are run with readonly = 1 to ensure they are safe.
  • 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.

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.

Health Check Endpoint

When running with HTTP or SSE transport, a health check endpoint is available at /health. This endpoint:

  • Returns 200 OK with the Hydrolix query-head's Clickhouse version if the server is healthy and can connect to Hydrolix
  • Returns 503 Service Unavailable if the server cannot connect to the Hydrolix query-head

Example:

bash
curl http://localhost:8000/health
# Response: OK - Connected to Hydrolix compatible with ClickHouse 24.3.1

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.

MCP Server definition using username and password (JSON):

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

MCP Server definition using service account token (JSON):

json
{
  "command": "uv",
  "args": [
    "run",
    "--with",
    "mcp-hydrolix",
    "--python",
    "3.13",
    "mcp-hydrolix"
  ],
  "env": {
    "HYDROLIX_HOST": "<hydrolix-host>",
    "HYDROLIX_TOKEN": "<hydrolix-service-account-token>"
  }
}

MCP Server definition using username and password (YAML):

yaml
command: uv
args:
- run
- --with
- mcp-hydrolix
- --python
- "3.13"
- mcp-hydrolix
env:
  HYDROLIX_HOST: <hydrolix-host>
  HYDROLIX_USER: <hydrolix-user>
  HYDROLIX_PASSWORD: <hydrolix-password>

MCP Server definition using service account token (YAML):

yaml
command: uv
args:
- run
- --with
- mcp-hydrolix
- --python
- "3.13"
- mcp-hydrolix
env:
  HYDROLIX_HOST: <hydrolix-host>
  HYDROLIX_TOKEN: <hydrolix-service-account-token>

Configuration Example (Claude Desktop)

  1. 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
  2. Add a mcp-hydrolix server entry to the mcpServers config block to use username and password:

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

To leverage service account use the following config block:

json
{
  "mcpServers": {
    "mcp-hydrolix": {
      "command": "uv",
      "args": [
        "run",
        "--with",
        "mcp-hydrolix",
        "--python",
        "3.13",
        "mcp-hydrolix"
      ],
      "env": {
        "HYDROLIX_HOST": "<hydrolix-host>",
        "HYDROLIX_TOKEN": "<hydrolix-service-account-token>"
      }
    }
  }
}
  1. Update the environment variable definitions to point to your Hydrolix cluster.

  2. (Recommended) Locate the command entry for uv and replace it with the absolute path to the uv executable. This ensures that the correct version of uv is used when starting the server. You can find this path using which uv or where.exe uv.

  3. 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:

bash
claude mcp add --transport stdio hydrolix \
  --env HYDROLIX_USER=<hydrolix-user> \
  --env HYDROLIX_PASSWORD=<hydrolix-password> \
  --env HYDROLIX_HOST=<hydrolix-host> \
  --env HYDROLIX_MCP_SERVER_TRANSPORT=stdio \
  -- uv run --with mcp-hydrolix --python 3.13 mcp-hydrolix

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

  • HYDROLIX_HOST: The hostname of your Hydrolix server
  • HYDROLIX_TOKEN: The Hydrolix service account token (omit if using username/password)
  • HYDROLIX_USER: The username for authentication (omit if using service account)
  • HYDROLIX_PASSWORD: The password for authentication (omit if using service account)

Authentication precedence: If both HYDROLIX_TOKEN and HYDROLIX_USER/HYDROLIX_PASSWORD are provided, the service account token takes precedence and username/password authentication will be ignored.

Optional Variables

  • HYDROLIX_PORT: The port number of your Hydrolix server
    • Default: 8088
    • Usually doesn't need to be set unless using a non-standard port
  • HYDROLIX_VERIFY: Enable/disable SSL certificate verification
    • Default: "true"
    • Set to "false" to disable certificate verification (not recommended for production)
  • HYDROLIX_DATABASE: Default database to use *Default: None (uses server default)
    • Set this to automatically connect to a specific database
  • HYDROLIX_MCP_SERVER_TRANSPORT: Sets the transport method for the MCP server.
    • Default: "stdio"
    • Valid options: "stdio", "http", "sse". This is useful for local development with tools like MCP Inspector.
  • HYDROLIX_MCP_BIND_HOST: Host to bind the MCP server to when using HTTP or SSE transport
    • Default: "127.0.0.1"
    • Set to "0.0.0.0" to bind to all network interfaces (useful for Docker or remote access)
    • Only used when transport is "http" or "sse"
  • HYDROLIX_MCP_BIND_PORT: Port to bind the MCP server to when using HTTP or SSE transport
    • Default: "8000"
    • Only used when transport is "http" or "sse"

For MCP Inspector or remote access with HTTP transport:

env
HYDROLIX_HOST=localhost
HYDROLIX_USER=default
HYDROLIX_PASSWORD=myPassword
HYDROLIX_MCP_SERVER_TRANSPORT=http
HYDROLIX_MCP_BIND_HOST=0.0.0.0  # Bind to all interfaces
HYDROLIX_MCP_BIND_PORT=4200  # Custom port (default: 8000)

When using HTTP transport, the server will run on the configured port (default 8000). For example, with the above configuration:

  • MCP endpoint: http://localhost:4200/mcp
  • Health check: http://localhost:4200/health

Note: The bind host and port settings are only used when transport is set to "http" or "sse".

Star History

Star History Chart

Repository Owner

hydrolix
hydrolix

Organization

Repository Details

Language Python
Default Branch main
Size 200 KB
Contributors 21
License Apache License 2.0
MCP Verified Nov 12, 2025

Programming Languages

Python
100%

Tags

Join Our Newsletter

Stay updated with the latest AI tools, news, and offers by subscribing to our weekly newsletter.

We respect your privacy. Unsubscribe at any time.

Related MCPs

Discover similar Model Context Protocol servers

  • Snowflake MCP Server

    Snowflake MCP Server

    MCP server enabling secure and structured Snowflake database interaction with AI tools.

    Snowflake MCP Server provides a Model Context Protocol-conformant interface to interact programmatically with Snowflake databases. It exposes SQL execution, schema exploration, and insight aggregation as standardized resources and tools accessible by AI assistants. The server offers read/write capabilities, structured resource summaries, and insight memoization suitable for contextual AI workflows. Integration is supported with popular AI platforms such as Claude Desktop via Smithery or UVX configurations.

    • 170
    • MCP
    • isaacwasserman/mcp-snowflake-server
  • mcp-server-duckdb

    mcp-server-duckdb

    A Model Context Protocol server enabling SQL access to DuckDB databases.

    Implements a Model Context Protocol (MCP) server for DuckDB, allowing structured database interaction via MCP-compliant tools and language models. Offers a unified query tool for executing any SQL statement, with support for read-only mode to ensure data integrity. Flexible configuration options include database path specification and connection management. Easily integrable with applications like Claude Desktop for enhanced local data analysis through LLMs.

    • 171
    • MCP
    • ktanaka101/mcp-server-duckdb
  • Databricks MCP Server

    Databricks MCP Server

    Expose Databricks data and jobs securely with Model Context Protocol for LLMs.

    Databricks MCP Server implements the Model Context Protocol (MCP) to provide a bridge between Databricks APIs and large language models. It enables LLMs to run SQL queries, list Databricks jobs, retrieve job statuses, and fetch detailed job information via a standardized MCP interface. The server handles authentication, secure environment configuration, and provides accessible endpoints for interaction with Databricks workspaces.

    • 42
    • MCP
    • JordiNeil/mcp-databricks-server
  • MCP libSQL by xexr

    MCP libSQL by xexr

    Secure, protocol-compliant libSQL database server for MCP-enabled clients.

    MCP libSQL by xexr provides a Model Context Protocol (MCP) server designed for secure database access and management via libSQL. It enables database operations—such as querying, table management, and schema inspection—through standardized MCP tools, ensuring compatibility with clients like Claude Desktop and Cursor. The project emphasizes robust security validation, audit logging, and comprehensive error handling. Users benefit from production-ready deployment, extensive test coverage, and streamlined integration with MCP-compatible platforms.

    • 16
    • MCP
    • Xexr/mcp-libsql
  • Multi-Database MCP Server (by Legion AI)

    Multi-Database MCP Server (by Legion AI)

    Unified multi-database access and AI interaction server with MCP integration.

    Multi-Database MCP Server enables seamless access and querying of diverse databases via a unified API, with native support for the Model Context Protocol (MCP). It supports popular databases such as PostgreSQL, MySQL, SQL Server, and more, and is built for integration with AI assistants and agents. Leveraging the MCP Python SDK, it exposes databases as resources, tools, and prompts for intelligent, context-aware interactions, while delivering zero-configuration schema discovery and secure credential management.

    • 76
    • MCP
    • TheRaLabs/legion-mcp
  • Nile MCP Server

    Nile MCP Server

    A Model Context Protocol (MCP) server for managing databases on the Nile platform through standardized interfaces.

    Nile MCP Server implements the Model Context Protocol to enable seamless integration between LLM applications and the Nile database platform. It provides standardized APIs for database and credential management, SQL execution, and region discovery. Written in TypeScript, the server focuses on type safety, comprehensive error handling, and robust input validation. It supports easy installation and integration with Claude Desktop for advanced AI workflows.

    • 16
    • MCP
    • niledatabase/nile-mcp-server
  • Didn't find tool you were looking for?

    Be as detailed as possible for better results