MCP 安装
- 作者仓库星标 0
- 作者更新于 实时读取
- 作者仓库 skills-registry
- 领域
- 运维部署
- 兼容 Agent
-
- Claude Code
- Cursor
- Cline
- Codex
- Windsurf
- Gemini CLI
- +20
- 信任分
- 88 / 100 · 社区维护
- 作者 / 版本 / 许可
- @tomevault-io · 未声明 license
- Token 消耗评级
- 低消耗
- 接入复杂程度
- 需手动接入
- 是否需要外部 API Key
- 不需要
- 兼容的系统
- macOS · Linux · Docker
- 底层运行要求
- Docker
- 文件与系统权限
-
- 只读
- 允许写入 / 修改
- Shell 执行
- 网络行为
- 允许外网请求
- 安装命令数
- 26 条
档案由构建时根据 SKILL.md 与安装命令自动衍生,可能与作者实际意图存在差异。
需要注意: 未限定 allowed-tools,默认拥有全部工具权限。
---
name: wren-mcp-setup
description: Set up Wren Engine MCP server via Docker and register it with an AI agent. Covers pulling the Do…
category: 运维部署
runtime: Docker
---
# wren-mcp-setup 输出预览
## PART A: 任务判断
- 适用问题:部署、CI、环境检查、发布或运维排障。
- 输入要求:目标材料、限制条件、期望输出和验收方式。
- 证据边界:围绕“Version check / Step 1 — Ask for workspace path / Step 2 — Prepare workspace and start the container”读取原文规则,不把推断写成作者承诺。
## PART B: 执行结果
- **01** 任务判断:确认你的需求是否属于部署、CI、环境检查、发布或运维排障,并标出输入、限制和预期结果。
- **02** 执行计划:优先按“Version check / Step 1 — Ask for workspace path / Step 2 — Prepare workspace and start the container”拆成步骤,说明每一步会读取什么、修改什么、产出什么。
- **03** 交付结果:给出可复制的命令、文件改动、检查清单或内容草稿,并说明如何继续迭代。
- **04** 风险边界:结合 读取文件、写入/修改文件、执行终端命令、会按任务需要访问外部网络、通常不需要额外 API Key 给出执行前确认项。
## Running Rules
- 读取文件、写入/修改文件、执行终端命令;会按任务需要访问外部网络;通常不需要额外 API Key。
- 先小样例验证,再放大到真实任务。
- 交付时同时给结果、检查口径和下一步迭代建议。 原文出现了 `/users`、`/workspace`、`/wren-generate-mdl`、`/wren-sql` 这类斜杠命令;如果你的 Agent 支持命令触发,优先用命令开场,再补充目标和边界。
告诉 Agent 目标文件或材料、期望结果、不可改范围、是否允许联网或执行命令。本 Skill 的权限画像是:读取文件、写入/修改文件、执行终端命令。
先用一个小任务确认它会围绕“Version check / Step 1 — Ask for workspace path / Step 2 — Prepare workspace and start the container”工作;涉及文件或命令时,先看 diff、日志、预览或测试结果。
检查最终产物是否包含明确结果、必要证据和下一步动作;如果输出泛泛而谈,就补充输入、边界和验收标准后重跑。
---
name: wren-mcp-setup
description: Set up Wren Engine MCP server via Docker and register it with an AI agent. Covers pulling the Do…
category: 运维部署
source: tomevault-io/skills-registry
---
# wren-mcp-setup
## 什么时候使用
- 把部署运维方向的常用动作沉淀成 Agent 可调用的技能 适合处理部署、CI、发布、回滚、环境检查和运维排障,核心价值是把输入、判断、执行、验证和交付边界固定下来,避免 Agent 泛泛回答。 把任务拆成可执行、可检查、可继续迭代的步骤…
- 面向部署、CI、环境检查、发布或运维排障,优先处理能明确输入、步骤和验收标准的工作。
## 需要提供什么
- 目标材料、目录范围、期望结果和不可改动内容。
- 是否允许联网、执行命令、读写文件或调用外部服务。
## 执行规则
- 围绕「Version check / Step 1 — Ask for workspace path / Step 2 — Prepare workspace and start the container」组织步骤,不把推断写成作者事实。
- 读取文件、写入/修改文件、执行终端命令;会按任务需要访问外部网络;通常不需要额外 API Key。
- 先跑小样例,确认结果可检查后再扩大任务范围。
## 输出要求
- 给出最终产物、关键证据、验证方式和下一步动作。
- 信息不足时标记 unknown,不编造命令、平台或依赖。 作者原文负责流程事实;仓库文件负责来源和命令;流狐只补充适用场景、限制和质量判断。
skill "wren-mcp-setup" {
输入层 -> 用户目标 + 目标文件 + 禁止范围 + 验收标准
上下文层 -> Version check / Step 1 — Ask for workspace path / Step 2 — Prepare workspace and start the container
规则层 -> SKILL.md 触发条件 / 执行顺序 / 输出格式
运行层 -> Docker | 读取文件、写入/修改文件、执行终端命令 | 会按任务需要访问外部网络
安全层 -> 通常不需要额外 API Key + 小任务验证 + diff / 日志复核
输出层 -> 可复制结果 + 检查清单 + 下一步迭代
} Set Up Wren MCP via Docker
Version check
Silently fetch https://raw.githubusercontent.com/Canner/wren-engine/main/skills/versions.json.
Compare the wren-mcp-setup key with this skill's version (from the frontmatter above).
If the remote version is newer, notify the user before proceeding:
A newer version of the wren-mcp-setup skill is available. Update with:
npx skills add Canner/wren-engine --skill wren-mcp-setup --agent claude-code
Then continue with the workflow below regardless of update status.
Runs the Wren Engine ibis-server + MCP server together in a single Docker container and connects it to Claude Code (or another MCP client) over streamable-http.
Step 1 — Ask for workspace path
Ask the user:
What directory on your host machine should be mounted as the MCP workspace? This is where MDL files and YAML project directories will be read and written. (Example:
~/wren-workspace)
If the user has no preference, suggest creating a dedicated directory such as ~/wren-workspace:
mkdir -p ~/wren-workspace
Save the answer as <WORKSPACE_PATH> (use the absolute path, e.g. /Users/me/wren-workspace) for use in the next steps.
Step 2 — Prepare workspace and start the container
Check for a newer image
Before starting the container, verify whether a newer wren-engine-ibis image is available on the registry.
If the image has never been pulled (first-time setup), just pull it:
docker pull ghcr.io/canner/wren-engine-ibis:latest
If the image already exists locally, compare the local digest with the remote one to detect updates:
# Save current local digest (empty string if image not present)
LOCAL_DIGEST=$(docker inspect --format='{{index .RepoDigests 0}}' ghcr.io/canner/wren-engine-ibis:latest 2>/dev/null || echo "")
# Pull from registry (downloads only if remote digest differs)
docker pull ghcr.io/canner/wren-engine-ibis:latest
# Compare digests
NEW_DIGEST=$(docker inspect --format='{{index .RepoDigests 0}}' ghcr.io/canner/wren-engine-ibis:latest 2>/dev/null || echo "")
if [ "$LOCAL_DIGEST" != "$NEW_DIGEST" ]; then
echo "✓ New image pulled — container will use the updated version."
else
echo "✓ Already up to date. No update was needed."
fi
Note: If a
wren-mcpcontainer is already running and a new image was pulled, stop and remove the old container before proceeding:docker rm -f wren-mcp
The workspace directory is mounted at /workspace inside the container. Place your compiled MDL at <WORKSPACE_PATH>/target/mdl.json so the container can load it at startup via MDL_PATH.
Recommended workspace layout:
<WORKSPACE_PATH>/
└── target/
└── mdl.json # Compiled MDL (from wren-project build)
Note: Connection info is managed via the MCP server Web UI (see Step 3) and persisted to
~/.wren/connection_info.json. You can also pre-configure this file before starting the container.
Run the following command, substituting <WORKSPACE_PATH> with the path from Step 1:
docker run -d \
--name wren-mcp \
-p 8000:8000 \
-p 9000:9000 \
-p 9001:9001 \
-e ENABLE_MCP_SERVER=true \
-e MCP_TRANSPORT=streamable-http \
-e MCP_HOST=0.0.0.0 \
-e MCP_PORT=9000 \
-e WREN_URL=localhost:8000 \
-e MDL_PATH=/workspace/target/mdl.json \
-v <WORKSPACE_PATH>:/workspace \
ghcr.io/canner/wren-engine-ibis:latest
Example with a concrete path:
docker run -d \
--name wren-mcp \
-p 8000:8000 \
-p 9000:9000 \
-p 9001:9001 \
-e ENABLE_MCP_SERVER=true \
-e MCP_TRANSPORT=streamable-http \
-e MCP_HOST=0.0.0.0 \
-e MCP_PORT=9000 \
-e WREN_URL=localhost:8000 \
-e MDL_PATH=/workspace/target/mdl.json \
-v /Users/me/wren-workspace:/workspace \
ghcr.io/canner/wren-engine-ibis:latest
If
MDL_PATHis not set or the file doesn't exist yet, the container starts without a loaded MDL. You can deploy later using thedeployMCP tool or the Web UI.
This starts the container using the image ghcr.io/canner/wren-engine-ibis:latest with:
| Service | Port | Purpose |
|---|---|---|
| ibis-server | 8000 | REST API for query execution and metadata |
| mcp-server (streamable-http) | 9000 | MCP endpoint for AI clients |
| Web UI | 9001 | Configuration UI (connection info, MDL editor, read-only mode) |
The workspace directory is mounted at /workspace inside the container.
Verify the container is running:
docker ps --filter name=wren-mcp
docker logs -f wren-mcp
Step 3 — Configure connection info via Web UI
Open the Web UI at http://localhost:9001.
The Web UI provides:
- Read-only Mode — toggle to prevent the AI agent from calling
deploy,deploy_manifest,list_remote_tables, orlist_remote_constraints. Useful for read-only query access. - MDL Status — shows the currently deployed MDL (models, columns, data source).
- Connection Info — select the data source type and fill in credentials. Click Save Connection to test and persist.
- MDL Editor — view and edit the live MDL JSON inline. Click Save & Deploy to update.
Docker host hint
Critical: The container cannot reach the host's localhost directly. If your database runs on the host machine, use host.docker.internal instead of localhost or 127.0.0.1 as the hostname.
The Web UI shows a hint for this when it detects you may be connecting to a local database:
| Original | Inside Docker |
|---|---|
localhost |
host.docker.internal |
127.0.0.1 |
host.docker.internal |
Cloud/remote host (e.g. mydb.us-east-1.rds.amazonaws.com) |
No change needed |
Fill in the connection credentials in the Web UI form, apply the Docker host hint if needed, and click Save Connection.
Step 4 — Configure Claude Code MCP
Claude Code uses streamable-http transport to connect to the containerized MCP server.
Via Claude Code CLI (recommended):
claude mcp add --transport http wren http://localhost:9000/mcp
Or add manually to ~/.claude/settings.json under mcpServers:
{
"mcpServers": {
"wren": {
"type": "http",
"url": "http://localhost:9000/mcp"
}
}
}
After adding, restart Claude Code for the new MCP server to be loaded into the session. Confirm with:
claude mcp list
Note: The config file is
~/.claude/settings.json, not~/.claude.json. Adding the MCP server while a session is already running has no effect until the session is restarted.
Step 5 — Configure other MCP clients
Cline / Cursor / VS Code MCP Extension
These clients also support HTTP transport. Add to their MCP settings:
{
"mcpServers": {
"wren": {
"type": "streamable-http",
"url": "http://localhost:9000/mcp"
}
}
}
Claude Desktop (stdio fallback)
Claude Desktop does not support HTTP transport natively. Use a local stdio proxy or run the MCP server locally instead.
Step 6 — Verify the connection
Ask the AI agent to run a health check:
Use the health_check() tool to verify Wren Engine is reachable.
Expected response: SELECT 1 returns a successful result.
If health check fails, see Troubleshooting below.
Troubleshooting — MCP server not healthy
1. Check container status and logs
docker ps --filter name=wren-mcp
docker logs wren-mcp
Look for startup errors or crash loops. If the container exited, logs will show the last output before it stopped.
2. Port already in use
The container exposes ports 8000 (ibis-server), 9000 (MCP), and 9001 (Web UI). If any port is already bound by another process on the host, the docker run command will fail with a bind error.
Check what is using the port:
# macOS / Linux
lsof -i :9000
lsof -i :8000
lsof -i :9001
If another process is occupying the port you have two options:
Option A — stop the conflicting process:
# macOS: kill by port
kill $(lsof -ti :9000)
Option B — remap to different host ports:
Stop and remove the existing container first, then re-run with different host-side ports:
docker rm -f wren-mcp
docker run -d \
--name wren-mcp \
-p 18000:8000 \
-p 19000:9000 \
-p 19001:9001 \
-e ENABLE_MCP_SERVER=true \
-e MCP_TRANSPORT=streamable-http \
-e MCP_HOST=0.0.0.0 \
-e MCP_PORT=9000 \
-e WREN_URL=localhost:8000 \
-e WEB_UI_PORT=9001 \
-e MDL_PATH=/workspace/target/mdl.json \
-v <WORKSPACE_PATH>:/workspace \
ghcr.io/canner/wren-engine-ibis:latest
Then update the MCP client URL and Web UI address to match:
claude mcp add --transport http wren http://localhost:19000/mcp
# Web UI: http://localhost:19001
3. Container started but MCP endpoint returns an error
- Confirm the container was started with
-e ENABLE_MCP_SERVER=true,-e MCP_TRANSPORT=streamable-http, and-e MCP_HOST=0.0.0.0 - Try curling the endpoint directly:
Acurl -v http://localhost:9000/mcp405 Method Not Allowedresponse means the endpoint is reachable but expects a POST — that is normal and indicates the MCP server is up.
4. MCP tools fail with "Session not found" after container restart
Container restarts invalidate all active MCP sessions. The AI client still holds the old session ID, so every MCP call returns "Session not found". Start a new Claude Code session (or restart your MCP client) to reconnect.
5. Database connection refused inside the container
If health_check() passes but queries fail with a connection error, the database host is likely still set to localhost. Open the Web UI at http://localhost:9001, edit the connection info, and change the host to host.docker.internal.
Step 7 — Load an MDL and start querying
Option A — Auto-load at startup (recommended):
Place your compiled mdl.json in <WORKSPACE_PATH>/target/mdl.json before starting the container. The container reads MDL_PATH at startup and logs:
Loaded MDL /workspace/target/mdl.json (9 models, 47 columns)
Option B — Deploy via Web UI:
Open http://localhost:9001, paste or edit your MDL JSON in the MDL Editor, and click Save & Deploy.
Option C — Deploy via MCP tool (after container is running):
In the AI client (after MCP is connected):
deploy(mdl_file_path="/workspace/target/mdl.json")
Or deploy from an in-memory dict:
deploy_manifest(mdl=<manifest dict>)
To generate an MDL from scratch, use the wren-generate-mdl skill. It will introspect your database schema via ibis-server and build the manifest for you.
You're ready!
Start a new Claude Code session (or restart your MCP client). The Wren tools (health_check, query, deploy, setup_connection, etc.) are now available.
Try it:
Use health_check() to verify the connection.
Once confirmed, you can start querying your data through Wren Engine — use /wren-generate-mdl to scaffold an MDL from your database, or /wren-sql for help writing queries.
Source: Canner/wren-engine — distributed by TomeVault.
先判断是否适合
作者设计意图
作者的方法与取舍
边界和复核