Skip to content
appsgit

ClickHouse

ClickHouse is an MCP server that adds data and analytics tools to AI assistants such as Claude Desktop, Claude Code and Cursor. Official ClickHouse MCP server for querying and exploring ClickHouse clusters and chDB. It has 880 GitHub stars, is released under the Apache-2.0 license and runs locally with uvx mcp-clickhouse.

github.com/ClickHouse/mcp-clickhouse (opens in a new tab)

Install ClickHouse

Generated from the server's MCP registry entry. Replace your-value with your own values.

Claude Desktop

claude_desktop_config.json
{
  "mcpServers": {
    "clickhouse": {
      "command": "uvx",
      "args": [
        "mcp-clickhouse"
      ],
      "env": {
        "CLICKHOUSE_HOST": "your-value",
        "CLICKHOUSE_USER": "your-value",
        "CLICKHOUSE_PASSWORD": "your-value"
      }
    }
  }
}

Settings > Developer > Edit Config. macOS: ~/Library/Application Support/Claude/, Windows: %APPDATA%\Claude\. Restart Claude Desktop afterwards.

Claude Code

claude mcp add --env CLICKHOUSE_HOST=your-value --env CLICKHOUSE_USER=your-value --env CLICKHOUSE_PASSWORD=your-value --transport stdio clickhouse -- uvx mcp-clickhouse

Cursor

.cursor/mcp.json
{
  "mcpServers": {
    "clickhouse": {
      "type": "stdio",
      "command": "uvx",
      "args": [
        "mcp-clickhouse"
      ],
      "env": {
        "CLICKHOUSE_HOST": "your-value",
        "CLICKHOUSE_USER": "your-value",
        "CLICKHOUSE_PASSWORD": "your-value"
      }
    }
  }
}

Project file; use ~/.cursor/mcp.json to enable it in every project.

VS Code

.vscode/mcp.json
{
  "inputs": [
    {
      "type": "promptString",
      "id": "clickhouse_password",
      "description": "CLICKHOUSE_PASSWORD",
      "password": true
    }
  ],
  "servers": {
    "clickhouse": {
      "type": "stdio",
      "command": "uvx",
      "args": [
        "mcp-clickhouse"
      ],
      "env": {
        "CLICKHOUSE_HOST": "your-value",
        "CLICKHOUSE_USER": "your-value",
        "CLICKHOUSE_PASSWORD": "${input:clickhouse_password}"
      }
    }
  }
}

Config formats checked against the official docs on Oct 7, 2026: modelcontextprotocol.io (opens in a new tab), code.claude.com (opens in a new tab), cursor.com (opens in a new tab), code.visualstudio.com (opens in a new tab).

Environment variables

Variables the server reads at startup.

NameRequiredDescription
CLICKHOUSE_HOSTYesHostname of the ClickHouse server
CLICKHOUSE_USERYesUsername for ClickHouse authentication
CLICKHOUSE_PASSWORDsecretNoPassword for ClickHouse authentication. Required unless a client certificate uses the default or mutual TLS mode
CLICKHOUSE_PORTNoClickHouse HTTP(S) port. Defaults to 8443 when CLICKHOUSE_SECURE=true, 8123 otherwise
CLICKHOUSE_SECURENoUse HTTPS to connect to ClickHouse
CLICKHOUSE_VERIFYNoVerify SSL certificates
CLICKHOUSE_CA_CERTNoPath to a PEM CA bundle for ClickHouse server certificate verification
CLICKHOUSE_CLIENT_CERTNoPath to a PEM client certificate for the ClickHouse HTTPS connection
CLICKHOUSE_CLIENT_CERT_KEYNoPath to the PEM private key for CLICKHOUSECLIENTCERT
CLICKHOUSE_TLS_MODENoClient certificate mode: mutual, proxy, or strict
CLICKHOUSE_DATABASENoDefault database to use
CLICKHOUSE_ROLENoClickHouse role to activate for the session
CLICKHOUSE_ALLOW_WRITE_ACCESSNoAllow write operations (DDL and DML). Queries run read-only by default
CLICKHOUSE_ALLOW_DROPNoAllow destructive operations (DROP, TRUNCATE, DELETE, UPDATE, REPLACE, CLEAR, and DETACH PERMANENTLY) when write access is also enabled
CLICKHOUSE_MCP_QUERY_TIMEOUTNoQuery tool timeout in seconds
CLICKHOUSE_MCP_MAX_WORKERSNoMaximum query worker thread pool size

About ClickHouse

The server implements MCP 2026-07-28 and supports legacy initialize handshakes from 2024-11-05 through 2025-11-25. Modern clients use sessionless requests and server/discover. Existing clients can continue to negotiate the legacy protocol.

FAQ

ClickHouse FAQ

Still curious? Email info@appsgit.com.

What is ClickHouse?

ClickHouse is an MCP server that adds data and analytics tools to AI assistants such as Claude Desktop, Claude Code and Cursor. Official ClickHouse MCP server for querying and exploring ClickHouse clusters and chDB. It has 880 GitHub stars, is released under the Apache-2.0 license and runs locally with uvx mcp-clickhouse. The source code is at github.com/ClickHouse/mcp-clickhouse.

How do I install the ClickHouse MCP server?

Add the command uvx mcp-clickhouse to your MCP client: put it in claude_desktop_config.json for Claude Desktop, run claude mcp add for Claude Code, or add it to .cursor/mcp.json (Cursor) or .vscode/mcp.json (VS Code). The snippets on this page are ready to paste.

Is ClickHouse free?

The server is open source under the Apache-2.0 license, so running it is free. It needs credentials (CLICKHOUSE_PASSWORD) for the service it connects to, which may require a paid account.

Is ClickHouse actively maintained?

The most recent commit was on Oct 6, 2026. The latest release is v0.7.0, published Sep 21, 2026. appsgit only lists MCP servers with a commit in the last six months and re-checks every server daily.