clickhouse-mcp-server
Server Configuration
Describes the environment variables required to run the server.
| Name | Required | Description | Default |
|---|---|---|---|
| LOG_LEVEL | No | Log level (debug, info, warn, error) | info |
| MCP_API_KEY | No | API key for auth scoping | |
| CACHE_TTL_MS | No | Query cache TTL in milliseconds | 60000 |
| CLICKHOUSE_URL | Yes | ClickHouse server URL | http://localhost:8123 |
| CLICKHOUSE_USER | Yes | ClickHouse username | default |
| MCP_AUTH_SCOPES | No | JSON object defining per-key permission scopes | |
| CLICKHOUSE_DATABASE | Yes | ClickHouse database name | default |
| CLICKHOUSE_PASSWORD | Yes | ClickHouse password |
Instructions
Guidance the server publishes about itself, which clients place ahead of the tool catalog so the model reads it before choosing anything.
This server publishes no instructions, or was last inspected before Glama recorded them.
Capabilities
Features and capabilities supported by this server
Protocol revision2025-11-25
| Capability | Details |
|---|---|
| tools | {
"listChanged": true
} |
Tools
Functions exposed to the LLM to take actions
| Name | Description |
|---|---|
| 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
| Name | Description |
|---|---|
No prompts | |
Resources
Contextual data attached and managed by the client
| Name | Description |
|---|---|
No resources | |
Latest Blog Posts
- Who's Calling? MCP Hosts Are an Identity Blind Spot (And the Spec Knows It)By Om-Shree-0709 on .mcpAgent IdentityOAuth 2.1
- Your AI Chatbot Just Exposed Your CEO's Salary to an InternBy Om-Shree-0709 on .Agent IdentityMCP SecurityOAuth Delegation
- Why MCP Servers Need Execution Sandboxing (And Why Your Current Stack Isn't Enough)By Om-Shree-0709 on .Agentic AiPrompt InjectionWebAssembly
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