Execute SQL queries, explore schemas, and analyze data in your ClickHouse database — AI-native analytics database access.
Use with AI AssistantsMCP
Connect Claude, Cursor, or any MCP-compatible client — then call tools directly
① Add This MCP Server
Paste into your AI client config — then all its tools are available instantly.
{
"mcpServers": {
"clickhouse": {
"url": "https://mcp.aerostack.dev/s/aerostack/mcp-clickhouse",
"headers": {
"Authorization": "Bearer YOUR_AEROSTACK_TOKEN"
}
}
}
}Replace YOUR_AEROSTACK_TOKEN with your API token from the dashboard.
② Call a Tool
Ask your AI assistant to call a specific tool, or send raw JSON-RPC:
Natural Language Prompt
“Use the _ping tool to verify clickhouse connectivity by running select 1. used internally by aerostack to validate credentials”
Using a Workspace?
Add this MCP to your Workspace — your team shares one token, secrets are stored securely, and every AI agent in the workspace can call it without per-user setup.
Execute SQL queries, explore schemas, and analyze data in your ClickHouse database from your AI agents.
ClickHouse is the fastest open-source columnar database for real-time analytics — used by teams processing billions of rows for dashboards, observability, and data pipelines. This MCP server gives your AI agents direct access to your ClickHouse instance: running arbitrary SQL, exploring database schemas, inserting data, and monitoring system health — all through natural language.
Live endpoint: https://mcp.aerostack.dev/s/aerostack/mcp-clickhouse
| Tool | Description |
|---|---|
query | Execute any SQL query (SELECT, SHOW, DESCRIBE, etc.) |
list_databases | List all databases in the ClickHouse instance |
list_tables | List all tables in a specific database |
describe_table | Show columns, types, and defaults for a table |
insert | Insert rows into a table using VALUES syntax |
count | Count rows in a table with optional WHERE filter |
show_create | Show the CREATE TABLE statement for a table |
system_metrics | Retrieve current ClickHouse system metrics |
table_sizes | Show table sizes (rows, compressed/uncompressed) from system.parts |
| Variable | Required | Description | How to Get |
|---|---|---|---|
CLICKHOUSE_URL | Yes | Your ClickHouse HTTP endpoint | Self-hosted: http://localhost:8123. ClickHouse Cloud: https://xxx.clickhouse.cloud:8443 from your cloud console |
CLICKHOUSE_USER | Yes | ClickHouse username | Default is default for self-hosted. ClickHouse Cloud: check your cloud console credentials |
CLICKHOUSE_PASSWORD | Yes | ClickHouse password | Set during installation or from your ClickHouse Cloud console |
CLICKHOUSE_URL, CLICKHOUSE_USER, and CLICKHOUSE_PASSWORD under Project → SecretsOnce added, every AI agent in your workspace can call ClickHouse tools automatically — no per-user setup needed.
"List all databases and tables in my ClickHouse instance"
"Show me the top 10 largest tables by compressed size"
"Run SELECT count() FROM analytics.events WHERE event_date = today()"
"Describe the schema of the default.users table"
"Show me current ClickHouse system metrics"
curl -X POST https://mcp.aerostack.dev/s/aerostack/mcp-clickhouse \
-H 'Content-Type: application/json' \
-H 'X-Mcp-Secret-CLICKHOUSE-URL: https://xxx.clickhouse.cloud:8443' \
-H 'X-Mcp-Secret-CLICKHOUSE-USER: default' \
-H 'X-Mcp-Secret-CLICKHOUSE-PASSWORD: your-password' \
-d '{"jsonrpc":"2.0","id":1,"method":"tools/call","params":{"name":"list_databases","arguments":{}}}'
MIT
Live Endpoint
https://mcp.aerostack.dev/s/aerostack/mcp-clickhouse
Sub-50ms globally · Zero cold start
@aerostack
Pre-built functions for the most common MCP tool patterns. Clone, extend, and deploy.
by @aerostack
Discover and invoke any MCP, Function, or Skill published to the Aerostack marketplace — the universal AI capability hub.
by @aerostack
Search indexes, manage records, browse data, and configure ranking in Algolia — AI-native instant search access.
by @aerostack
Query documents, run AQL, traverse graphs, and manage collections in your ArangoDB database — AI-native multi-model database access.
by @aerostack
Post, schedule, and analyze social media across 13 platforms — Facebook, Instagram, X, LinkedIn, TikTok, Bluesky, Threads, Reddit, Pinterest, YouTube, Telegram, Snapchat, Google Business.
by @aerostack
Manage projects, to-dos, messages, schedules, and campfire chats in Basecamp — AI-native project management.
by @aerostack
Run SQL queries, list datasets and tables, inspect schemas, and export results from Google BigQuery — AI-native data warehouse access.
Yes. The query tool sends raw SQL to your ClickHouse cluster and returns results as rows. Complex analytical queries with JOINs, CTEs, and window functions are fully supported.
list_databases and list_tables map the structure, then describe_table returns column names, types, and compression codecs. Claude builds queries against the actual schema, not assumptions.
table_sizes returns per-table compressed and uncompressed sizes. Claude can rank tables by size and recommend which to optimize with TTL policies or recompression.
insert is available and writes rows to any table. Use it for small backfills or test data. For high-throughput ingestion, prefer native ClickHouse clients; Claude handles ad-hoc inserts safely.