Skip to content

ClickHouse MCP and API

ClickHouse provides SQL queries and schema inspection over analytical databases in an authorized account. An agent can query analytical tables and inspect database schemas. Sign in to ClickHouse the first time an agent uses the server.

Add to Longwave

Install elsewhere

Install ClickHouse

Choose a harness. These instructions connect to the hosted MCP endpoint shown on this page.

Claude Code

Run this in your terminal. It adds a user-scoped server; use --scope project instead if it should apply only to the current project.

terminal
claude mcp add --scope user --transport http clickhouse https://mcp.clickhouse.cloud/mcp
access
Connect account

Use ClickHouse on Longwave

  1. Download Longwave or open app.longwave.run.
  2. Sign in to ClickHouse the first time an agent uses the server.
  3. Ask for the result in any thread, for example: “Query product events for a report”. The agent picks the ClickHouse function and calls it.

Use cases

Questions people ask

What does the ClickHouse MCP server query?

The server provides SQL queries against a configured ClickHouse database. It also exposes tools for listing databases and tables. ClickHouse documentation

How does the ClickHouse server choose its database connection?

The server reads its ClickHouse connection settings from configuration. The configured database user determines the permitted database operations. ClickHouse documentation

How do I add the ClickHouse MCP server to Claude Code?

Run claude mcp add --transport http clickhouse https://mcp.clickhouse.cloud/mcp in a terminal. Sign in to ClickHouse the first time an agent uses the server.

Who publishes the ClickHouse MCP server?

ClickHouse publishes the ClickHouse MCP server that Longwave installs.

Use ClickHouse in Longwave

Call ClickHouse from any agent thread, on your machine or in the cloud.

Add to Longwave