
ClickHouse
Connects Claude to ClickHouse for read-only database exploration and analytics. Exposes tools to run SELECT queries with parameterized inputs, inspect metadata across databases and tables, and analyze query plans. Enforces strict no-write policies and rejects DML or DDL statements. Supports multiple connection profiles via environment variables or config file, plus snapshot mode for large result sets that exceed the interactive 1,000 row ceiling. Query results return as CSV with configurable timeouts and row limits. Useful when you need Claude to explore table structures, validate query logic, or pull analytical data from ClickHouse without risking schema changes.
- GitHub stars
- 1
- tools
- 13
- auth
- Secret needed
- transport
- STDIO
- env var
- 1
- last updated
- Sep 20, 2026
Tools
13 toolsPublic tool metadata for what this MCP can expose to an agent.
get_clickpipeReturns the specified ClickPipe.3 params
Returns the specified ClickPipe.
clickPipeIdstringorganizationIdstringserviceIdstringget_organizationsRetrieves all accessible ClickHouse Cloud organizations.
Retrieves all accessible ClickHouse Cloud organizations.
No parameter schema in public metadata yet.
run_select_queryExecutes a SELECT query against a ClickHouse service. Runs a read-only SELECT query on the specified ClickHouse service via the Query API endpoint. This function provides direct access to database content through SQL queries while ensuring that only read operations are permitted.3 params
Executes a SELECT query against a ClickHouse service. Runs a read-only SELECT query on the specified ClickHouse service via the Query API endpoint. This function provides direct access to database content through SQL queries while ensuring that only read operations are permitted.
querystringserviceIdstringtimeoutSecondsintegerlist_databasesRetrieves all databases available in a ClickHouse service.1 params
Retrieves all databases available in a ClickHouse service.
serviceIdstringlist_tablesRetrieves a comprehensive list of tables in a ClickHouse database, including columns.4 params
Retrieves a comprehensive list of tables in a ClickHouse database, including columns.
databasestringlikestringnotLikestringserviceIdstringget_services_listRetrieves all services in a ClickHouse Cloud organization.1 params
Retrieves all services in a ClickHouse Cloud organization.
organizationIdstringget_organization_detailsReturns details of a single organization. The auth key must belong to the organization.1 params
Returns details of a single organization. The auth key must belong to the organization.
organizationIdstringget_service_detailsReturns a service that belongs to the organization.2 params
Returns a service that belongs to the organization.
organizationIdstringserviceIdstringlist_clickpipesRetrieves all ClickPipes configured for a specific service.2 params
Retrieves all ClickPipes configured for a specific service.
organizationIdstringserviceIdstringlist_service_backupsReturns a list of all backups for the service. The most recent backups comes first in the list.2 params
Returns a list of all backups for the service. The most recent backups comes first in the list.
organizationIdstringserviceIdstringget_organization_costRetrieves billing and usage cost data for a ClickHouse Cloud organization. Returns a grand total and a list of daily, per-entity organization usage cost records for the organization in the queried time period (maximum 31 days).3 params
Retrieves billing and usage cost data for a ClickHouse Cloud organization. Returns a grand total and a list of daily, per-entity organization usage cost records for the organization in the queried time period (maximum 31 days).
from_datestringorganizationIdstringto_datestringget_service_backup_detailsReturns a single backup info.3 params
Returns a single backup info.
backupIdstringorganizationIdstringserviceIdstringget_service_backup_configurationReturns the service backup configuration.2 params
Returns the service backup configuration.
organizationIdstringserviceIdstringSponsors
Configuration
MCP_CLICKHOUSE_DSNsecretOptional shortcut DSN for the default profile, for example http://user:password@host:8123/database. For multiple profiles, use ~/.config/mcp-clickhousex/config.json or MCP_CLICKHOUSE_PROFILES_<NAME>_DSN.
Readme
MCP ClickHouse Tool
A read-only-by-default Model Context Protocol (MCP) server for ClickHouse that provides schema discovery, read-only queries, execution-plan analysis, opt-in writes, and profile-based access to multiple servers from a single toolset deployment.
Read-only is enforced by the engine, not by SQL text matching: the query tools' clients carry ClickHouse's readonly=1, so writes, external table functions and query-level SETTINGS are refused by the server being queried. Writes live behind a separate tool that is not registered at all until a profile asks for it.
Details
- Repository
- github.com/alyiox/mcp-clickhousex
- Category
- Databases
- Package
mcp-clickhousex- Transport
- STDIO
- Auth
- Required
- Registry
- MCP registry, active