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
Copy file name to clipboardExpand all lines: tidb-cloud-lake/guides/mcp-client-integration.md
+88-45Lines changed: 88 additions & 45 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -5,53 +5,57 @@ summary: "{{{ .lake }}} MCP connects AI assistants to {{{ .lake }}} via Model Co
5
5
6
6
# MCP Client Integration
7
7
8
-
[{{{ .lake }}} MCP](https://github.com/databendlabs/mcp-databend) connects AI assistants to {{{ .lake }}} via Model Context Protocol. Works with Claude Code, Codex, Cursor, Claude Desktop, VS Code, and other MCP-compatible clients.
8
+
[{{{ .lake }}} MCP](https://github.com/databendlabs/mcp-databend) connects AI assistants to {{{ .lake }}} through the Model Context Protocol. It works with Codex, Kimi Code, Cursor, Claude Code, Claude Desktop, Gemini CLI, VS Code, and other MCP-compatible clients.
9
9
10
10
**What you can do:**
11
11
12
-
- Generate complex SQL queries based on your requirements
13
-
- Create and manage scheduled data pipeline tasks
14
-
- Explore database schemas and validate query syntax
15
-
- Build ETL workflows with COPY, MERGE, and Stage operations
12
+
- Generate complex SQL queries from natural language requirements.
13
+
- Explore databases, tables, schemas, stages, and connections.
14
+
- Validate query syntax before running it.
15
+
- Build ETL workflows with COPY, MERGE, and Stage operations.
16
+
- Create and manage scheduled data pipeline tasks.
16
17
17
-
For example: _"Create a scheduled task that copies parquet files from @my_stage to the orders table every minute, and verify it's running correctly."_
18
+
For example: "Create a scheduled task that copies parquet files from @my_stage to the orders table every minute, and verify that it is running correctly."
18
19
19
20
## Installation
20
21
21
-
### 1. Get {{{ .lake }}} Connection
22
+
### 1. Get a {{{ .lake }}} Connection
22
23
23
24
We recommend using **{{{ .lake }}}** for the best experience.
24
25
25
26
1. Log in to [{{{ .lake }}}](https://app.lake.tidbcloud.com).
26
-
2. Click **Use with AI Tools** in the navigation bar.
27
-
3. Select regular connection information (Host, User, Password, etc.).
28
-
4. Copy your DSN, which looks like `lake://user:pwd@host:443/database?warehouse=warehouse_name`.
27
+
2. Click **Use with AI Tools**.
28
+
3. Choose the database and warehouse for the MCP server.
29
+
4. Keep **Session Sandbox Safety** enabled unless you explicitly need the agent to write to production objects.
30
+
5. Copy the DSN, which looks like `lake://user:password@host:443/database?warehouse=warehouse_name`.
29
31
30
32

31
33
32
34
### 2. Configure Your MCP Client
33
35
36
+
Use `DATABEND_MCP_SAFE_MODE=true` by default. In safe mode, production data remains read-only for AI agents, while write operations are scoped to session sandbox objects.
uv tool run --from mcp-databend@latest mcp-databend
161
193
```
162
194
163
195
</div>
164
196
</SimpleTab>
165
197
198
+
## Session Sandbox Safety
199
+
200
+
`DATABEND_MCP_SAFE_MODE` controls whether the MCP server runs with session sandbox protection.
201
+
202
+
| Value | Behavior | Recommended usage |
203
+
| ----- | -------- | ----------------- |
204
+
|`true`| Production objects are read-only for the agent. Write operations are allowed only on session sandbox objects such as `mcp_sandbox_{session_id}_*`. | Default and recommended for AI tools. |
205
+
|`false`| The MCP server can write to objects allowed by the {{{ .lake}}} user permissions. | Use only with trusted agents and least-privilege {{{ .lake}}} users. |
206
+
207
+
Keep safe mode enabled for most workflows. Disable it only when the agent must modify real production objects and the {{{ .lake}}} user already has the minimum required permissions.
0 commit comments