Skip to main content
Glama
alyiox

mcp-clickhousex

by alyiox

Server Configuration

Describes the environment variables required to run the server.

NameRequiredDescriptionDefault
MCP_CLICKHOUSE_DSNYesConnection DSN (required). Example: http://user:password@host:8123/database
MCP_CLICKHOUSE_DESCRIPTIONNoOptional description for the default profile (tooling/AI discovery)
MCP_CLICKHOUSE_QUERY_MAX_ROWSNoOptional max rows per interactive query (default 500; hard ceiling 1000)
MCP_CLICKHOUSE_SNAPSHOT_MAX_ROWSNoOptional max rows for snapshot queries (default 10000; hard ceiling 50000)
MCP_CLICKHOUSE_QUERY_COMMAND_TIMEOUT_SECONDSNoOptional interactive query timeout in seconds (default 30; hard ceiling 300)
MCP_CLICKHOUSE_SNAPSHOT_COMMAND_TIMEOUT_SECONDSNoOptional snapshot query timeout in seconds (default 120; hard ceiling 300)

Capabilities

Features and capabilities supported by this server

CapabilityDetails
tools
{
  "listChanged": false
}
prompts
{
  "listChanged": false
}
resources
{
  "subscribe": false,
  "listChanged": false
}
experimental
{}

Tools

Functions exposed to the LLM to take actions

NameDescription
list_profilesA

[ClickHouse] List configured profiles.

Each entry includes name and optional description.

get_cluster_propertiesA

[ClickHouse] Get cluster properties and execution limits.

Returns ClickHouse server version plus enforced limits (max rows, timeouts) for the profile.

run_queryA

[ClickHouse] Execute read-only SELECT or WITH … SELECT.

One statement; DML, DDL, SET, SYSTEM, and similar are rejected. Max-rows cap; overflow sets truncated and row_limit. Same SQL validation as analyze_query.

Returns {data, row_count} where data is an RFC 4180 CSV string. Pass snapshot=true to persist the result to disk and receive a {snapshot_uri, row_count} instead; fetch the CSV via the snapshot resource URI.

run_showA

[ClickHouse] Execute SHOW introspection statement.

One statement per call; INTO OUTFILE rejected. Interactive row limits apply (default 500, hard ceiling 1 000). Same timeout as run_query.

analyze_queryA

[ClickHouse] Explain read-only SELECT or WITH … SELECT.

Returns plan, pipeline, and/or syntax text. Default types plan and pipeline. Uses query timeout and optional database; no max-rows cap unlike run_query.

list_databasesB

[ClickHouse] List databases.

Rows from system.databases visible to the connection.

list_tablesA

[ClickHouse] List tables and views in a database.

Rows from system.tables: name, engine, primary_key, sorting_key, partition_key, total_rows, total_bytes for query planning.

list_columnsA

[ClickHouse] List columns for a table or view.

Rows from system.columns for the resolved database and table.

Prompts

Interactive templates invoked by user choice

NameDescription

No prompts

Resources

Contextual data attached and managed by the client

NameDescription
profiles[ClickHouse] List configured profiles. Each entry includes name and optional description.

Latest Blog Posts

MCP directory API

We provide all the information about MCP servers via our MCP API.

curl -X GET 'https://glama.ai/api/mcp/v1/servers/alyiox/mcp-clickhousex'

If you have feedback or need assistance with the MCP directory API, please join our Discord server