Skip to content

ClickHouse MCP Server

Run read-only SQL on ClickHouse Cloud or self-hosted ClickHouse and check costs.

Officialby ClickHouseHosted or on your computerChecked November 18, 2026

ClickHouse runs a hosted MCP server for ClickHouse Cloud that lets Claude list databases and tables, run read-only SELECT queries, and check services, backups, ClickPipes and your organization's costs; you turn it on per service and sign in with OAuth or a Cloud API key. For self-hosted ClickHouse, or local files through the embedded chDB engine, the open-source mcp-clickhouse package runs on your computer and stays read-only unless you set CLICKHOUSE_ALLOW_WRITE_ACCESS, with a second flag required for DROP, DELETE and similar operations.

Who is ClickHouse MCP for?

  • Analysts working with ClickHouse data
  • Engineers running ClickHouse Cloud
  • Teams keeping an eye on cloud spend

What can you ask ClickHouse MCP to do?

Once it is connected, ask in plain words. Your AI tool decides when to use the server and asks before it changes anything important.

Prompt 1
What databases and tables are on my production service?
Prompt 2
What is the average session duration by country over the last 7 days?
Prompt 3
Show my organization's daily ClickHouse Cloud cost for the first half of this month.

How to connect ClickHouse to Claude

MCP is an open standard. The setup steps below cover this server in Claude Code, Claude app, Codex, ChatGPT, Cursor, VS Code, Gemini CLI, Antigravity, OpenCode, Windsurf. Pick your tool:

New to MCP? Read what an MCP server is and how to add one.

Easiest: paste this into Claude Code
Connect the ClickHouse MCP server to Claude Code for me: run this command: claude mcp add --transport http clickhouse-cloud https://mcp.clickhouse.cloud/mcp
If a value starts with YOUR_, ask me for it first. When it is connected, help me sign in if needed and show me one thing I can ask it to do.

Or do it yourself:

claude mcp add --transport http clickhouse-cloud https://mcp.clickhouse.cloud/mcp

Type /mcp inside Claude Code, pick the server and choose Authenticate to sign in.

Hosted address: https://mcp.clickhouse.cloud/mcp

Unlock the setup steps

Free. Leave your email once to open the setup steps for all 152 servers, and get the best new connectors each month.

No spam. One click to unsubscribe. We use your email to send you this bonus, new guides and news about our courses.

Good to know

Turn on Connect with MCP for each service in the ClickHouse Cloud console first; for headless setups ClickHouse documents a Cloud API key sent as a Basic Authorization header, which also needs a generic Query API endpoint turned on for each service, and for self-hosted ClickHouse you run the mcp-clickhouse package with uv instead.

How did we check ClickHouse MCP?

Reviewed November 8, 2026 and reviewed again November 18: ClickHouse's remote MCP docs, its pricing page and the ClickHouse/mcp-clickhouse repo (Apache-2.0, release v0.7.0, last commit November 16, 910 stars) with its PyPI package; the Claude connectors directory listing (made by ClickHouse) was read on November 8. On both days the hosted endpoint answered our initialize request with HTTP 401 and an OAuth challenge, so it is live and expects a ClickHouse Cloud sign-in; we did not sign in or run queries.

Source: clickhouse.com/docs/products/cloud/features/ai-ml/mcp/remote-mcp

What do people ask about ClickHouse MCP?

Does the ClickHouse MCP server cost anything?

There is no separate MCP fee: its queries run on your ClickHouse Cloud service and use compute like any other query. New ClickHouse Cloud organizations start with $300 in credits for 30 days (pricing page, checked November 18, 2026), and the open-source local package is free.

Can the hosted server change my data?

No. Its query tool, run_select_query, only permits SELECT statements. It can still read service, backup, ClickPipes and cost details for the organization you authorize, so sign in with an account whose role fits that.

What do I need to switch on in ClickHouse Cloud first?

Open the service, click Connect, choose Connect with MCP and turn it on; doing that needs the control-plane:service:manage-mcp permission. Then add https://mcp.clickhouse.cloud/mcp to Claude and sign in.

How do I allow writes on the local server?

Set CLICKHOUSE_ALLOW_WRITE_ACCESS=true for INSERT, CREATE and similar statements. DROP, TRUNCATE, DELETE, UPDATE and other destructive operations also need CLICKHOUSE_ALLOW_DROP=true, and the server stays read-only if the ClickHouse instance itself refuses writes.

Should I use the hosted ClickHouse server or mcp-clickhouse?

Use the hosted server when your data lives in ClickHouse Cloud: nothing to install, an OAuth sign-in and SELECT-only queries. Use the open-source mcp-clickhouse package for self-hosted ClickHouse or for local files through chDB; it runs on your computer with Python and uv, which is simplest from Claude Code. Either way, start with a read-only user and one table you know well, and check one answer against a query you run yourself. Installing a local server in Claude Code is part of the Skills and MCP lesson of our Claude Code course, in early access; this MCP guide covers the basics first.

We wrote these answers from the official pages of each product named, read on November 18, 2026.

Using servers like ClickHouse from Claude Code? Our Claude Code course, in early access, goes from your first command to a landing page, an AI video and a working agent.