ClickHouse
Connect to ClickHouse database to execute high-performance analytical queries.
Key Features
- Execute high-performance analytical queries
- Columnar database optimization
- Large-scale data processing
- Real-time data analysis
- Aggregate and window function support
- Read-only mode support
Basic Information
Authentication Method
Authenticate using username/password.
Input Parameters
- Host (required): ClickHouse server host
- Port (required): ClickHouse server port (default: 8123)
- Username (required): ClickHouse username
- Password (required): ClickHouse password
- Database (optional): Database name to connect to (default: default)
- Connection Timeout (optional): Connection timeout (default: 30000ms, max: 60000ms)
- Use SSL (optional): Whether to use SSL connection
- Read Only (optional): Whether to enable read-only mode
Supported MCP Tools
execute_sql
Execute SQL queries on ClickHouse database and return results.
In read-only mode, only the following SQL commands are allowed:
SELECT
- Query dataWITH
- Use Common Table Expression (CTE)EXPLAIN
- Query execution planANALYZE
- Query analysisSHOW
- Metadata queries
Result Limit: Returns a maximum of 500 rows for performance reasons.
For example,
- When you input “Query the user table data” as a prompt,
- The LLM executes the
SELECT * FROM users
query through MCP. - Then, it responds in the chat based on the tool call results.
ClickHouse Connection Setup
- Prepare a user account that can access ClickHouse server.
- Grant necessary database permissions.
- Configure network access permissions.
- Select ClickHouse integration in QueryPie AI.
- Enter connection information to complete the setup.
Precautions
- Keep your ClickHouse user account password secure.
- It’s recommended to grant only the minimum necessary database permissions.
- It’s recommended to use SSL connections in production environments.
- Large query results are limited to 500 rows, so use appropriate LIMIT clauses.
- You can prevent data changes by enabling read-only mode.
Last updated on