You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
- Input: `sql` (string): The SQL query to execute.
15
-
- All ClickHouse queries are run with `readonly = 1` to ensure they are safe.
14
+
* Execute SQL queries on your ClickHouse cluster.
15
+
* Input: `sql` (string): The SQL query to execute.
16
+
* All ClickHouse queries are run with `readonly = 1` to ensure they are safe.
16
17
17
18
*`list_databases`
18
-
- List all databases on your ClickHouse cluster.
19
+
* List all databases on your ClickHouse cluster.
19
20
20
21
*`list_tables`
21
-
- List all tables in a database.
22
-
- Input: `database` (string): The name of the database.
22
+
* List all tables in a database.
23
+
* Input: `database` (string): The name of the database.
23
24
24
25
## Configuration
25
26
26
27
1. Open the Claude Desktop configuration file located at:
27
-
- On macOS: `~/Library/Application Support/Claude/claude_desktop_config.json`
28
-
- On Windows: `%APPDATA%/Claude/claude_desktop_config.json`
28
+
* On macOS: `~/Library/Application Support/Claude/claude_desktop_config.json`
29
+
* On Windows: `%APPDATA%/Claude/claude_desktop_config.json`
29
30
30
31
2. Add the following:
31
32
@@ -89,7 +90,6 @@ Or, if you'd like to try it out with the [ClickHouse SQL Playground](https://sql
89
90
}
90
91
```
91
92
92
-
93
93
3. Locate the command entry for `uv` and replace it with the absolute path to the `uv` executable. This ensures that the correct version of `uv` is used when starting the server. On a mac, you can find this path using `which uv`.
94
94
95
95
4. Restart Claude Desktop to apply the changes.
@@ -102,7 +102,7 @@ Or, if you'd like to try it out with the [ClickHouse SQL Playground](https://sql
102
102
103
103
*Note: The use of the `default` user in this context is intended solely for local development purposes.*
The following environment variables are used to configure the ClickHouse connection:
119
119
120
120
#### Required Variables
121
+
121
122
*`CLICKHOUSE_HOST`: The hostname of your ClickHouse server
122
123
*`CLICKHOUSE_USER`: The username for authentication
123
124
*`CLICKHOUSE_PASSWORD`: The password for authentication
124
125
125
-
> [!CAUTION]
126
+
> [!CAUTION]
126
127
> It is important to treat your MCP database user as you would any external client connecting to your database, granting only the minimum necessary privileges required for its operation. The use of default or administrative users should be strictly avoided at all times.
127
128
128
129
#### Optional Variables
130
+
129
131
*`CLICKHOUSE_PORT`: The port number of your ClickHouse server
130
-
- Default: `8443` if HTTPS is enabled, `8123` if disabled
131
-
- Usually doesn't need to be set unless using a non-standard port
132
+
* Default: `8443` if HTTPS is enabled, `8123` if disabled
133
+
* Usually doesn't need to be set unless using a non-standard port
column_data_query=f"SELECT database, table, name, type AS column_type, default_kind, default_expression, comment FROM system.columns WHERE database = {format_query_value(database)} AND table = {format_query_value(table.name)}"
0 commit comments