Column-oriented OLAP database
## ClickHouse MCP Server: Real-Time Analytics Database The **ClickHouse MCP Server** integrates ClickHouse's columnar analytics database into Google Antigravity. This enables lightning-fast analytical queries over billions of rows with real-time data ingestion. ### Why ClickHouse MCP? ClickHouse leads in OLAP performance: - **Blazing Fast**: Sub-second queries on billions of rows - **Columnar Storage**: Optimized for analytics - **Real-Time**: Ingest and query simultaneously - **Compression**: 10-50x data compression - **SQL Compatible**: Standard SQL interface ### Key Features #### 1. Query Data ```python from clickhouse_connect import get_client client = get_client(host="localhost", username="default") # Fast analytical query result = client.query(""" SELECT toDate(timestamp) as date, count() as events, uniq(user_id) as users FROM events WHERE timestamp > now() - INTERVAL 7 DAY GROUP BY date ORDER BY date """) for row in result.result_rows: print(f"Date: {row[0]}, Events: {row[1]}, Users: {row[2]}") ``` #### 2. Insert Data ```python # Batch insert client.insert("events", [ ["user-1", "page_view", "/home", datetime.now()], ["user-2", "click", "/pricing", datetime.now()] ], column_names=["user_id", "event_type", "page", "timestamp"]) ``` #### 3. Materialized Views ```python # Create real-time aggregation client.command(""" CREATE MATERIALIZED VIEW hourly_stats ENGINE = SummingMergeTree() ORDER BY (hour, page) AS SELECT toStartOfHour(timestamp) as hour, page, count() as views, uniq(user_id) as users FROM events GROUP BY hour, page """) ``` ### Configuration ```json { "mcpServers": { "clickhouse": { "command": "npx", "args": ["-y", "@anthropic/mcp-clickhouse"], "env": { "CLICKHOUSE_HOST": "localhost", "CLICKHOUSE_USER": "default", "CLICKHOUSE_PASSWORD": "password" } } } } ``` ### Use Cases **Real-Time Analytics**: Live dashboards and metrics. **Log Analytics**: Analyze billions of log entries. **Time Series**: High-frequency IoT and monitoring data. The ClickHouse MCP Server brings real-time analytics to Antigravity.
{
"mcpServers": {
"clickhouse": {
"mcpServers": {
"clickhouse": {
"env": {
"CLICKHOUSE_HOST": "localhost",
"CLICKHOUSE_USER": "default",
"CLICKHOUSE_PASSWORD": "password"
},
"args": [
"-y",
"@clickhouse/mcp-server"
],
"command": "npx"
}
}
}
}
}