Graphrt

ClickHouse

Read-only parameterised queries (readonly=1, time and result caps), databases, tables and columns, JSONEachRow inserts (agents opt-in), DDL/DROP via a node-only execute

Beta v0.1.0 Node.js 8 actions
Use in Graphrt Desktop

About

A Graphrt plugin for ClickHouse over its HTTP interface: self-hosted servers and ClickHouse Cloud. Agent queries run with readonly=1, a time limit and result caps, values go in typed query parameters, never into the SQL text. Metadata reads are declarative (definition.mjs), query, insert_rows and execute are hand-written (lib/clickhouse-operations.mjs) because their param_<name> URL entries are named by the caller.

What it can do

  • Server and schema: ping, server_info (version, uptime, time zone, user), list_databases, list_tables (engine, rows, bytes, sorting key), describe_table (columns, types, defaults, key membership)
  • query: one read-only statement (SELECT, SHOW, DESCRIBE, EXPLAIN) with {name:Type} placeholders and parameters, returning ClickHouse's JSON (meta, data, rows, statistics)
  • insert_rows: rows as JSON objects into a table (INSERT INTO <db>.<table> FORMAT JSONEachRow, names backtick-quoted), returning written_rows
  • execute (node only): any statement: INSERT ... SELECT, CREATE, ALTER, mutations, DROP, TRUNCATE

Actions

Each action is a step you can add to a workflow. Agents can also use most of them as tools.

  • Ping server clickhouse.ping
  • Server info clickhouse.server_info
  • List databases clickhouse.list_databases
  • List tables clickhouse.list_tables
  • Describe table clickhouse.describe_table
  • Run read-only query clickhouse.query
  • Insert rows clickhouse.insert_rows
  • Execute statement clickhouse.execute

Settings

Graphrt starts plugins with a clean environment. Only these values reach the plugin, and secrets stay out of logs.

  • CLICKHOUSE_URL Optional
    Server URL, default http://localhost:8123. https required except on localhost, e.g. https://abc123.eu-west-1.aws.clickhouse.cloud:8443. A path prefix (reverse proxy) is kept, no query or credentials in the URL.
  • CLICKHOUSE_USER Optional
    User, default default (sent as X-ClickHouse-User)
  • CLICKHOUSE_PASSWORD Optional
    Password (sent as X-ClickHouse-Key, never in the URL), empty for a passwordless local user
  • CLICKHOUSE_TOOL_ALLOW_WRITES Optional
    1 lets agent tools call insert_rows

How to use it

In Graphrt Desktop

  1. Open Plugins and search for ClickHouse.
  2. Click Install and approve it.
  3. Follow the setup steps on the plugin's page, then paste the settings it needs.
  4. Describe a job that needs it, and the builder adds the steps.
Plugins in Graphrt Desktop

With the CLI

terminal
$ graphrt plugin install clickhouse
workflow.yaml
- id: signups
  type: clickhouse.query
  sql: "SELECT toDate(ts) AS day, count() AS signups FROM analytics.events WHERE event = {event:String} AND ts >= {since:DateTime} GROUP BY day ORDER BY day"
  parameters: { event: signup, since: "2026-11-01 00:00:00" }
- id: store
  type: clickhouse.insert_rows
  database: analytics
  table: daily_reports
  rows: [{ day: "2026-11-19", signups: 42 }]
Plugins in the docs