Skip to content
This repository was archived by the owner on May 7, 2026. It is now read-only.

Commit 642b7ee

Browse files
authored
docs(skills): enforce Web UI as sole method for connection info setup (#1455)
1 parent 09dca6c commit 642b7ee

9 files changed

Lines changed: 170 additions & 125 deletions

File tree

docs/getting_started_with_claude_code.md

Lines changed: 45 additions & 23 deletions
Original file line numberDiff line numberDiff line change
@@ -33,7 +33,7 @@ This installs the following skills into `~/.claude/skills/`:
3333
| Skill | Purpose |
3434
|-------|---------|
3535
| `wren-quickstart` | End-to-end guided setup |
36-
| `wren-connection-info` | Configure database credentials |
36+
| `wren-connection-info` | Connection field reference per data source |
3737
| `generate-mdl` | Generate MDL from a live database |
3838
| `wren-project` | Save and build MDL as YAML files |
3939
| `wren-mcp-setup` | Start the Docker container and register MCP |
@@ -156,23 +156,43 @@ docker logs wren-mcp
156156

157157
> **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.
158158
159-
### Phase 3 — Generate the MDL
159+
### Phase 3 — Configure connection and register MCP server
160160

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:
162182

163183
```
164184
/generate-mdl
165185
```
166186

167187
The skill will:
168188

169-
1. Run `health_check()` to verify the connection is configured
189+
1. Run `health_check()` to verify the connection is working
170190
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
172192
4. Build the MDL JSON (models, columns, relationships)
173193
5. Validate the manifest with `deploy_manifest()` + `dry_run()`
174194

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.
176196
177197
Then save the MDL as a versioned YAML project:
178198

@@ -182,22 +202,6 @@ Then save the MDL as a versioned YAML project:
182202

183203
This writes human-readable YAML files to your workspace and compiles `target/mdl.json`.
184204

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.
200-
201205
---
202206

203207
## Verify and start querying
@@ -250,9 +254,10 @@ docker restart wren-mcp # restart
250254
| `health_check()` | Verify Wren Engine is reachable |
251255
| `query(sql=...)` | Execute SQL against the deployed MDL |
252256
| `deploy(mdl_file_path=...)` | Load a compiled `mdl.json` |
253-
| `setup_connection(...)` | Configure data source credentials |
254257
| `list_remote_tables(...)` | Introspect database schema |
255258

259+
> **Note:** Connection info is configured exclusively through the Web UI at `http://localhost:9001` — there is no MCP tool for setting credentials.
260+
256261
---
257262

258263
## Troubleshooting
@@ -289,3 +294,20 @@ To update a single skill:
289294
```bash
290295
curl -fsSL https://raw.githubusercontent.com/Canner/wren-engine/main/skills/install.sh | bash -s -- --force generate-mdl
291296
```
297+
298+
---
299+
300+
## Locking down with read-only mode
301+
302+
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.

docs/quickstart.md

Lines changed: 38 additions & 17 deletions
Original file line numberDiff line numberDiff line change
@@ -141,9 +141,9 @@ docker ps --filter name=wren-mcp
141141
curl http://localhost:8000/health
142142
```
143143

144-
#### Phase 2 — Configure the connection and generate the MDL
144+
#### Phase 2 — Configure connection and register MCP server
145145

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`:
147147

148148
1. Open `http://localhost:9001` in your browser
149149
2. Select data source type: **DUCKDB**
@@ -161,33 +161,37 @@ The JSON looks like:
161161

162162
> **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.
163163
164-
After saving the connection, run the skills in sequence in Claude Code:
164+
Then register the MCP server with Claude Code:
165165

166-
```text
167-
/generate-mdl
166+
```bash
167+
claude mcp add --transport http wren http://localhost:9000/mcp
168168
```
169169

170-
Then save the MDL as a versioned YAML project:
170+
Verify it was added:
171171

172-
```text
173-
/wren-project
172+
```bash
173+
claude mcp list
174174
```
175175

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.
177177

178-
#### Phase 3 — Register the MCP server
178+
#### Phase 3 — Generate the MDL
179179

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
182184
```
183185

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.
185187

186-
```bash
187-
claude mcp list
188+
Then save the MDL as a versioned YAML project:
189+
190+
```text
191+
/wren-project
188192
```
189193

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`.
191195

192196
</details>
193197

@@ -273,7 +277,24 @@ Check container logs: `docker logs wren-mcp`. Confirm ports are listening: `curl
273277
|------|---------|
274278
| Add or edit MDL models | `/wren-project` |
275279
| Write custom SQL | `/wren-sql` |
276-
| 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) |
277281
| Day-to-day usage guide | `/wren-usage` |
278282

279283
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.

mcp-server/README.md

Lines changed: 7 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -203,13 +203,15 @@ schema discovery. No local database drivers need to be installed on the MCP serv
203203

204204
### How it works
205205

206-
The agent calls ibis-server tools in sequence:
206+
The agent calls MCP tools in sequence:
207207

208208
```
209209
User → "Generate an MDL for my PostgreSQL ecommerce database"
210210
211-
Agent → setup_connection(datasource="POSTGRES",
212-
conn_info={"host":"localhost","port":"5432","user":"...","database":"shop"})
211+
User → (configures connection info via Web UI at http://localhost:9001)
212+
213+
Agent → health_check()
214+
← "Wren Engine is reachable."
213215
214216
Agent → list_remote_tables()
215217
← [{"name":"orders","columns":[...]}, {"name":"customers","columns":[...]}, ...]
@@ -227,6 +229,8 @@ Agent → deploy_manifest({"catalog":"wren","schema":"public","dataSource":"POST
227229
← "MDL deployed successfully (5 models, 23 columns)"
228230
```
229231

232+
> **Note:** Connection info can only be configured through the Web UI — there is no MCP tool for setting credentials.
233+
230234
### Environment Variables
231235

232236
| Variable | Required | Description |

skills/generate-mdl/SKILL.md

Lines changed: 7 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -5,18 +5,18 @@ compatibility: Requires a running ibis-server (default port 8000). No local data
55
license: Apache-2.0
66
metadata:
77
author: wren-engine
8-
version: "1.3"
8+
version: "1.4"
99
---
1010

1111
# Generate Wren MDL
1212

1313
## Version check
1414

1515
Silently fetch `https://raw.githubusercontent.com/Canner/wren-engine/main/skills/versions.json`.
16-
Compare the `generate-mdl` key with this skill's version (`1.3`).
16+
Compare the `generate-mdl` key with this skill's version (`1.4`).
1717
If the remote version is newer, notify the user before proceeding:
1818

19-
> A newer version of the **generate-mdl** skill is available (remote: X.Y, installed: 1.3).
19+
> A newer version of the **generate-mdl** skill is available (remote: X.Y, installed: 1.4).
2020
> Update with:
2121
> ```bash
2222
> curl -fsSL https://raw.githubusercontent.com/Canner/wren-engine/main/skills/install.sh | bash -s -- --force generate-mdl
@@ -34,13 +34,15 @@ Follow these steps in order. Do not skip steps or ask unnecessary questions betw
3434
3535
### Step 1 — Verify connection and choose data source
3636
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+
3739
Confirm the MCP server has a working connection before proceeding:
3840
3941
```text
4042
health_check()
4143
```
4244
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.
4446

4547
Ask the user for:
4648
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.
207209

208210
## Connection setup
209211

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.
211213

212214
> **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.

skills/index.json

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@
77
"skills": [
88
{
99
"name": "wren-connection-info",
10-
"version": "1.3",
10+
"version": "1.4",
1111
"description": "Reference guide for Wren Engine connection info — required fields, sensitive values, Docker host hints, and BigQuery credential encoding.",
1212
"tags": [
1313
"wren",
@@ -20,7 +20,7 @@
2020
},
2121
{
2222
"name": "generate-mdl",
23-
"version": "1.3",
23+
"version": "1.4",
2424
"description": "Generate a Wren MDL manifest from a live database using MCP server introspection tools.",
2525
"tags": [
2626
"wren",
@@ -82,7 +82,7 @@
8282
},
8383
{
8484
"name": "wren-quickstart",
85-
"version": "1.2",
85+
"version": "1.3",
8686
"description": "End-to-end quickstart for Wren Engine — from zero to querying.",
8787
"tags": [
8888
"wren",
@@ -100,7 +100,7 @@
100100
},
101101
{
102102
"name": "wren-usage",
103-
"version": "1.0",
103+
"version": "1.1",
104104
"description": "Daily usage guide for Wren Engine — connect, query, manage MDL, and operate the MCP server via AI agents.",
105105
"tags": [
106106
"wren",

skills/versions.json

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,9 @@
11
{
2-
"generate-mdl": "1.3",
3-
"wren-connection-info": "1.3",
2+
"generate-mdl": "1.4",
3+
"wren-connection-info": "1.4",
44
"wren-project": "1.5",
55
"wren-sql": "1.0",
66
"wren-mcp-setup": "1.3",
7-
"wren-quickstart": "1.2",
8-
"wren-usage": "1.0"
7+
"wren-quickstart": "1.3",
8+
"wren-usage": "1.1"
99
}

skills/wren-connection-info/SKILL.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -4,14 +4,14 @@ description: Reference guide for Wren Engine connection info — explains requir
44
license: Apache-2.0
55
metadata:
66
author: wren-engine
7-
version: "1.3"
7+
version: "1.4"
88
---
99

1010
# Wren Connection Info Reference
1111

1212
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.
1313

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.
1515

1616
---
1717

0 commit comments

Comments
 (0)