# ClickHouse

> ClickHouse is an open-source MCP server for databases. Official ClickHouse MCP server for querying and exploring ClickHouse clusters and chDB. It runs locally on your machine and is started by your AI client.

- **Kind:** MCP server
- **Pricing:** Open source
- **Website:** https://clickhouse.com
- **Repository:** https://github.com/clickhouse/mcp-clickhouse
- **MCP Registry name:** io.github.ClickHouse/mcp-clickhouse
- **Categories:** databases
- **Listing updated:** 2026-11-13

## About

Official ClickHouse MCP server for querying and exploring ClickHouse clusters and chDB.

## Install

### Claude Code (Terminal)

```sh
claude mcp add mcp-clickhouse --env CLICKHOUSE_HOST='<CLICKHOUSE_HOST>' --env CLICKHOUSE_USER='<CLICKHOUSE_USER>' --env CLICKHOUSE_PASSWORD='<CLICKHOUSE_PASSWORD>' -- uvx mcp-clickhouse
```

### Claude Desktop (claude_desktop_config.json)

```json
{
  "mcpServers": {
    "mcp-clickhouse": {
      "command": "uvx",
      "args": [
        "mcp-clickhouse"
      ],
      "env": {
        "CLICKHOUSE_HOST": "<CLICKHOUSE_HOST>",
        "CLICKHOUSE_USER": "<CLICKHOUSE_USER>",
        "CLICKHOUSE_PASSWORD": "<CLICKHOUSE_PASSWORD>"
      }
    }
  }
}
```

### Cursor (~/.cursor/mcp.json)

```json
{
  "mcpServers": {
    "mcp-clickhouse": {
      "command": "uvx",
      "args": [
        "mcp-clickhouse"
      ],
      "env": {
        "CLICKHOUSE_HOST": "<CLICKHOUSE_HOST>",
        "CLICKHOUSE_USER": "<CLICKHOUSE_USER>",
        "CLICKHOUSE_PASSWORD": "<CLICKHOUSE_PASSWORD>"
      }
    }
  }
}
```

### VS Code (.vscode/mcp.json)

```json
{
  "servers": {
    "mcp-clickhouse": {
      "type": "stdio",
      "command": "uvx",
      "args": [
        "mcp-clickhouse"
      ],
      "env": {
        "CLICKHOUSE_HOST": "<CLICKHOUSE_HOST>",
        "CLICKHOUSE_USER": "<CLICKHOUSE_USER>",
        "CLICKHOUSE_PASSWORD": "<CLICKHOUSE_PASSWORD>"
      }
    }
  }
}
```

### Windsurf (~/.codeium/windsurf/mcp_config.json)

```json
{
  "mcpServers": {
    "mcp-clickhouse": {
      "command": "uvx",
      "args": [
        "mcp-clickhouse"
      ],
      "env": {
        "CLICKHOUSE_HOST": "<CLICKHOUSE_HOST>",
        "CLICKHOUSE_USER": "<CLICKHOUSE_USER>",
        "CLICKHOUSE_PASSWORD": "<CLICKHOUSE_PASSWORD>"
      }
    }
  }
}
```

### Other clients (your client's MCP settings (most use this shape))

```json
{
  "mcpServers": {
    "mcp-clickhouse": {
      "command": "uvx",
      "args": [
        "mcp-clickhouse"
      ],
      "env": {
        "CLICKHOUSE_HOST": "<CLICKHOUSE_HOST>",
        "CLICKHOUSE_USER": "<CLICKHOUSE_USER>",
        "CLICKHOUSE_PASSWORD": "<CLICKHOUSE_PASSWORD>"
      }
    }
  }
}
```

## FAQ

### Is ClickHouse free?

Yes. ClickHouse is open source, so you can use and self-host it for free.

### How do I add ClickHouse to Claude Code?

Run this command in your terminal: claude mcp add mcp-clickhouse --env CLICKHOUSE_HOST='<CLICKHOUSE_HOST>' --env CLICKHOUSE_USER='<CLICKHOUSE_USER>' --env CLICKHOUSE_PASSWORD='<CLICKHOUSE_PASSWORD>' -- uvx mcp-clickhouse

### What are the best alternatives to ClickHouse?

The closest alternatives to ClickHouse are Midplane, PlatypusDB, Lorebase, Sovaria and model2data studio.

## Alternatives

- [Midplane](https://ai-powered.com/mcp/midplane): Midplane is an open-source MCP server for databases.
- [PlatypusDB](https://ai-powered.com/mcp/platypusdb): PlatypusDB is an open-source MCP server for databases.
- [Lorebase](https://ai-powered.com/mcp/lorebase): Lorebase is an open-source MCP server for knowledge and memory.
- [Sovaria](https://ai-powered.com/mcp/sovaria): Sovaria is a freemium MCP server for databases.
- [model2data studio](https://ai-powered.com/mcp/model2data-studio): model2data studio is a freemium MCP server for databases.
- [semlayer](https://ai-powered.com/mcp/semlayer): semlayer is a free MCP server for databases.
- [bricksentry](https://ai-powered.com/mcp/bricksentry): bricksentry is an open-source MCP server for databases.
- [MCP Toolbox for Databases](https://ai-powered.com/mcp/mcp-toolbox-for-databases-2): MCP Toolbox for Databases is an open-source MCP server for databases.

---
Source: https://ai-powered.com/mcp/clickhouse
