Docker Sandboxes mixin: connect an agent to a remote ClickHouse warehouse via the ClickHouse MCP ser
242
Connects an agent to a remote ClickHouse warehouse (ClickHouse Cloud or self-hosted) over the HTTP interface. The agent queries with curl; the password is injected by the sbx proxy into the X-ClickHouse-Key header, so it never lives inside the container. Edit the CLICKHOUSE_* values below for your warehouse; set the password with: sbx secret set clickhouse.
| Name | Service | Required | Description |
|---|---|---|---|
CLICKHOUSE_PASSWORD | clickhouse | Optional | ClickHouse password (set it with: sbx secret set clickhouse) |
CHANGE_ME.clickhouse.cloud
sbx run <agent> --kit docker.io/ajeetraina777/clickhouse-kit:latestRun the following command to install sbx on your machine.
brew install docker/tap/sbxwinget install Docker.sbxA Docker Sandboxes kit (kind: mixin)
that connects an agent to a remote ClickHouse warehouse (ClickHouse Cloud or
self-hosted) over the HTTP interface. The agent queries your real warehouse
with curl — inside an isolated microVM, under a deny-all network policy, with
the password injected by the sbx proxy so it never enters the container.
Source and full docs: https://github.com/ajeetraina/sbx-kits-clickhouse
CLICKHOUSE_PASSWORD is set to the sentinel proxy-managed inside the sandbox.X-ClickHouse-User: <user> and
X-ClickHouse-Key: proxy-managed headers.X-ClickHouse-Key header for your real password on the outbound request.The ClickHouse native protocol (9000/9440) is raw TCP and can't be injected,
so this kit drives ClickHouse over the HTTP interface (8443 Cloud / 8123 plain).
Header auth is used rather than HTTP Basic because the sbx v0.39.0 proxy does not
rewrite the base64-encoded Basic header (so the clickhouse-connect-based MCP
server is not wired up).
Set the target host once (keeps the three in-spec copies in sync), store the password as a secret, then run Claude with the kit:
# from a clone of the repo
scripts/set-host.sh <your-host>.clickhouse.cloud
sbx secret set clickhouse
sbx run claude --kit docker.io/ajeetraina777/clickhouse-kit:latest .
Then ask the agent: "run SELECT count() FROM system.tables against ClickHouse".
The proxy injects the password on the wire; sbx run has no -e flag by design —
the key never enters the sandbox.
All non-secret; edit in spec.yaml (or via scripts/set-host.sh):
| value | default | meaning |
|---|---|---|
CLICKHOUSE_HOST | CHANGE_ME.clickhouse.cloud | your HTTP(S) host, no scheme/port |
CLICKHOUSE_PORT | 8443 | 8443 Cloud HTTPS · 8123 plain HTTP |
CLICKHOUSE_USER | default | ClickHouse username |
CLICKHOUSE_DATABASE | default | default database |
CLICKHOUSE_SECURE | true | true for TLS/Cloud, false for plain HTTP |
Full setup, limitations, and the raw spec.yaml live on GitHub:
https://github.com/ajeetraina/sbx-kits-clickhouse