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.
15
+
- All Timeplus queries are run with `readonly = 1` to ensure they are safe.
16
16
17
17
*`list_databases`
18
-
- List all databases on your ClickHouse cluster.
18
+
- List all databases on your Timeplus cluster.
19
19
20
20
*`list_tables`
21
21
- List all tables in a database.
22
22
- Input: `database` (string): The name of the database.
23
23
24
24
## Configuration
25
25
26
+
First, ensure you have the `uv` executable installed. If not, you can install it by following the instructions [here](https://docs.astral.sh/uv/).
27
+
28
+
This Python package is not published to PyPI yet. Please clone this repo and run `uv sync` to install the dependencies.
29
+
26
30
1. Open the Claude Desktop configuration file located at:
27
31
- On macOS: `~/Library/Application Support/Claude/claude_desktop_config.json`
28
32
- On Windows: `%APPDATA%/Claude/claude_desktop_config.json`
@@ -32,73 +36,70 @@ An MCP server for ClickHouse.
32
36
```json
33
37
{
34
38
"mcpServers": {
35
-
"mcp-clickhouse": {
36
-
"command": "uv",
39
+
"mcp-timeplus": {
40
+
"command": "/path/to/uv",
37
41
"args": [
38
42
"run",
39
-
"--with",
40
-
"mcp-clickhouse",
43
+
"--project",
44
+
"/path/to/repo/mcp-timeplus",
41
45
"--python",
42
46
"3.13",
43
-
"mcp-clickhouse"
47
+
"mcp-timeplus"
44
48
],
45
49
"env": {
46
-
"CLICKHOUSE_HOST": "<clickhouse-host>",
47
-
"CLICKHOUSE_PORT": "<clickhouse-port>",
48
-
"CLICKHOUSE_USER": "<clickhouse-user>",
49
-
"CLICKHOUSE_PASSWORD": "<clickhouse-password>"
50
+
"TIMEPLUS_HOST": "<timeplus-host>",
51
+
"TIMEPLUS_PORT": "<timeplus-port>",
52
+
"TIMEPLUS_USER": "<timeplus-user>",
53
+
"TIMEPLUS_PASSWORD": "<timeplus-password>"
50
54
}
51
55
}
52
56
}
53
57
}
54
58
```
55
59
56
-
Update the environment variables to point to your own ClickHouse service.
60
+
Update the environment variables to point to your own Timeplus service.
57
61
58
-
Or, if you'd like to try it out with the [ClickHouse SQL Playground](https://sql.clickhouse.com/), you can use the following config:
62
+
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. Also point to the absolute path to the `mcp-timeplus` directory. A sample configuration:
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.
86
-
87
88
4. Restart Claude Desktop to apply the changes.
88
89
89
90
## Development
90
91
91
-
1. In `test-services` directory run `docker compose up -d` to start the ClickHouse cluster.
92
+
1. In `test-services` directory run `docker compose up -d` to start a Timeplus Proton server. You can also download it via `curl https://install.timeplus.com/oss | sh`, then start with `./proton server`.
92
93
93
94
2. Add the following variables to a `.env` file in the root of the repository.
94
95
95
96
```
96
-
CLICKHOUSE_HOST=localhost
97
-
CLICKHOUSE_PORT=8123
98
-
CLICKHOUSE_USER=default
99
-
CLICKHOUSE_PASSWORD=clickhouse
97
+
TIMEPLUS_HOST=localhost
98
+
TIMEPLUS_PORT=8123
99
+
TIMEPLUS_USER=default
100
+
TIMEPLUS_PASSWORD=
100
101
```
101
102
102
-
3. Run `uv sync` to install the dependencies. To install `uv` follow the instructions [here](https://docs.astral.sh/uv/). Then do `source .venv/bin/activate`.
103
+
3. Run `uv sync` to install the dependencies. Then do `source .venv/bin/activate`.
103
104
104
-
4. For easy testing, you can run `fastmcp dev mcp_clickhouse/mcp_server.py` to start the MCP server.
105
+
4. For easy testing, you can run `fastmcp dev mcp_timeplus/mcp_server.py` to start the MCP server. Click the "Connect" button to connect the UI with the MCP server, then switch to the "Tools" tab to run the available tools: list_databases, list_tables, run_selected_query.
0 commit comments