ClickHouse MCP Server

Query your ClickHouse database server.

Local serverstdioPython

What is the ClickHouse MCP Server?

Clickhouse mcp server connects ClickHouse to AI assistants that speak the Model Context Protocol. Query your ClickHouse database server.

What ClickHouse does

When running with HTTP or SSE transport, a health check endpoint is available at /health. This endpoint: - Returns 200 OK (body: OK) if the server is healthy and can connect to ClickHouse - Returns 503 Service Unavailable with a generic error message if the server cannot connect to ClickHouse

Practical notes

  • Written in Python.

More MCP options

Compare MCP servers by category, or browse hosted MCP servers if you prefer an endpoint over a local process.

Maintainer setup documentation.

Recorded tools

Check the linked publisher documentation and your connected client's tool list. Names and availability can vary with the server version and account permissions.

ToolWhat it does
tablesArray of table objects for the current page.
next_page_tokenPass this value back to fetch the next page, or null when there are no more tables.
total_tablesTotal count of tables that match the supplied filters.

How to install the ClickHouse MCP Server

{
  "mcpServers": {
    "clickhouse": {
      "command": "uvx",
      "args": ["mcp-clickhouse"],
      "env": {
        "CLICKHOUSE_HOST": "your-value",
        "CLICKHOUSE_PORT": "your-value",
        "CLICKHOUSE_USER": "your-value",
        "CLICKHOUSE_PASSWORD": "your-value",
        "CLICKHOUSE_ROLE": "your-value",
        "CLICKHOUSE_SECURE": "your-value",
        "CLICKHOUSE_VERIFY": "your-value",
        "CLICKHOUSE_CONNECT_TIMEOUT": "your-value"
      }
    }
  }
}

Add to claude_desktop_config.json, then restart Claude Desktop.

Configuration

VariableDescriptionRequired
CLICKHOUSE_HOSTEndpoint or connection string the server talks to.Optional
CLICKHOUSE_PORTConfiguration value read at startup.Optional
CLICKHOUSE_USERConfiguration value read at startup.Optional
CLICKHOUSE_PASSWORDConfiguration value read at startup.Optional
CLICKHOUSE_ROLEConfiguration value read at startup.Optional
CLICKHOUSE_SECUREConfiguration value read at startup.Optional
CLICKHOUSE_VERIFYConfiguration value read at startup.Optional
CLICKHOUSE_CONNECT_TIMEOUTConfiguration value read at startup.Optional

Example prompts to try

  • “Use ClickHouse to Input.”
  • “Use ClickHouse to tables.”
  • “Use ClickHouse to next page token.”

Frequently asked questions

Query your ClickHouse database server. Confirm the tools offered by your installed version in the connected client. Tool availability and permissions depend on the server and account configuration.