Skip to content

Commit 0a7afb1

Browse files
authored
Merge pull request #4068 from ClickHouse/remote_mcp
Added the ClickHouse Cloud remote MCP guide
2 parents 0a87c87 + 1505e3e commit 0a7afb1

File tree

8 files changed

+97
-0
lines changed

8 files changed

+97
-0
lines changed
Lines changed: 97 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,97 @@
1+
---
2+
slug: /use-cases/AI/MCP/remote_mcp
3+
sidebar_label: 'ClickHouse Cloud Remote MCP'
4+
title: 'Enabling the ClickHouse Cloud Remote MCP Server'
5+
pagination_prev: null
6+
pagination_next: null
7+
description: 'This guide explains how to enable and use the ClickHouse Cloud Remote MCP'
8+
keywords: ['AI', 'ClickHouse Cloud', 'MCP']
9+
show_related_blogs: true
10+
---
11+
12+
import {CardHorizontal} from '@clickhouse/click-ui/bundled'
13+
import Link from '@docusaurus/Link';
14+
import Image from '@theme/IdealImage';
15+
import img1 from '@site/static/images/use-cases/AI_ML/MCP/1connectmcpmodal.png';
16+
import img2 from '@site/static/images/use-cases/AI_ML/MCP/2enable_mcp.png';
17+
import img3 from '@site/static/images/use-cases/AI_ML/MCP/3oauth.png';
18+
import img4 from '@site/static/images/use-cases/AI_ML/MCP/4oauth_success.png';
19+
import img5 from '@site/static/images/use-cases/AI_ML/MCP/5connected_mcp_claude.png';
20+
import img6 from '@site/static/images/use-cases/AI_ML/MCP/6slash_mcp_claude.png';
21+
import img7 from '@site/static/images/use-cases/AI_ML/MCP/7usage_mcp.png';
22+
23+
# Enabling the ClickHouse Cloud Remote MCP Server
24+
25+
> This guide explains how to enable and use the ClickHouse Cloud Remote MCP Server. We will use Claude Code as an MCP Client for this example.
26+
27+
:::note
28+
The remote server capability is currently available in private preview only.
29+
Join the waitlist by filling out the form at [clickhouse.ai](https://www.clickhouse.ai)
30+
:::
31+
32+
<VerticalStepper headerLevel="h2">
33+
34+
## Enable the remote MCP server for your ClickHouse Cloud service {#enable-remote-mcp-server}
35+
36+
1. Connect to your ClickHouse Cloud Service, click on the `Connect` button, and enable the Remote MCP Server for your Service
37+
38+
<Image img={img1} alt="Select MCP in the Connect Modal" size="md"/>
39+
40+
<Image img={img2} alt="Enable MCP Server" size="md"/>
41+
42+
2. Copy the URL of the ClickHouse Cloud MCP Server from the `Connect` view or below
43+
44+
```bash
45+
https://mcp.clickhouse.com/mcp
46+
```
47+
48+
## Add the ClickHouse MCP Server in Claude Code {#add-clickhouse-mcp-server-claude-code}
49+
50+
1. In your working directory, run the following command to add the ClickHouse Cloud MCP Server configuration to Claude Code. In this example, we named the MCP server in the Claude Code config `clickhouse_cloud`
51+
52+
```bash
53+
claude mcp add --transport http clickhouse_cloud https://mcp.clickhouse.com/mcp
54+
```
55+
56+
1b. Depending on the MCP Client used, you can also edit the JSON config directly
57+
58+
```json
59+
{
60+
"mcpServers": {
61+
"clickhouse-remote": {
62+
"url": "https://mcp.clickhouse.com/mcp"
63+
}
64+
}
65+
}
66+
```
67+
68+
2. Launch Claude Code in your working directory
69+
70+
```bash
71+
[user@host ~/Documents/repos/mcp_test] $ claude
72+
```
73+
74+
## Authenticate to ClickHouse Cloud via OAuth {#authenticate-via-oauth}
75+
76+
1. Claude Code will open a browser window on the firgst session. Otherwise, you can also trigger a connection by running the `/mcp` command in Claude Code and selecting the `clickhouse_cloud` MCP server
77+
78+
2. Authenticate using your ClickHouse Cloud credentials
79+
80+
<Image img={img3} alt="OAuth Connect flow" size="sm"/>
81+
82+
<Image img={img4} alt="OAuth Connect flow success" size="sm"/>
83+
84+
## Use the ClickHouse Cloud Remote MCP Server from Claude Code {#use-rempte-mcp-from-claude-code}
85+
86+
1. Verify in Claude Code that the remote MCP server is connected
87+
88+
<Image img={img5} alt="Claude Code MCP success" size="md"/>
89+
90+
<Image img={img6} alt="Claude Code MCP Details" size="md"/>
91+
92+
2. Congratulations! You can now use the ClickHouse Cloud Remote MCP Server from Claude Code
93+
94+
<Image img={img7} alt="Claude Code MCP Usage" size="md"/>
95+
96+
97+
</VerticalStepper>
184 KB
Loading
148 KB
Loading
94.8 KB
Loading
74.5 KB
Loading
211 KB
Loading
225 KB
Loading
132 KB
Loading

0 commit comments

Comments
 (0)