Skip to main content

setup-wrenai-mcp

Set up WrenAI MCP server connection. Detects Node.js, configures .mcp.json with stdio proxy, and verifies the connection. Triggers on 'connect to wrenai', 'setup wrenai mcp', 'connect mcp', or 'wrenai mcp setup'.

소스 정보

저장소
Canner/WrenAI-mcp
최근 소스 활동
2026년 3월 26일 15:20
감지된 SKILL.md 언어
영어
스타
6
포크
2

설치 방법

기본적으로 소스를 먼저 확인하는 Prompt가 선택됩니다. 직접 명령으로 전환하거나 로컬 사본을 다운로드할 수도 있습니다.

소스 파일 검토

설치 여부를 결정하기 전에 SKILL.md와 SkillsMP에 표시된 보조 파일을 읽어 보세요.

파일 탐색기
2 개 파일

SKILL.md 표시 중

SKILL.md
소스 지침 · 읽기 전용 미리보기
name
setup-wrenai-mcp
description
Set up WrenAI MCP server connection. Detects Node.js, configures .mcp.json with stdio proxy, and verifies the connection. Triggers on 'connect to wrenai', 'setup wrenai mcp', 'connect mcp', or 'wrenai mcp setup'.
<!-- AUTO-GENERATED from SKILL.md.tmpl for claude — do not edit directly --> ## Setup WrenAI MCP Connection Configures the current project to connect to a WrenAI MCP server so the AI can query data, generate SQL, run queries, build charts, and provide business insights. ### When to Use - User wants to connect to a WrenAI instance - User says "connect to wrenai", "setup mcp", "connect mcp" - User needs to query their data through WrenAI --- ### Step 1 — Gather connection info Ask the user for: 1. **WrenAI URL** — e.g. `http://localhost:3000` or `https://app.getwren.ai` 2. **Project ID** — the numeric project ID (visible in the WrenAI URL) 3. **Authentication** — one of: - **API key** (`sk-...`) — recommended for most setups - **None** — local dev with `MCP_SKIP_AUTH=true` on the server Construct the MCP endpoint: `{url}/api/mcp/{project_id}` --- ### Step 2 — Check Node.js >= 20 The stdio proxy requires Node.js >= 20 (for native `https` module ESM support). Find a suitable `node` binary: ```bash node --version ``` If not found or version < 20, search common locations: - `~/.nvm/versions/node/v2*/bin/node` - `~/.volta/bin/node` - `/usr/local/bin/node` - `/opt/homebrew/bin/node` If no Node.js >= 20 found, offer to install: > You need Node.js >= 20 for the MCP proxy. > - **nvm**: `nvm install 20` > - **Direct**: download from https://nodejs.org Record the **full absolute path** to `node` (e.g. `/Users/me/.nvm/versions/node/v20.20.1/bin/node`). --- ### Step 3 — Write MCP config Write the following JSON to `.mcp.json` in the **project root**. If the file already exists with other servers, **merge** — don't overwrite. > **Note:** Claude Code's native HTTP transport auto-discovers OAuth and gets stuck > if the server advertises `/.well-known/oauth-authorization-server`. > Use the stdio proxy (`mcp-proxy.mjs`) to bypass this. **Step 3a — Locate the proxy** The `mcp-proxy.mjs` file ships with this plugin. Find its absolute path: ```bash # If installed as a plugin, it's in the plugin directory: ls "$(pwd)/mcp-proxy.mjs" 2>/dev/null || echo "Not found in current dir" ``` **Step 3b — Write `.mcp.json`** **Without auth (local dev):** ```json { "mcpServers": { "wrenai": { "type": "stdio", "command": "<node_path>", "args": [ "<absolute_path_to>/mcp-proxy.mjs", "<endpoint_url>" ] } } } ``` **With API key:** ```json { "mcpServers": { "wrenai": { "type": "stdio", "command": "<node_path>", "args": [ "<absolute_path_to>/mcp-proxy.mjs", "<endpoint_url>", "<api_key>" ] } } } ``` For example: ```json { "mcpServers": { "wrenai": { "type": "stdio", "command": "/Users/me/.nvm/versions/node/v20.20.1/bin/node", "args": [ "/Users/me/wrenai-mcp/mcp-proxy.mjs", "https://app.getwren.ai/api/mcp/123", "sk-abc123" ] } } } ``` **IMPORTANT:** Do NOT use `--transport http` or `type: "http"` — Claude Code's HTTP transport auto-discovers OAuth endpoints and fails if the server exposes one. The stdio proxy bypasses this entirely. --- ### Step 4 — Verify & next steps Tell the user: > WrenAI MCP config written to `.mcp.json`. > > **Next steps:** > 1. **Restart Claude Code** to activate the connection (config changes require a restart) > 2. After restarting, try: `/wrenai-analyst how many records do I have?` > > The `wrenai-analyst` skill is available for data analysis, SQL generation, and charting. --- ### Step 5 — Troubleshooting If the connection fails: | Issue | Fix | |-------|-----| | "Failed to reconnect" | Fully restart the agent — `/mcp` reconnect uses cached config | | 401 Unauthorized | Check API key, or set `MCP_SKIP_AUTH=true` on the WrenAI server | | Node.js version error | The proxy needs Node >= 20 — check the `command` path | | Connection refused | Verify WrenAI is running at the specified URL | | OAuth timeout (HTTP transport) | Do NOT use `type: "http"` — use the stdio proxy to bypass OAuth discovery | | "Token expired without refresh token" | Remove any stale server config from `~/.claude.json` with `claude mcp remove wrenai -s local` | --- ### Claude Desktop setup The same config works for Claude Desktop. The config file location: - **macOS**: `~/Library/Application Support/Claude/claude_desktop_config.json` - **Windows**: `%APPDATA%\Claude\claude_desktop_config.json` Use the same `command`/`args` structure as `.mcp.json`. The `mcp-proxy.mjs` path must be absolute.
GitHub에서 보기