Skip to main content
Glama
sepfazeli

clickhouse-mcp-server

by sepfazeli

Server Configuration

Describes the environment variables required to run the server.

NameRequiredDescriptionDefault
LOG_LEVELNoLog level (debug, info, warn, error)info
MCP_API_KEYNoAPI key for auth scoping
CACHE_TTL_MSNoQuery cache TTL in milliseconds60000
CLICKHOUSE_URLYesClickHouse server URLhttp://localhost:8123
CLICKHOUSE_USERYesClickHouse usernamedefault
MCP_AUTH_SCOPESNoJSON object defining per-key permission scopes
CLICKHOUSE_DATABASEYesClickHouse database namedefault
CLICKHOUSE_PASSWORDYesClickHouse password

Capabilities

Features and capabilities supported by this server

CapabilityDetails
tools
{
  "listChanged": true
}

Tools

Functions exposed to the LLM to take actions

NameDescription
list_tablesA

List all tables in the connected ClickHouse database with their engine type and row count.

run_queryA

Execute a read-only SQL query against ClickHouse. Only SELECT, WITH (CTE), SHOW, DESCRIBE, EXISTS, and EXPLAIN statements are allowed. Results are cached for 60s. A maximum row limit of 1000 is enforced (or lower if scoped).

describe_tableA

Get the schema of a specific ClickHouse table: column names, types, default expressions, and a sample of up to 3 rows.

aggregateA

Build and run a time-windowed aggregation query without writing raw SQL. Specify a table, metric column, aggregation function, and optional time column with interval for grouping.

cache_statsA

Show query cache statistics: entry count, max entries, and TTL.

clear_cacheA

Clear all cached query results.

Prompts

Interactive templates invoked by user choice

NameDescription

No prompts

Resources

Contextual data attached and managed by the client

NameDescription

No resources

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/sepfazeli/clickhouse-mcp-server'

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