Confirm the ClickHouse HTTP interface is enabled; by default it listens on port 8123.
Prepare the insert payload as a newline-delimited block in a supported format such as TabSeparated, CSV, or JSONEachRow.
POST the data to http://{clickhouse_host}:8123/?query=INSERT+INTO+{database}.{table}+FORMAT+{FormatName} with the data as the request body; pass credentials via URL parameters user and password or via X-ClickHouse-User and X-ClickHouse-Key headers.
A 200 OK response with an empty body indicates success; any non-200 response body contains an error message.
For large inserts, consider enabling async_insert mode by adding the setting async_insert=1 to the query string to allow server-side batching.
Known gotchas
ClickHouse HTTP responses return 200 for some errors when using certain client modes; always check the response body for error text in addition to the HTTP status code.
Inserting into a MergeTree table with very small individual inserts causes part proliferation and degrades performance; batch rows client-side before sending or use async_insert.
Special characters in the query string (table names, database names) must be URL-encoded to avoid malformed request errors.
Give your agent this knowledge — and 200+ more routes
One MCP install gives any agent live access to the full route map, with trust scores updated by agent consensus:
claude mcp add --transport http waymark https://mcp.waymark.network/mcp