mcp-hydrolix 0.1.3__tar.gz → 0.1.5__tar.gz

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.
Files changed (43) hide show
  1. mcp_hydrolix-0.1.5/.dockerignore +13 -0
  2. {mcp_hydrolix-0.1.3 → mcp_hydrolix-0.1.5}/.editorconfig +1 -1
  3. mcp_hydrolix-0.1.5/.github/pull_request_template.md +26 -0
  4. mcp_hydrolix-0.1.5/.github/workflows/publish.yml +67 -0
  5. mcp_hydrolix-0.1.5/.github/workflows/tests.yaml +40 -0
  6. {mcp_hydrolix-0.1.3 → mcp_hydrolix-0.1.5}/.gitignore +1 -1
  7. mcp_hydrolix-0.1.5/.pre-commit-config.yaml +20 -0
  8. mcp_hydrolix-0.1.5/Dockerfile +49 -0
  9. {mcp_hydrolix-0.1.3 → mcp_hydrolix-0.1.5}/LICENSE +1 -1
  10. mcp_hydrolix-0.1.5/PKG-INFO +314 -0
  11. mcp_hydrolix-0.1.5/README.md +289 -0
  12. mcp_hydrolix-0.1.5/docker-compose.yaml +56 -0
  13. mcp_hydrolix-0.1.5/mcp_hydrolix/auth/__init__.py +29 -0
  14. mcp_hydrolix-0.1.5/mcp_hydrolix/auth/credentials.py +63 -0
  15. mcp_hydrolix-0.1.5/mcp_hydrolix/auth/mcp_providers.py +137 -0
  16. mcp_hydrolix-0.1.5/mcp_hydrolix/log/__init__.py +6 -0
  17. mcp_hydrolix-0.1.5/mcp_hydrolix/log/log.py +60 -0
  18. mcp_hydrolix-0.1.5/mcp_hydrolix/log/log.yaml +40 -0
  19. mcp_hydrolix-0.1.5/mcp_hydrolix/log/utils.py +56 -0
  20. mcp_hydrolix-0.1.5/mcp_hydrolix/main.py +77 -0
  21. mcp_hydrolix-0.1.5/mcp_hydrolix/mcp_env.py +324 -0
  22. mcp_hydrolix-0.1.5/mcp_hydrolix/mcp_server.py +326 -0
  23. mcp_hydrolix-0.1.5/mcp_hydrolix/utils.py +70 -0
  24. {mcp_hydrolix-0.1.3 → mcp_hydrolix-0.1.5}/pyproject.toml +12 -5
  25. mcp_hydrolix-0.1.5/test-services/docker-compose.yaml +30 -0
  26. mcp_hydrolix-0.1.5/tests/__init__.py +3 -0
  27. mcp_hydrolix-0.1.5/tests/test_log.py +338 -0
  28. mcp_hydrolix-0.1.5/tests/test_mcp_server.py +478 -0
  29. mcp_hydrolix-0.1.5/tests/test_tool.py +112 -0
  30. mcp_hydrolix-0.1.5/tests/test_utils.py +299 -0
  31. mcp_hydrolix-0.1.5/uv.lock +1551 -0
  32. mcp_hydrolix-0.1.3/.github/workflows/publish.yml +0 -18
  33. mcp_hydrolix-0.1.3/PKG-INFO +0 -146
  34. mcp_hydrolix-0.1.3/README.md +0 -128
  35. mcp_hydrolix-0.1.3/mcp_hydrolix/main.py +0 -9
  36. mcp_hydrolix-0.1.3/mcp_hydrolix/mcp_env.py +0 -143
  37. mcp_hydrolix-0.1.3/mcp_hydrolix/mcp_server.py +0 -234
  38. mcp_hydrolix-0.1.3/test-services/docker-compose.yaml +0 -15
  39. mcp_hydrolix-0.1.3/tests/test_tool.py +0 -97
  40. mcp_hydrolix-0.1.3/uv.lock +0 -566
  41. {mcp_hydrolix-0.1.3 → mcp_hydrolix-0.1.5}/.python-version +0 -0
  42. {mcp_hydrolix-0.1.3 → mcp_hydrolix-0.1.5}/glama.json +0 -0
  43. {mcp_hydrolix-0.1.3 → mcp_hydrolix-0.1.5}/mcp_hydrolix/__init__.py +0 -0
@@ -0,0 +1,13 @@
1
+ __pycache__/
2
+ *.pyc
3
+ *.pyo
4
+ *.pyd
5
+ *.db
6
+ *.sqlite3
7
+ .env
8
+ .venv/
9
+ .envrc
10
+ .DS_Store
11
+ tests/
12
+ .pytest_cache/
13
+ .ruff_cache/
@@ -1,3 +1,3 @@
1
1
  [*]
2
2
  trim_trailing_whitespace = true
3
- end_of_line = lf
3
+ end_of_line = lf
@@ -0,0 +1,26 @@
1
+ What does this MR do?
2
+ -----------------------
3
+
4
+ Does this MR meet the acceptance criteria?
5
+ --------------------------------------------
6
+
7
+ * [ ] Documentation created/updated
8
+ * [ ] Tests added for this feature/bug
9
+ * [ ] Does this change request have any security impacts?
10
+
11
+ Release Notes
12
+ ---------------------------------------------------
13
+
14
+ * Major changes:
15
+ *
16
+ * Minor changes:
17
+ *
18
+ * Bugfixes:
19
+ *
20
+ * Issues Closed:
21
+ *
22
+ * Security impacts identified:
23
+ *
24
+
25
+ Testing
26
+ --------------------------------------------
@@ -0,0 +1,67 @@
1
+ on:
2
+ workflow_dispatch:
3
+ inputs:
4
+ publish_pypi:
5
+ description: "Include a pypi push in this publish"
6
+ required: true
7
+ type: boolean
8
+ default: true
9
+ publish_docker:
10
+ description: "Include a docker push in this publish"
11
+ required: true
12
+ type: boolean
13
+ default: true
14
+
15
+ jobs:
16
+ publish:
17
+ name: Upload release to PyPI
18
+ runs-on: ubuntu-latest
19
+ if: ${{ inputs.publish_pypi }}
20
+ environment:
21
+ name: pypi
22
+ url: "https://pypi.org/p/mcp-hydrolix"
23
+ permissions:
24
+ id-token: write
25
+ steps:
26
+ - uses: actions/checkout@v5
27
+ - uses: astral-sh/setup-uv@v5
28
+ - run: uv python install
29
+ - run: uv build
30
+ - uses: pypa/gh-action-pypi-publish@release/v1
31
+ publish-docker:
32
+ name: Upload release to GAR
33
+ runs-on: ubuntu-latest
34
+ if: ${{ inputs.publish_docker }}
35
+ steps:
36
+ - name: Checkout repository
37
+ uses: actions/checkout@v5
38
+ - name: Setup uv
39
+ uses: astral-sh/setup-uv@v5
40
+ - name: Authenticate GAR
41
+ uses: google-github-actions/auth@v3
42
+ with:
43
+ # Key ID: 98941823000cead5a61777398bd450e3e19539c3
44
+ credentials_json: ${{ secrets.GCP_GKE_CI_KEY }}
45
+ - name: "Set up GCP SDK" # needs to be done after google-github-actions/auth but before `gcloud auth configure-docker`
46
+ uses: google-github-actions/setup-gcloud@v3
47
+ - name: Configure GAR for docker
48
+ run: gcloud auth configure-docker us-docker.pkg.dev --quiet
49
+ - name: Get tag
50
+ id: get_tag
51
+ shell: bash
52
+ run: |
53
+ tag="v$(uv version --short)"
54
+ echo "::notice::Tag is $tag"
55
+ echo "tag=$tag" >> "$GITHUB_OUTPUT"
56
+ - name: Build docker image for MCP
57
+ shell: bash
58
+ run: |
59
+ docker buildx build \
60
+ -t us-docker.pkg.dev/hdx-art/t/mcp-hydrolix:${{ steps.get_tag.outputs.tag }} \
61
+ -t us-docker.pkg.dev/hdx-art/t/mcp-hydrolix:latest \
62
+ .
63
+ - name: Push docker image
64
+ shell: bash
65
+ run: |
66
+ docker push us-docker.pkg.dev/hdx-art/t/mcp-hydrolix:${{ steps.get_tag.outputs.tag }}
67
+ docker push us-docker.pkg.dev/hdx-art/t/mcp-hydrolix:latest
@@ -0,0 +1,40 @@
1
+ name: Tests Pipeline
2
+
3
+ on:
4
+ pull_request:
5
+ paths:
6
+ - '.github/workflows/tests.yml'
7
+ - 'mcp_hydrolix/**'
8
+ - 'mcp_hydrolix/tests/**'
9
+ - 'mcp_hydrolix/pyproject.toml'
10
+ - 'mcp_hydrolix/ruff.toml'
11
+ - 'mcp_hydrolix/uv.lock'
12
+ - 'mcp_hydrolix/Dockerfile'
13
+ - 'mcp_hydrolix/docker-compose.yaml'
14
+ workflow_dispatch:
15
+
16
+ jobs:
17
+ core-test:
18
+ runs-on: ubuntu-latest
19
+ steps:
20
+ - uses: actions/checkout@v5
21
+ - uses: actions/setup-python@v6
22
+ with:
23
+ python-version: '3.13'
24
+ - name: Pre-commit
25
+ uses: pre-commit/action@v3.0.1
26
+ with:
27
+ extra_args: --all-files
28
+ - name: Build and run Docker Compose services
29
+ run: docker compose up -d --wait --wait-timeout 300
30
+ - name: Install uv
31
+ uses: astral-sh/setup-uv@v7
32
+ - name: Run tests
33
+ working-directory: .
34
+ run: |
35
+ uv sync --frozen --no-editable
36
+ uv pip install '.[dev]'
37
+ uv run pytest
38
+ - name: Stop Docker Compose services
39
+ if: always()
40
+ run: docker compose down
@@ -168,7 +168,7 @@ cython_debug/
168
168
  # be found at https://github.com/github/gitignore/blob/main/Global/JetBrains.gitignore
169
169
  # and can be added to the global gitignore or merged into this file. For a more nuclear
170
170
  # option (not recommended) you can uncomment the following to ignore the entire idea folder.
171
- #.idea/
171
+ .idea/
172
172
 
173
173
  # PyPI configuration file
174
174
  .pypirc
@@ -0,0 +1,20 @@
1
+ repos:
2
+ - repo: https://github.com/pre-commit/pre-commit-hooks
3
+ rev: v6.0.0
4
+ hooks:
5
+ - id: end-of-file-fixer
6
+ - id: trailing-whitespace
7
+ args: [--markdown-linebreak-ext=md]
8
+ - id: check-yaml
9
+ - id: check-json
10
+ - id: check-toml
11
+ - id: no-commit-to-branch
12
+
13
+ - repo: https://github.com/astral-sh/ruff-pre-commit
14
+ rev: v0.12.9
15
+ hooks:
16
+ - id: ruff
17
+ name: ruff lint
18
+ args: [--fix]
19
+ - id: ruff-format
20
+ name: ruff format
@@ -0,0 +1,49 @@
1
+ # use the official uv image (with matching python/alpine version) to construct the venv
2
+ FROM ghcr.io/astral-sh/uv:0.9.4-python3.13-alpine AS builder
3
+ # # Install `cc` (to build lz4 from source)
4
+ RUN apk add build-base
5
+
6
+ WORKDIR /app
7
+
8
+ # dependencies specifications
9
+ COPY pyproject.toml /app/
10
+ COPY uv.lock /app/
11
+ # And because uv sync likes to verify the README... for some reason...
12
+ COPY README.md /app/
13
+
14
+ # produce .venv
15
+ RUN uv sync --locked
16
+
17
+ # begin definition of runtime container, relying on the venv made in builder
18
+ FROM python:3.13-alpine
19
+
20
+ # don't buffer log streams (docker adds enough delay)
21
+ ENV PYTHONUNBUFFERED=1
22
+
23
+ # don't cache pyc bytecode, since the container fs isn't persisted across restarts anyways
24
+ ENV PYTHONDONTWRITEBYTECODE=1
25
+
26
+ # Bind HTTP transport to all interfaces
27
+ ENV HYDROLIX_MCP_BIND_HOST=0.0.0.0
28
+ ENV HYDROLIX_MCP_SERVER_TRANSPORT=http
29
+
30
+ # declare that we expose port 8000
31
+ EXPOSE 8000
32
+
33
+ # Got a health check too
34
+ HEALTHCHECK --interval=30s --timeout=30s --start-period=5s --retries=3 \
35
+ CMD [ "wget", "--no-verbose", "--tries=1", "--spider", "http://127.0.0.1:8000/health" ]
36
+
37
+ RUN addgroup -g 1000 -S appgroup && \
38
+ adduser -u 1000 -S appuser -G appgroup -h /app -s /sbin/nologin
39
+ USER appuser
40
+
41
+ WORKDIR /app
42
+
43
+
44
+ COPY --from=builder --chown=appuser:appgroup /app/.venv/ /app/.venv
45
+
46
+ COPY --chown=appuser:appgroup mcp_hydrolix/ /app/mcp_hydrolix
47
+ COPY --chown=appuser:appgroup pyproject.toml /app/
48
+
49
+ ENTRYPOINT [".venv/bin/python", "-m", "mcp_hydrolix.main"]
@@ -198,4 +198,4 @@
198
198
  distributed under the License is distributed on an "AS IS" BASIS,
199
199
  WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
200
200
  See the License for the specific language governing permissions and
201
- limitations under the License.
201
+ limitations under the License.
@@ -0,0 +1,314 @@
1
+ Metadata-Version: 2.4
2
+ Name: mcp-hydrolix
3
+ Version: 0.1.5
4
+ Summary: An MCP server for Hydrolix.
5
+ Project-URL: Home, https://github.com/hydrolix/mcp-hydrolix
6
+ License-Expression: Apache-2.0
7
+ License-File: LICENSE
8
+ Requires-Python: >=3.13
9
+ Requires-Dist: clickhouse-connect>=0.10.0
10
+ Requires-Dist: fastmcp>=2.13.3
11
+ Requires-Dist: gunicorn>=23.0.0
12
+ Requires-Dist: pip-system-certs>=4.0
13
+ Requires-Dist: pyjwt>=2.10.1
14
+ Requires-Dist: python-dotenv>=1.0.1
15
+ Provides-Extra: dev
16
+ Requires-Dist: fastapi>=0.124.0; extra == 'dev'
17
+ Requires-Dist: mcp-clickhouse>=0.1.12; extra == 'dev'
18
+ Requires-Dist: pre-commit; extra == 'dev'
19
+ Requires-Dist: pytest; extra == 'dev'
20
+ Requires-Dist: pytest-asyncio; extra == 'dev'
21
+ Requires-Dist: pytest-repeat; extra == 'dev'
22
+ Requires-Dist: pytest-xdist; extra == 'dev'
23
+ Requires-Dist: ruff; extra == 'dev'
24
+ Description-Content-Type: text/markdown
25
+
26
+ # Hydrolix MCP Server
27
+
28
+ [![PyPI - Version](https://img.shields.io/pypi/v/mcp-hydrolix)](https://pypi.org/project/mcp-hydrolix)
29
+
30
+ An MCP server for Hydrolix.
31
+
32
+ ## Tools
33
+
34
+ * `run_select_query`
35
+ * Execute SQL queries on your Hydrolix cluster.
36
+ * Input: `sql` (string): The SQL query to execute.
37
+ * All Hydrolix queries are run with `readonly = 1` to ensure they are safe.
38
+
39
+ * `list_databases`
40
+ * List all databases on your Hydrolix cluster.
41
+
42
+ * `list_tables`
43
+ * List all tables in a database.
44
+ * Input: `database` (string): The name of the database.
45
+
46
+ ## Effective Usage
47
+
48
+ 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:
49
+
50
+ * 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 ...")
51
+ - This encourages the model to use the MCP tools available and minimizes hallucinations.
52
+ * 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.
53
+ - This prompts the model to write more efficient queries that take advantage of [primary key optimizations](https://hydrolix.io/blog/optimizing-latest-n-row-queries/)
54
+
55
+ ### Health Check Endpoint
56
+
57
+ When running with HTTP or SSE transport, a health check endpoint is available at `/health`. This endpoint:
58
+ - Returns `200 OK` with the Hydrolix query-head's Clickhouse version if the server is healthy and can connect to Hydrolix
59
+ - Returns `503 Service Unavailable` if the server cannot connect to the Hydrolix query-head
60
+
61
+ Example:
62
+ ```bash
63
+ curl http://localhost:8000/health
64
+ # Response: OK - Connected to Hydrolix compatible with ClickHouse 24.3.1
65
+ ```
66
+
67
+ ## Configuration
68
+
69
+ 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.
70
+
71
+ The recommended way to launch the Hydrolix MCP server is via the [`uv` project manager](https://github.com/astral-sh/uv), which will manage installing all other dependencies in an isolated environment.
72
+
73
+ ### Authentication
74
+
75
+ The server supports multiple authentication methods with the following precedence (highest to lowest):
76
+
77
+ 1. **Per-request Bearer token**: Service account token provided via `Authorization: Bearer <token>` header
78
+ 2. **Per-request GET parameter**: Service account token provided via `?token=<token>` query parameter
79
+ 3. **Environment-based credentials**: Credentials configured via environment variables
80
+ - Service account token (`HYDROLIX_TOKEN`), or
81
+ - Username and password (`HYDROLIX_USER` and `HYDROLIX_PASSWORD`)
82
+
83
+ 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.
84
+
85
+ MCP Server definition using username and password (JSON):
86
+
87
+ ```json
88
+ {
89
+ "command": "uv",
90
+ "args": [
91
+ "run",
92
+ "--with",
93
+ "mcp-hydrolix",
94
+ "--python",
95
+ "3.13",
96
+ "mcp-hydrolix"
97
+ ],
98
+ "env": {
99
+ "HYDROLIX_HOST": "<hydrolix-host>",
100
+ "HYDROLIX_USER": "<hydrolix-user>",
101
+ "HYDROLIX_PASSWORD": "<hydrolix-password>"
102
+ }
103
+ }
104
+ ```
105
+
106
+ MCP Server definition using service account token (JSON):
107
+
108
+ ```json
109
+ {
110
+ "command": "uv",
111
+ "args": [
112
+ "run",
113
+ "--with",
114
+ "mcp-hydrolix",
115
+ "--python",
116
+ "3.13",
117
+ "mcp-hydrolix"
118
+ ],
119
+ "env": {
120
+ "HYDROLIX_HOST": "<hydrolix-host>",
121
+ "HYDROLIX_TOKEN": "<hydrolix-service-account-token>"
122
+ }
123
+ }
124
+ ```
125
+
126
+ MCP Server definition using username and password (YAML):
127
+
128
+ ```yaml
129
+ command: uv
130
+ args:
131
+ - run
132
+ - --with
133
+ - mcp-hydrolix
134
+ - --python
135
+ - "3.13"
136
+ - mcp-hydrolix
137
+ env:
138
+ HYDROLIX_HOST: <hydrolix-host>
139
+ HYDROLIX_USER: <hydrolix-user>
140
+ HYDROLIX_PASSWORD: <hydrolix-password>
141
+ ```
142
+
143
+ MCP Server definition using service account token (YAML):
144
+
145
+ ```yaml
146
+ command: uv
147
+ args:
148
+ - run
149
+ - --with
150
+ - mcp-hydrolix
151
+ - --python
152
+ - "3.13"
153
+ - mcp-hydrolix
154
+ env:
155
+ HYDROLIX_HOST: <hydrolix-host>
156
+ HYDROLIX_TOKEN: <hydrolix-service-account-token>
157
+ ```
158
+
159
+ ### Configuration Example (Claude Desktop)
160
+
161
+ 1. Open the Claude Desktop configuration file located at:
162
+ - On macOS: `~/Library/Application Support/Claude/claude_desktop_config.json`
163
+ - On Windows: `%APPDATA%/Claude/claude_desktop_config.json`
164
+
165
+ 2. Add a `mcp-hydrolix` server entry to the `mcpServers` config block to use username and password:
166
+
167
+ ```json
168
+ {
169
+ "mcpServers": {
170
+ "mcp-hydrolix": {
171
+ "command": "uv",
172
+ "args": [
173
+ "run",
174
+ "--with",
175
+ "mcp-hydrolix",
176
+ "--python",
177
+ "3.13",
178
+ "mcp-hydrolix"
179
+ ],
180
+ "env": {
181
+ "HYDROLIX_HOST": "<hydrolix-host>",
182
+ "HYDROLIX_USER": "<hydrolix-user>",
183
+ "HYDROLIX_PASSWORD": "<hydrolix-password>"
184
+ }
185
+ }
186
+ }
187
+ }
188
+ ```
189
+
190
+ To leverage service account use the following config block:
191
+
192
+ ```json
193
+ {
194
+ "mcpServers": {
195
+ "mcp-hydrolix": {
196
+ "command": "uv",
197
+ "args": [
198
+ "run",
199
+ "--with",
200
+ "mcp-hydrolix",
201
+ "--python",
202
+ "3.13",
203
+ "mcp-hydrolix"
204
+ ],
205
+ "env": {
206
+ "HYDROLIX_HOST": "<hydrolix-host>",
207
+ "HYDROLIX_TOKEN": "<hydrolix-service-account-token>"
208
+ }
209
+ }
210
+ }
211
+ }
212
+ ```
213
+
214
+ 3. Update the environment variable definitions to point to your Hydrolix cluster.
215
+
216
+ 4. (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`.
217
+
218
+ 5. 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.
219
+
220
+ ### Configuration Example (Claude Code)
221
+
222
+ To configure the Hydrolix MCP server for Claude Code, run the following command:
223
+
224
+ ```bash
225
+ claude mcp add --transport stdio hydrolix \
226
+ --env HYDROLIX_USER=<hydrolix-user> \
227
+ --env HYDROLIX_PASSWORD=<hydrolix-password> \
228
+ --env HYDROLIX_HOST=<hydrolix-host> \
229
+ --env HYDROLIX_MCP_SERVER_TRANSPORT=stdio \
230
+ -- uv run --with mcp-hydrolix --python 3.13 mcp-hydrolix
231
+ ```
232
+
233
+ ### Environment Variables
234
+
235
+ 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.
236
+
237
+ #### Required Variables
238
+ * `HYDROLIX_HOST`: The hostname of your Hydrolix server
239
+
240
+ #### Authentication Variables
241
+ At least one authentication method must be configured when using the stdio transport:
242
+
243
+ * `HYDROLIX_TOKEN`: Service account token for environment-based authentication
244
+ * `HYDROLIX_USER` and `HYDROLIX_PASSWORD`: Username and password for environment-based authentication (both must be provided together)
245
+
246
+ In summary:
247
+ - For stdio, you MUST use HYDROLIX_TOKEN or HYDROLIX_USER+HYDROLIX_PASS (environmental credentials)
248
+ - For http/sse, you MAY use HYDROLIX_TOKEN or HYDROLIX_USER+HYDROLIX_PASS (environmental credentials), but you may instead use per-request credentials.
249
+
250
+ If no credentials are provided via the environment or the request, the request will fail.
251
+
252
+ #### Optional Variables
253
+ * `HYDROLIX_PORT`: The port number of your Hydrolix server
254
+ * Default: `8088`
255
+ * Usually doesn't need to be set unless using a non-standard port
256
+ * `HYDROLIX_VERIFY`: Enable/disable SSL certificate verification
257
+ * Default: `"true"`
258
+ * Set to `"false"` to disable certificate verification (not recommended for production)
259
+ * `HYDROLIX_DATABASE`: Default database to use
260
+ *Default: None (uses server default)
261
+ * Set this to automatically connect to a specific database
262
+ * `HYDROLIX_MCP_SERVER_TRANSPORT`: Sets the transport method for the MCP server.
263
+ * Default: `"stdio"`
264
+ * Valid options: `"stdio"`, `"http"`, `"sse"`. This is useful for local development with tools like MCP Inspector.
265
+ * `HYDROLIX_MCP_BIND_HOST`: Host to bind the MCP server to when using HTTP or SSE transport
266
+ * Default: `"127.0.0.1"`
267
+ * Set to `"0.0.0.0"` to bind to all network interfaces (useful for Docker or remote access)
268
+ * Only used when transport is `"http"` or `"sse"`
269
+ * `HYDROLIX_MCP_BIND_PORT`: Port to bind the MCP server to when using HTTP or SSE transport
270
+ * Default: `"8000"`
271
+ * Only used when transport is `"http"` or `"sse"`
272
+
273
+
274
+ For MCP Inspector or remote access with HTTP transport:
275
+
276
+ ```env
277
+ HYDROLIX_HOST=localhost
278
+ HYDROLIX_USER=default
279
+ HYDROLIX_PASSWORD=myPassword
280
+ HYDROLIX_MCP_SERVER_TRANSPORT=http
281
+ HYDROLIX_MCP_BIND_HOST=0.0.0.0 # Bind to all interfaces
282
+ HYDROLIX_MCP_BIND_PORT=4200 # Custom port (default: 8000)
283
+ ```
284
+
285
+ When using HTTP transport, the server will run on the configured port (default 8000). For example, with the above configuration:
286
+ - MCP endpoint: `http://localhost:4200/mcp`
287
+ - Health check: `http://localhost:4200/health`
288
+
289
+ #### Using Per-Request Authentication with HTTP Transport
290
+
291
+ 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.
292
+
293
+ Example `mcpServers` configuration connecting to a remote HTTP server with per-request authentication:
294
+
295
+ ```json
296
+ {
297
+ "mcpServers": {
298
+ "mcp-hydrolix-remote": {
299
+ "url": "http://my-hydrolix-mcp.example.com:8000/mcp?token=<service-account-token>"
300
+ }
301
+ }
302
+ }
303
+ ```
304
+
305
+ Example minimal `.env` configuration for running your own HTTP server without environment credentials:
306
+
307
+ ```env
308
+ HYDROLIX_HOST=my-cluster.hydrolix.net
309
+ HYDROLIX_MCP_SERVER_TRANSPORT=http
310
+ ```
311
+
312
+ 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.
313
+
314
+ Note: The bind host and port settings are only used when transport is set to "http" or "sse".