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
|`wren-connection-info`|Connection field reference per data source|
37
37
|`generate-mdl`| Generate MDL from a live database |
38
38
|`wren-project`| Save and build MDL as YAML files |
39
39
|`wren-mcp-setup`| Start the Docker container and register MCP |
@@ -156,23 +156,43 @@ docker logs wren-mcp
156
156
157
157
> **Database on localhost?** If your database runs on your host machine, replace `localhost` / `127.0.0.1` with `host.docker.internal` in your connection settings — the container cannot reach the host's `localhost` directly.
158
158
159
-
### Phase 3 — Generate the MDL
159
+
### Phase 3 — Configure connection and register MCP server
160
160
161
-
In Claude Code, run:
161
+
Configure connection info in the Web UI at `http://localhost:9001` — select the data source type and enter credentials. Use `/wren-connection-info` in Claude Code for field reference per data source.
162
+
163
+
> **Connection info can only be configured through the Web UI.** Do not attempt to set it programmatically.
164
+
165
+
Then register the MCP server with Claude Code:
166
+
167
+
```bash
168
+
claude mcp add --transport http wren http://localhost:9000/mcp
169
+
```
170
+
171
+
Verify it was added:
172
+
173
+
```bash
174
+
claude mcp list
175
+
```
176
+
177
+
**Start a new Claude Code session** — MCP servers are only loaded at session start.
178
+
179
+
### Phase 4 — Generate the MDL
180
+
181
+
In the new session, run:
162
182
163
183
```
164
184
/generate-mdl
165
185
```
166
186
167
187
The skill will:
168
188
169
-
1. Run `health_check()` to verify the connection is configured
189
+
1. Run `health_check()` to verify the connection is working
170
190
2. Ask for your data source type (PostgreSQL, BigQuery, Snowflake, etc.) and optional schema filter
171
-
3. Call `list_remote_tables()` and `list_remote_constraints()` via the MCP server to introspect your database schema
191
+
3. Call `list_remote_tables()` and `list_remote_constraints()` via MCP tools to introspect your database schema
172
192
4. Build the MDL JSON (models, columns, relationships)
173
193
5. Validate the manifest with `deploy_manifest()` + `dry_run()`
174
194
175
-
> **Connection info** must be configured in the Web UI (`http://localhost:9001`) before running `/generate-mdl`. Use `/wren-connection-info` in Claude Code for field reference per data source.
195
+
> **Prerequisite:**The MCP server must be registered and a new session started (Phase 3). The `/generate-mdl` skill uses MCP tools — do not call ibis-server API directly.
176
196
177
197
Then save the MDL as a versioned YAML project:
178
198
@@ -182,22 +202,6 @@ Then save the MDL as a versioned YAML project:
182
202
183
203
This writes human-readable YAML files to your workspace and compiles `target/mdl.json`.
184
204
185
-
### Phase 4 — Register the MCP server
186
-
187
-
Add Wren to Claude Code's MCP configuration:
188
-
189
-
```bash
190
-
claude mcp add --transport http wren http://localhost:9000/mcp
191
-
```
192
-
193
-
Verify it was added:
194
-
195
-
```bash
196
-
claude mcp list
197
-
```
198
-
199
-
**Start a new Claude Code session** — MCP servers are only loaded at session start.
Once you have confirmed that queries are returning correct results and the MDL is working as expected, enable **read-only mode** in the Web UI:
303
+
304
+
1. Open `http://localhost:9001`
305
+
2. Toggle **Read-Only Mode** to on
306
+
307
+
When read-only mode is enabled:
308
+
309
+
- The AI agent can **query data** and **read metadata** through the deployed MDL as usual
310
+
- The AI agent **cannot** modify connection info, change the data source, or call `list_remote_tables()` / `list_remote_constraints()` to introspect the database directly
311
+
- This limits the agent to operating within the boundaries of the MDL you have defined, preventing it from accessing tables or schemas you have not explicitly modeled
312
+
313
+
We recommend enabling read-only mode for day-to-day use. Turn it off temporarily when you need to regenerate the MDL or change connection settings.
#### Phase 2 — Configure the connection and generate the MDL
144
+
#### Phase 2 — Configure connection and register MCP server
145
145
146
-
Before generating the MDL, configure the DuckDB connection via the Web UI at `http://localhost:9001`:
146
+
Configure the DuckDB connection via the Web UI at `http://localhost:9001`:
147
147
148
148
1. Open `http://localhost:9001` in your browser
149
149
2. Select data source type: **DUCKDB**
@@ -161,33 +161,37 @@ The JSON looks like:
161
161
162
162
> **Common mistake:** Do not point `url` to the `.duckdb` file directly (e.g. `/data/jaffle_shop.duckdb`). The ibis-server expects a **directory** — it scans for all `.duckdb` files in that directory and attaches them automatically. Pointing to the binary file causes a UTF-8 decode error.
163
163
164
-
After saving the connection, run the skills in sequence in Claude Code:
164
+
Then register the MCP server with Claude Code:
165
165
166
-
```text
167
-
/generate-mdl
166
+
```bash
167
+
claude mcp add --transport http wren http://localhost:9000/mcp
168
168
```
169
169
170
-
Then save the MDL as a versioned YAML project:
170
+
Verify it was added:
171
171
172
-
```text
173
-
/wren-project
172
+
```bash
173
+
claude mcp list
174
174
```
175
175
176
-
This writes human-readable YAML files to `~/wren-workspace/` and compiles `target/mdl.json`.
176
+
**Start a new Claude Code session** — MCP servers are only loaded at session start.
177
177
178
-
#### Phase 3 — Register the MCP server
178
+
#### Phase 3 — Generate the MDL
179
179
180
-
```bash
181
-
claude mcp add --transport http wren http://localhost:9000/mcp
180
+
In the new session, run the skills in sequence:
181
+
182
+
```text
183
+
/generate-mdl
182
184
```
183
185
184
-
Verify it was added:
186
+
The skill uses MCP tools (`health_check()`, `list_remote_tables()`, etc.) to introspect the database — these tools are only available after the MCP server is registered and a new session is started.
185
187
186
-
```bash
187
-
claude mcp list
188
+
Then save the MDL as a versioned YAML project:
189
+
190
+
```text
191
+
/wren-project
188
192
```
189
193
190
-
**Start a new Claude Code session** — MCP servers are only loaded at session start.
194
+
This writes human-readable YAML files to `~/wren-workspace/` and compiles `target/mdl.json`.
| Connect a different database |`/wren-connection-info`|
280
+
| Connect a different database |Web UI at `http://localhost:9001` (use `/wren-connection-info` for field reference)|
277
281
| Day-to-day usage guide |`/wren-usage`|
278
282
279
283
For a deeper dive into how skills work or how to connect a cloud database, see [Getting Started with Claude Code](./getting_started_with_claude_code.md).
284
+
285
+
---
286
+
287
+
## Locking down with read-only mode
288
+
289
+
Once you have confirmed that queries are returning correct results and the MDL is working as expected, enable **read-only mode** in the Web UI:
290
+
291
+
1. Open `http://localhost:9001`
292
+
2. Toggle **Read-Only Mode** to on
293
+
294
+
When read-only mode is enabled:
295
+
296
+
- The AI agent can **query data** and **read metadata** through the deployed MDL as usual
297
+
- The AI agent **cannot** modify connection info, change the data source, or call `list_remote_tables()` / `list_remote_constraints()` to introspect the database directly
298
+
- This limits the agent to operating within the boundaries of the MDL you have defined, preventing it from accessing tables or schemas you have not explicitly modeled
299
+
300
+
We recommend enabling read-only mode for day-to-day use. Turn it off temporarily when you need to regenerate the MDL or change connection settings.
@@ -34,13 +34,15 @@ Follow these steps in order. Do not skip steps or ask unnecessary questions betw
34
34
35
35
### Step 1 — Verify connection and choose data source
36
36
37
+
>**Connection info can ONLY be configured through the Web UI at `http://localhost:9001`.** Do not attempt to set connection info programmatically via ibis-server API calls, curl, or any other method. The ibis-server does not expose a public API for writing connection info — only the Web UI can do this.
38
+
37
39
Confirm the MCP server has a working connection before proceeding:
38
40
39
41
```text
40
42
health_check()
41
43
```
42
44
43
-
If the health check fails, ask the user to configure the connection via the Web UI at `http://localhost:9001` before continuing.
45
+
If the health check fails, or if the user has not yet configured a connection, direct them to the Web UI at `http://localhost:9001` to enter their data source credentials. Wait for the user to confirm the connection is saved before continuing.
44
46
45
47
Ask the user for:
46
48
1.**Data source type** (e.g. `POSTGRES`, `BIGQUERY`, `SNOWFLAKE`, …) — needed to set `dataSource` in the MDL
@@ -207,6 +209,6 @@ When in doubt, use `VARCHAR` as a safe fallback.
207
209
208
210
## Connection setup
209
211
210
-
Connection info is configured via the MCP server Web UI at `http://localhost:9001`. See the **wren-mcp-setup** skill for Docker setup instructions.
212
+
Connection info is configured **exclusively**via the MCP server Web UI at `http://localhost:9001`. There is no API endpoint for setting connection info — do not attempt to configure it programmatically. See the **wren-mcp-setup** skill for Docker setup instructions.
211
213
212
214
> **Note:** If the Web UI is disabled (`WEB_UI_ENABLED=false`), connection info must be pre-configured in `~/.wren/connection_info.json` before starting the container. Use `/wren-connection-info` in Claude Code for the required fields per data source.
Copy file name to clipboardExpand all lines: skills/wren-connection-info/SKILL.md
+2-2Lines changed: 2 additions & 2 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -4,14 +4,14 @@ description: Reference guide for Wren Engine connection info — explains requir
4
4
license: Apache-2.0
5
5
metadata:
6
6
author: wren-engine
7
-
version: "1.3"
7
+
version: "1.4"
8
8
---
9
9
10
10
# Wren Connection Info Reference
11
11
12
12
This skill answers questions about how to configure connection info for each data source in Wren Engine. Use it to explain required fields, flag sensitive values, and guide the user through any data-source-specific setup steps.
13
13
14
-
The connection info is entered by the user — in the MCP server Web UI (`http://localhost:9001`) for normal use, or directly in API calls for advanced workflows.
14
+
Connection info can **only** be configured through the MCP server Web UI at `http://localhost:9001`. There is no ibis-server API for writing connection info — do not attempt to set it programmatically via API calls, curl, or any other method. Always direct the user to the Web UI to enter or update credentials.
0 commit comments