list_databasesLABSCO SUMMARY
Both halves start read-only. Turning the cloud flag off is what makes create and delete live.
The database side is safe by default: readonly filtering blocks anything that is not a SELECT, SHOW, DESCRIBE or EXPLAIN. The cloud side is read-only by default too, because the code treats an unset CLICKHOUSE_CLOUD_READONLY as on. Setting it to false makes create and delete live, and creating a service costs money. The two halves are independent, so the cautious setup is database credentials only until you actually need infrastructure control.
What it is
A ClickHouse server with two independent halves. The database half queries any instance — local, self-hosted, Cloud, or the free SQL Playground. The cloud half covers the ClickHouse Cloud API. You configure one, the other, or both; each half activates only when its credentials are present.
What you get
- Database, 3 tools:
list_databases,list_tableswith schema, row counts and column metadata, andrun_query - Query safety: with
CLICKHOUSE_READONLY=trueevery query runs with readonly = 1 and only SELECT, SHOW, DESCRIBE and EXPLAIN are permitted - Cloud monitoring:
cloud_list_organizations,cloud_list_services,cloud_get_service_metrics,cloud_get_usage_cost,cloud_list_activitiesfor audit logs, and backup and ClickPipe inspection - Cloud management, when writes are enabled:
cloud_create_service,cloud_update_service_stateto start and stop, replica scaling,cloud_delete_service, API key CRUD, member and invitation management, backup configuration and ClickPipe control - Over 50 cloud tools in total, split by whether the readonly flag admits them
Requirements
For the database half: CLICKHOUSE_HOST, CLICKHOUSE_USER and CLICKHOUSE_PASSWORD, with CLICKHOUSE_READONLY recommended true; CLICKHOUSE_PORT defaults to 8443 for HTTPS or 8123 for HTTP, and CLICKHOUSE_SECURE, CLICKHOUSE_VERIFY, CLICKHOUSE_CONNECT_TIMEOUT and CLICKHOUSE_SEND_RECEIVE_TIMEOUT cover the rest. For the cloud half: CLICKHOUSE_CLOUD_KEY_ID and CLICKHOUSE_CLOUD_KEY_SECRET from the Cloud console, with CLICKHOUSE_CLOUD_READONLY, which defaults to true, so the cloud tools only read until you set it to false. The Python package is chmcp, version 0.1.2, requiring Python 3.12+ and launched through uv.
Setup effort
One command — uv add chmcp
USE CASES
Analysing data without risking it
Query in readonly mode, where anything that is not a SELECT is refused rather than executed.
Finding your way around an unfamiliar cluster
List databases and tables with row counts and column metadata before writing a query.
Watching what Cloud is costing
Pull usage and cost for a date range, and service metrics alongside it.
Auditing who changed what
Read the organisation's activity log rather than reconstructing it from memory.
Provisioning a service deliberately
Turn the cloud readonly flag off only for that task, create the service, then turn it back on.
54 tools
Listed in project docs. Your client may show a different list.
list_tablesrun_querycloud_list_organizationscloud_get_organizationcloud_get_organization_metricscloud_list_servicescloud_get_servicecloud_get_service_metricscloud_list_api_keyscloud_get_api_keycloud_list_memberscloud_get_membercloud_list_invitationscloud_get_invitationcloud_list_backupscloud_get_backupcloud_get_backup_configurationcloud_get_private_endpoint_configcloud_list_clickpipescloud_get_clickpipecloud_get_available_regionscloud_list_activitiescloud_get_activitycloud_get_usage_costcloud_update_organizationcloud_get_organization_private_endpoint_infocloud_create_servicecloud_update_servicecloud_update_service_statecloud_update_service_scalingcloud_update_service_replica_scalingcloud_update_service_passwordcloud_create_service_private_endpointcloud_delete_servicecloud_create_api_keycloud_update_api_keycloud_delete_api_keycloud_update_member_rolecloud_remove_membercloud_create_invitationcloud_delete_invitationcloud_update_backup_configurationcloud_create_clickpipecloud_update_clickpipecloud_update_clickpipe_scalingcloud_update_clickpipe_statecloud_delete_clickpipecloud_list_reverse_private_endpointscloud_create_reverse_private_endpointcloud_get_reverse_private_endpointcloud_delete_reverse_private_endpointcloud_create_query_endpoint_configcloud_delete_query_endpoint_configBEFORE YOU INSTALL
What to know first
Tools you get
54 tools named in the project's documentation.
Requires
CLICKHOUSE_HOST, CLICKHOUSE_USER and CLICKHOUSE_PASSWORD for the database tools, or CLICKHOUSE_CLOUD_KEY_ID and CLICKHOUSE_CLOUD_KEY_SECRET for the Cloud tools — one set or both
Where it runs
The documented client runs the server on your machine.
INSTALLATION
Connect your client
Server setup
uv add chmcpMCP Clients
Claude Desktop
{
"mcpServers": {
"chmcp": {
"command": "<YOUR_PATH_TO_UV>",
"args": [
"run",
"--with",
"chmcp",
"--python",
"3.13",
"chmcp"
],
"env": {
"CLICKHOUSE_HOST": "<YOUR_INSTANCE>.clickhouse.cloud",
"CLICKHOUSE_USER": "default",
"CLICKHOUSE_PASSWORD": "<YOUR_CLICKHOUSE_PASSWORD>",
"CLICKHOUSE_SECURE": "true",
"CLICKHOUSE_READONLY": "true",
"CLICKHOUSE_CLOUD_KEY_ID": "<YOUR_CLICKHOUSE_CLOUD_KEY_ID>",
"CLICKHOUSE_CLOUD_KEY_SECRET": "<YOUR_CLICKHOUSE_CLOUD_KEY_SECRET>"
}
}
}
}