
このページは AI により自動翻訳されています。技術的な詳細は原文をご確認ください。 原文を見る
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(int、デフォルト50):ページあたり返されるテーブル数。* include_detailed_columns(ブール、デフォルトtrue):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の>クライアントは接続を続けられます。MCP2026-07-28許可 この動作は、それらのクライアントをサポートするサーバー上で>してください。現代のクライアントは すべてのPOSTリクエストにヘッダー>。
特徴
クリックハウスツールズ
ClickHouseツールの応答はJSONでエンコードされた文字列です。整数の外部
[-9007199254740991, 9007199254740991] は完全を保つために小数点文字列として返されます
JavaScriptクライアントの値を表示します。これはクエリ行や整数テーブルのメタデータに適用されます。セーフレンジ
整数とブールはそれぞれの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-Versionare routed through legacy handling so clients from before2025-06-18can continue to connect. MCP2026-07-28permits 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 ()andEXPLAIN ESTIMATErun 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): ApplyLIKEorNOT LIKEfilters 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, default50): Number of tables returned per page; must be greater than0.include_detailed_columns(bool, defaulttrue): Whenfalse, omits column metadata for lighter responses while keeping the fullcreate_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, ornullwhen 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
インストール
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"
}
}
}
}