ClickHouse MCP Server

Databasestdiov0.4.0
Репозиторий

Provides AI agents with access to ClickHouse analytical databases through the Model Context Protocol. Enables running analytical queries, exploring table schemas, inspecting materialized views, and monitoring query performance. Designed for OLAP workloads with support for large result sets and query profiling.

Подключение

Добавьте эту конфигурацию в .claude/mcp.json

{
  "mcpServers": {
    "clickhouse": {
      "command": "npx",
      "args": [
        "-y",
        "@clickhouse/mcp-server"
      ],
      "env": {
        "CLICKHOUSE_HOST": "<YOUR_CLICKHOUSE_HOST>",
        "CLICKHOUSE_PORT": "<YOUR_CLICKHOUSE_PORT>",
        "CLICKHOUSE_USER": "<YOUR_CLICKHOUSE_USER>",
        "CLICKHOUSE_PASSWORD": "<YOUR_CLICKHOUSE_PASSWORD>"
      }
    }
  }
}

Инструменты (4)

run_query

Execute a ClickHouse SQL query and return results. Supports SELECT, SHOW, DESCRIBE, and EXPLAIN statements.

{
  "type": "object",
  "required": [
    "query"
  ],
  "properties": {
    "query": {
      "type": "string",
      "description": "ClickHouse SQL query to execute"
    },
    "format": {
      "type": "string",
      "description": "Output format (JSON, TabSeparated, CSV, Pretty)"
    },
    "max_rows": {
      "type": "integer",
      "description": "Maximum rows to return"
    }
  }
}

list_databases

List all databases in the ClickHouse instance.

{
  "type": "object",
  "properties": {}
}

describe_table

Show the schema of a ClickHouse table including column types, codecs, and TTL rules.

{
  "type": "object",
  "required": [
    "database",
    "table"
  ],
  "properties": {
    "table": {
      "type": "string",
      "description": "Table name"
    },
    "database": {
      "type": "string",
      "description": "Database name"
    }
  }
}

query_profile

Analyze query execution plan and performance metrics for optimization.

{
  "type": "object",
  "required": [
    "query"
  ],
  "properties": {
    "query": {
      "type": "string",
      "description": "Query to analyze"
    }
  }
}

Ресурсы

Этот сервер не предоставляет ресурсы.

Промпты

Этот сервер не предоставляет промпты.

Сведения о сервере

Автор
ClickHouse (@ClickHouse)
Репозиторий
https://github.com/ClickHouse/clickhouse-mcp-server
Лицензия
Apache-2.0
Версия
0.4.0
Звёзды
1,560
Последнее обновление
15 мая 2026 г.