ClickHouse MCP Server
About
A Node.js server for querying ClickHouse databases.
Details
- Author
- harshithgowdakt
- Categories
- Database, Other
Jump to
Setup
Install ClickHouse MCP Server in your MCP client (Claude Desktop, Cursor, Windsurf, and others).
Repository: https://github.com/harshithgowdakt/clickhouse-mcp-server
Follow the installation instructions in the repository README, then restart your MCP client.
A Model Context Protocol (MCP) server implementation that enables Claude AI to interact with ClickHouse databases through a secure and efficient interface.
- Node.js(version 18 or higher)
- ClickHousedatabase running locally or remotely
- Claude Desktopapplication installed
- Execute SELECT queries on your ClickHouse cluster
- Input:sql(string): The SQL query to execute
- Note: Only SELECT queries are allowed for security reasons
- List all tables in the ClickHouse database
- No input parameters required
- Describe the schema of a specific table
- Input:table(string): The name of the table to describe
npm install @modelcontextprotocol/sdk @clickhouse/client typescript @types/node
Copy the main server code intoindex.jsand make it executable:
-
Open the Claude Desktop application, go to settings, then Developer and then click on "Edit Configuration File"
OR Open the Claude Desktop configuration file located at:
- On macOS:~/Library/Application Support/Claude/claude_desktop_config.json
- On Windows:%APPDATA%/Claude/claude_desktop_config.json
{ "mcpServers": { "clickhouse": { "command": "node", "args": ["/path/to/your/clickhouse-mcp-server/dist/index.js"], "env": { "CLICKHOUSE_HOST": "<clickhouse-host>", "CLICKHOUSE_PORT": "<clickhouse-port>", "CLICKHOUSE_USER": "<clickhouse-user>", "CLICKHOUSE_PASSWORD": "<clickhouse-password>", "CLICKHOUSE_SECURE": "true", "CLICKHOUSE_VERIFY": "true", "CLICKHOUSE_CONNECT_TIMEOUT": "30", "CLICKHOUSE_SEND_RECEIVE_TIMEOUT": "30" } } } }
Update the environment variables to point to your own ClickHouse service.
Or, if you'd like to try it out with theClickHouse SQL Playground, you can use the following config:
{ "mcpServers": { "clickhouse": { "command": "node", "args": ["/path/to/your/clickhouse-mcp-server/dist/index.js"], "env": { "CLICKHOUSE_HOST": "sql-clickhouse.clickhouse.com", "CLICKHOUSE_PORT": "8443", "CLICKHOUSE_USER": "demo", "CLICKHOUSE_PASSWORD": "", "CLICKHOUSE_SECURE": "true", "CLICKHOUSE_VERIFY": "true", "CLICKHOUSE_CONNECT_TIMEOUT": "30", "CLICKHOUSE_SEND_RECEIVE_TIMEOUT": "30" } } } }
Important: Update the path in the config to point to your actualdist/index.jsfile location. Copy the full path using as shown in the image below.
Before configuring Claude Desktop, test the server locally:
The server should start and display "ClickHouse MCP server running on stdio".
After updating the configuration, restart Claude Desktop for the changes to take effect.
- "Show me all tables in the ClickHouse database"
- "Query the user_events table for today's data"
- "Describe the schema of the orders table"
- The server only allows SELECT queries for the query tool
- Consider setting up proper authentication for your ClickHouse instance
- Use environment variables for sensitive credentials
- Restrict network access to your ClickHouse server as needed
- Connection Issues: Check your ClickHouse server is running and accessible
- Permission Errors: Ensure the Node.js script has proper file permissions
- Config Issues: Verify the path in Claude Desktop config points to the correct file
- Dependencies: Make sure all npm packages are properly installed
This project is licensed under the MIT License - see the LICENSE file for details.
- "Show me all tables in the ClickHouse database"
- "Query the user_events table for today's data"
- The server only allows SELECT queries for the query tool
- Consider setting up proper authentication for your ClickHouse instance
- Use environment variables for sensitive credentials
- Restrict network access to your ClickHouse server as needed
- Connection Issues: Check your ClickHouse server is running and accessible
- Permission Errors: Ensure the Node.js script has proper file permissions
- Config Issues: Verify the path in Claude Desktop config points to the correct file
- Dependencies: Make sure all npm packages are properly installed
Official MCP server for dbt (data build tool) providing integration with dbt Core/Cloud CLI, project metadata discovery, model information, and semantic layer querying capabilities.
Query and analyze data with MotherDuck and local DuckDB
An MCP server for querying and interacting with AWS Athena.
Access Google BigQuery to understand dataset structures and execute SQL queries.
A secure, self-hosted Model Context Protocol (MCP) server for Google BigQuery. Hard table allowlists, per-query scan ceilings, built-in rate limiting, and predictable costs on Cloud Run. Works with Claude, ChatGPT, Cursor, Gemini, and any MCP-compatible AI agent.
A read-only MCP server for SAP BusinessObjects BI, powered by the CData JDBC Driver.
An MCP server for interacting with a ClickHouse database.
MCP Server accessing and administrate the Apache Druid Database
Sign in to leave a review
Use Google, GitHub, or an email account so ratings stay tied to real people.
No reviews posted yet.





