-
Set Required Environment Variables
Define these variables as needed for your ClickHouse connection. Replace the password token with your own secret.CLICKHOUSE_HOST
: sql-clickhouse.clickhouse.comCLICKHOUSE_PORT
: 8443CLICKHOUSE_USER
: demoCLICKHOUSE_SECURE
: trueCLICKHOUSE_VERIFY
: trueCLICKHOUSE_CONNECT_TIMEOUT
: 30CLICKHOUSE_SEND_RECEIVE_TIMEOUT
: 30CLICKHOUSE_PASSWORD
:<YOUR_CLICKHOUSE_PASSWORD_HERE>
-
Install Meshagent
-
Sign Up & Authenticate
Register and log in as shown in Meshagent CLI Getting Started. -
Start an MCP Server Agent in a Test Room
Replace password and any other secrets accordingly:- This starts a Meshagent Room with a test MCP server available. The agent and room are cleaned up automatically when inactive.
-
Attach a Chatbot with ClickHouse Tools
- This launches a chatbot in the room, ready to use the ClickHouse toolkit. You can load multiple toolkits per room/agent if needed.
- A link to the new Room will appear in the output.
-
Try It Out
Open the provided room link in your browser and chat with the agent to run database queries and commands using the MCP Server tools.
Project Level Deployment
For production or persistent environments where you want MCP server tools and a chatbot automatically in every new MeshAgent room, deploy these as project-level services:-
Create Persistent MCP Server Service
-
Create Persistent Chatbot Service
Tools Available
Tools provided by the ClickHouse MCP Server for use in Meshagent Rooms:Tool | Short Description |
---|---|
list_databases | List available ClickHouse databases |
list_tables | List available ClickHouse tables in a database, including schema, comment, row count, column count. |
run_select_query | Run a SELECT query in a ClickHouse database |
Tool Details
Tool: list_databases
- Description: List available ClickHouse databases.
Tool: list_tables
- Description: List available ClickHouse tables in a database, including schema, comment, row count, and column count.
- Parameters:
database
(string)like
(string, optional)not_like
(string, optional)
Tool: run_select_query
- Description: Run a SELECT query in a ClickHouse database.
- Parameters:
query
(string)