Skip to content
VS Code

ClickHouse for VS Code

io.github.burakdirin/clickhouse-mcp-server

Query ClickHouse databases from AI assistants, read-only by default with opt-in writes.

client:VS Code transport:stdio runtime:pypi

Install ClickHouse in VS Code

.vscode/mcp.json

{
  "inputs": [
    {
      "type": "promptString",
      "id": "clickhouse-host",
      "description": "CLICKHOUSE_HOST",
      "password": true
    },
    {
      "type": "promptString",
      "id": "clickhouse-port",
      "description": "CLICKHOUSE_PORT",
      "password": true
    },
    {
      "type": "promptString",
      "id": "clickhouse-user",
      "description": "CLICKHOUSE_USER",
      "password": true
    },
    {
      "type": "promptString",
      "id": "clickhouse-password",
      "description": "CLICKHOUSE_PASSWORD",
      "password": true
    },
    {
      "type": "promptString",
      "id": "clickhouse-database",
      "description": "CLICKHOUSE_DATABASE",
      "password": true
    },
    {
      "type": "promptString",
      "id": "clickhouse-secure",
      "description": "CLICKHOUSE_SECURE",
      "password": true
    },
    {
      "type": "promptString",
      "id": "clickhouse-verify",
      "description": "CLICKHOUSE_VERIFY",
      "password": true
    },
    {
      "type": "promptString",
      "id": "clickhouse-allow-write",
      "description": "CLICKHOUSE_ALLOW_WRITE",
      "password": true
    },
    {
      "type": "promptString",
      "id": "clickhouse-query-timeout",
      "description": "CLICKHOUSE_QUERY_TIMEOUT",
      "password": true
    },
    {
      "type": "promptString",
      "id": "clickhouse-max-rows",
      "description": "CLICKHOUSE_MAX_ROWS",
      "password": true
    }
  ],
  "servers": {
    "clickhouse-mcp-server": {
      "type": "stdio",
      "command": "uvx",
      "args": [
        "clickhouse-mcp-server"
      ],
      "env": {
        "CLICKHOUSE_HOST": "${input:clickhouse-host}",
        "CLICKHOUSE_PORT": "${input:clickhouse-port}",
        "CLICKHOUSE_USER": "${input:clickhouse-user}",
        "CLICKHOUSE_PASSWORD": "${input:clickhouse-password}",
        "CLICKHOUSE_DATABASE": "${input:clickhouse-database}",
        "CLICKHOUSE_SECURE": "${input:clickhouse-secure}",
        "CLICKHOUSE_VERIFY": "${input:clickhouse-verify}",
        "CLICKHOUSE_ALLOW_WRITE": "${input:clickhouse-allow-write}",
        "CLICKHOUSE_QUERY_TIMEOUT": "${input:clickhouse-query-timeout}",
        "CLICKHOUSE_MAX_ROWS": "${input:clickhouse-max-rows}"
      }
    }
  }
}

VS Code prompts for each input the first time the server starts, so no secret is written to the file. VS Code docs

ClickHouse in other clients