list_databases
List available ClickHouse databases
無需輸入參數。

io.github.CloudCorpRecords由 GitHub 帳號 CloudCorpRecords 發布v0.1.0更新於 Nov 7, 2026
Query ClickHouse over HTTP: list databases and tables, run SELECT.
唯讀的 ClickHouse MCP 伺服器,讓助理透過 HTTP 介面列出資料庫與資料表,並執行受保護的 SELECT 查詢。
Desktop only,透過 STDIO。 STDIO 服務會啟動本機處理程序,因此需要 SourceWeft 桌面主機。
參照 儲存庫 中的啟動說明。
analyticbase lets an agent — or you, at a terminal — look inside a
ClickHouse database and ask it questions, without ever being able to
change it. It lists the databases on a server, lists the tables in
one database along with each table's engine, comment, row count and
column count, and runs single read-only SELECT queries. Everything
travels over ClickHouse's plain HTTP interface, so there is no client
library bundled and no native port to tunnel.
When ClickHouse is not there, analyticbase says so. The MCP server starts and lists its tools with no server behind it at all; only an actual operation makes a request, and a refused connection or a server error comes back as an error carrying the server's own text — never as invented rows.
Or run the container image:
The container defaults to the MCP server (see below). Pass CLI arguments to use it as a CLI instead.
Exit codes: 0 on success, 1 when the query, the guard, or the
connection fails (the error says which), 2 for usage errors.
The endpoint is configured through the environment:
Each operation POSTs its SQL to the HTTP interface as the request
body, with the credentials as URL parameters — the interface's own
convention. The listing operations append FORMAT JSONEachRow and
parse one JSON object per line; list_tables reads system.tables
and counts each table's columns with a subquery over
system.columns, applying the like / not_like filters as LIKE
/ NOT LIKE clauses with safely escaped literals. Select queries
append FORMAT JSON and return the response's data array.
run_select_query (and the CLI query command) accepts a query only
if all of these hold:
SELECT or WITH.INSERT, UPDATE, DELETE, DROP, ALTER, CREATE,
TRUNCATE, GRANT, REVOKE, OPTIMIZE, RENAME, DETACH, or
ATTACH appears as a whole word outside a string literal.
Single-quoted literals are blanked out before scanning, so
SELECT 'drop table t' is a fine query; a column literally named
update is not — the guard would rather refuse an odd name than be
talked around.The listing operations build their SQL internally from validated, escaped pieces, so they need no guard.
One bin serves both faces. The mcp subcommand starts a stdio MCP
server:
MCP client configuration:
All HTTP goes through an injectable fetch function, which is what the test suite drives: config resolution, the guard, SQL construction, both response-format parsers, and all three operations are covered against a fake fetch.
MIT — see LICENSE.
來源:README.md,提交 4f03e0f
List available ClickHouse databases
無需輸入參數。
List available ClickHouse tables in a database, including schema, comment, row count, and column count.
likedatabase必填not_likeRun a SELECT query in a ClickHouse database
query必填已滿足適用檢查項的 90%
該評分衡量此收錄條目的完整程度,依據註冊中心條目、端點與公開來源計算得出。它不是對伺服器本身的評價,也不表示伺服器安全或目前可用:可連通性是帶日期的檢查結果,評分也不包含安裝量或使用者評價。
請在註冊中心條目中宣告憑證請求標頭,或保持端點能夠回應探測,以便判定其認證方式。
npx @reneturcios/analyticbase list-databasesdocker run -i ghcr.io/cloudcorprecords/analyticbase# Which databases does this server hold?analyticbase list-databases
# What tables live in one database? (name filters are LIKE patterns)analyticbase list-tables analyticsanalyticbase list-tables analytics --like "events_%" --not-like "%_tmp"
# Run one read-only query; rows print as JSONanalyticbase query "SELECT count() AS n FROM analytics.events"
# Start the MCP serveranalyticbase mcp
analyticbase --versionnpx -y @reneturcios/analyticbase mcp{ "mcpServers": { "analyticbase": { "command": "npx", "args": ["-y", "@reneturcios/analyticbase", "mcp"], "env": { "CLICKHOUSE_HOST": "localhost", "CLICKHOUSE_PORT": "8123" } } }}npm installnpm run build # tsc -> dist/npm test # node test runner over test/*.test.ts, no network, no live ClickHousenpm run dev # run the CLI from source via tsx