CM

clickhouse/mcp-clickhouse

Developer tools공식

이 페이지는 AI로 자동 번역되었습니다. 기술적인 세부 사항은 원문을 확인하세요. 원문 보기

900 stars 210 forks 품질 87 트렌드 44Apache-2.0

ClickHouse를 AI 비서와 연결하세요.

개요

* run_query * ClickHouse 클러스터에서 SQL 쿼리를 실행하세요. * 입력: 쿼리(문자열): 실행할 SQL 쿼리입니다. * 쿼리는 기본적으로 읽기 전용 모드(CLICKHOUSE_ALLOW_WRITE_ACCESS=false)로 실행되지만, 필요 시 쓰기를 명시적으로 활성화할 수 있습니다. * list_databases * ClickHouse 클러스터의 모든 데이터베이스를 나열하세요. * list_tables * 페이지네이션이 있는 데이터베이스 내 테이블 목록. * 필수 입력: 데이터베이스(문자열). * 선택적 입력: * like / not_like (문자열): 테이블 이름에 LIKE 또는 NOT LIKE 필터를 적용함. * page_token (문자열): 다음 페이지를 가져오기 위해 이전 호출에서 반환된 토큰. * page_size (정수, 기본 50): 페이지당 반환되는 테이블 수. * include_detailed_columns (불, 기본 참): false 시에는 가벼운 응답을 위해 열의 메타데이터를 생략하고 전체 create_table_query은 유지함. * 응답 형태: * tables: 현재 페이지의 테이블 객체 배열. * next_page_token: 다음 페이지를 가져오기 위해 이 값을 되돌려 전달하거나, 더 이상 테이블이 없을 때는 null.

개요(AI 번역)

ClickHouse용 MCP 서버입니다.

서버는 MCP 2026-07-28를 구현하며, 레거시 초기화 핸드셰이크를 지원합니다. 2024-11-05부터 2025-11-25까지. 현대 클라이언트는 세션 없는 요청을 사용하며, server/discover. 기존 클라이언트는 레거시 프로토콜을 계속 협상할 수 있습니다.

[! 참고] MCP-Protocol-Version가 없는 > HTTP 요청은 레거시 핸들링을 통해 라우팅됩니다. 이전 2025-06-18 이전의 > 클라이언트는 계속 연결할 수 있습니다. MCP 2026-07-28 허가 이 동작은 해당 클라이언트를 지원하는 서버에서 >. 현대 클라이언트는 모든 POST 요청에 헤더를 > 주세요.

특징

클릭하우스 도구

ClickHouse 도구 응답은 JSON으로 인코딩된 문자열입니다. 정수 외부 [-9007199254740991, 9007199254740991]는 정확한 값을 유지하기 위해 십진수 문자열로 반환됩니다. 자바스크립트 클라이언트의 값들에 적용됩니다. 이는 쿼리 행과 정수 테이블 메타데이터에 적용됩니다. 안전 범위 정수와 불리언은 JSON 타입을 유지합니다.

  • run_query
  • ClickHouse 클러스터에서 SQL 쿼리를 실행할 수 있습니다.
  • 입력: query (문자열): 실행할 SQL 쿼리.
  • 선택적 입력: [params (객체): ClickHouse {name:Type} 자리 표시자에 대한 이름 값. 쿼리 매개변수를 참조하세요.

이 페이지는 AI로 자동 번역되었습니다. 기술적인 세부 사항은 원문을 확인하세요.

README

원문 README의 일부입니다. 원문 보기.

ClickHouse MCP Server

An MCP server for 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.

[!NOTE] HTTP requests without MCP-Protocol-Version are routed through legacy handling so clients from before 2025-06-18 can continue to connect. MCP 2026-07-28 permits this behavior on servers that support those clients. Modern clients should send the header on every POST request.

Features

ClickHouse Tools

ClickHouse tool responses are JSON-encoded strings. Integers outside [-9007199254740991, 9007199254740991] are returned as decimal strings to preserve exact values in JavaScript clients. This applies to query rows and integer table metadata. Safe-range integers and booleans keep their JSON types.

  • run_query

    • Execute SQL queries on your ClickHouse cluster.
    • Input: query (string): The SQL query to execute.
    • Optional input: params (object): Named values for ClickHouse {name:Type} placeholders. See Query parameters.
    • Queries run in read-only mode by default (CLICKHOUSE_ALLOW_WRITE_ACCESS=false), but writes can be enabled explicitly if needed.
    • DESCRIBE () and EXPLAIN ESTIMATE run here too and are optional ways to inspect a query’s result schema or its estimated reads. See Checking a query before running it.
  • list_databases

    • List all databases on your ClickHouse cluster.
  • list_tables

    • List tables in a database with pagination.
    • Required input: database (string).
    • Optional inputs:
      • like / not_like (string): Apply LIKE or NOT LIKE filters to table names.
      • page_token (string): Single-use token returned by a previous call. It is retained for up to one hour.
      • page_size (int, default 50): Number of tables returned per page; must be greater than 0.
      • include_detailed_columns (bool, default true): When false, omits column metadata for lighter responses while keeping the full create_table_query.
    • Response shape:
      • tables: Array of table objects for the current page.
      • next_page_token: Pass this single-use value back before it expires to fetch the next page, or null when there are no more tables.
      • total_tables: Total count of tables that match the supplied filters.

Agents Schema discovery

The server instructions suggest reading Agents Schema’s

GitHub에서 전체 README 보기

설치

This server does not publish a one-line install command.

Open the repository installation guide MCP 초보자라면? mcpskill.org 가이드부터 시작하세요 →

설정

{ "mcpServers": { "mcp-clickhouse": { "url": "http://127.0.0.1:8000", "headers": { "Authorization": "Bearer your-generated-token" } } } }