Skip to content
AI Dev Toolkit.
Esc
  • AI Token CounterCount tokens for GPT, Claude, Gemini, DeepSeek, Qwen and more.Tool
  • LLM API Cost CalculatorEstimate per-request, daily and monthly API costs.Tool
  • AI Model ComparisonCompare prices, context windows and features across models.Tool
  • AI Model Pricing PagesSpecs, real costs and cheaper alternatives for popular models.Tool
  • Context Window CheckerSee whether your text fits each model’s context window.Tool
  • Subscription vs API CalculatorFind out whether a chat plan or the API is cheaper for you.Tool
  • GPU / VRAM CalculatorCheck how much VRAM a local model needs and which GPUs fit.Tool
  • Prompt Caching CalculatorEstimate savings from prompt caching.Tool

MCP server · Databases

ClickHouse MCP server

Lets an assistant list ClickHouse databases and tables and run SQL queries, read-only by default, plus optional embedded chDB queries.

Maintainer
ClickHouse (official)
Licence
Apache-2.0
Runs
Locally (uv)
Sign-in
A token or API key
Registry version
0.7.0 (updated 2026-09-21)
Last activity
2026-10-06

Overview

What it does

ClickHouse’s MCP server is a Python package started with uv. You point it at a ClickHouse service with environment variables for host, port, user and password, and it exposes three tools: run a query, list databases and list tables with their columns. An optional chDB mode adds an embedded ClickHouse engine that can query files, URLs and other sources without loading them first.

It is read-only by default. Writes need CLICKHOUSE_ALLOW_WRITE_ACCESS=true, and destructive statements such as DROP, TRUNCATE, DELETE and UPDATE need CLICKHOUSE_ALLOW_DROP=true as well. Queries can take named parameters, so values stay separate from the SQL text. Pick it for analytics work where an assistant explores large tables and answers questions in SQL. You can try it against the public ClickHouse SQL Playground using the demo settings in the README.

Tools

What the assistant can do

  • run_query for SQL, with named query parameters
  • list_databases
  • list_tables with paging, filters and column details
  • run_chdb_select_query on the embedded chDB engine
  • Optional HTTP transport with bearer token or OAuth

Install

Install ClickHouse MCP server in your app

You need:

  • uv
  • Python 3.10 to 3.14 (3.12 recommended)
  • A ClickHouse service and user credentials

Run in your project. --scope local keeps the servers private to you in this project; use user for every project.

Terminal
claude mcp add --env CLICKHOUSE_HOST="${CLICKHOUSE_HOST}" --env CLICKHOUSE_PORT=8443 --env CLICKHOUSE_USER="${CLICKHOUSE_USER}" --env CLICKHOUSE_PASSWORD="${CLICKHOUSE_PASSWORD}" --env CLICKHOUSE_SECURE=true --env CLICKHOUSE_VERIFY=true --scope local clickhouse -- uv run --with mcp-clickhouse --python 3.12 mcp-clickhouse
Native Windows (PowerShell)
claude mcp add --env CLICKHOUSE_HOST="$env:CLICKHOUSE_HOST" --env CLICKHOUSE_PORT=8443 --env CLICKHOUSE_USER="$env:CLICKHOUSE_USER" --env CLICKHOUSE_PASSWORD="$env:CLICKHOUSE_PASSWORD" --env CLICKHOUSE_SECURE=true --env CLICKHOUSE_VERIFY=true --scope local clickhouse -- uv run --with mcp-clickhouse --python 3.12 mcp-clickhouse
  • Set CLICKHOUSE_HOST, CLICKHOUSE_USER, CLICKHOUSE_PASSWORD first, e.g. export CLICKHOUSE_HOST=… in your shell. The command saves the value, not the variable.

Want it alongside other servers? Open ClickHouse MCP Server in the MCP config generator and add the rest; it writes one file per app. The snippets follow the setup in the server’s README, checked on 2026-10-14.

Before you install

  • Queries run read-only (readonly=1) unless CLICKHOUSE_ALLOW_WRITE_ACCESS is set to true.
  • The extra CLICKHOUSE_ALLOW_DROP gate is a best-effort check, not a security boundary; give the server a ClickHouse user with only the grants it needs.
  • chDB mode can read local files and URLs the process can reach.
  • A local MCP server runs with your user account’s permissions. Install it only from the source linked above. See how to choose a safe server.

Why it’s listed

Why we list it

Official, safe by default and well documented, with steady releases.

Related

All MCP serversMCP config generatorGuide: MCP servers in Claude CodeGuide: what is MCP?