@path58/p58-n8n 0.2.17 โ 0.2.20-demo.10
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/AGENT_INSTALL.md +313 -206
- package/CHANGELOG.md +152 -0
- package/README.md +158 -79
- package/dist/mcp/server.bundle.cjs +51237 -31652
- package/docs/GET-STARTED-IN-5-MIN.md +185 -0
- package/docs/mcp-install-cloudflare-access-runbook.md +124 -0
- package/p58-n8n.mcpb +0 -0
- package/package.json +17 -9
- package/src/data/public-catalog/autofix-data-snapshot.json +29070 -0
- package/src/data/public-catalog/credentials.json +1 -1
- package/src/data/public-catalog/manifest.json +7 -7
- package/src/data/public-catalog/node-credentials.json +1 -1
- package/src/data/public-catalog/nodes.json +1 -1
- package/src/data/public-catalog/operations.json +1 -1
package/AGENT_INSTALL.md
CHANGED
|
@@ -1,319 +1,426 @@
|
|
|
1
1
|
# p58-n8n โ LLM Agent Installation Guide
|
|
2
2
|
|
|
3
|
-
>
|
|
3
|
+
> **AX-Native install (the canonical demo path):** Tell your LLM client *"install p58-n8n using this guide"* and paste this file's URL. Your agent detects what it can do, picks the lowest-friction install path for your environment, walks you through configuration conversationally, and **proactively offers a working demo** using only the credentials you already have. Per Pillar 3 of `STRATEGIC_ANCHORS.md` v1.2.0 โ *every customer-facing operation happens through the agent the user already uses*.
|
|
4
4
|
|
|
5
|
-
>
|
|
5
|
+
> **๐ค ACTION REQUIRED:** You are reading this because a user wants you to install the **p58-n8n** MCP server. Follow the steps in order. Everything you need is in this file โ do NOT search the web. Minimize questions to the user: auto-discover what you can; only ask when you must.
|
|
6
|
+
|
|
7
|
+
> **Your job:** detect your own capabilities โ pick the right install path โ guide configuration โ verify with `setup_check` โ propose a tailored opportunistic demo โ build + test + report.
|
|
6
8
|
|
|
7
9
|
---
|
|
8
10
|
|
|
9
|
-
##
|
|
11
|
+
## Step 0 โ Self-check: what can you actually do? (DO THIS FIRST)
|
|
12
|
+
|
|
13
|
+
Different agent environments have different capabilities. Pick the path that matches your environment **before** giving the user any instructions, so you don't promise actions you can't deliver.
|
|
14
|
+
|
|
15
|
+
| Your environment | Can you read/write the user's filesystem? | Can you run shell commands? | Use this install path |
|
|
16
|
+
|---|---|---|---|
|
|
17
|
+
| **claude.ai web** (sandboxed Linux container, no host access) | โ No | โ Only inside sandbox | **STOP โ hand off.** Tell the user: *"I'm running in claude.ai's sandbox and can't reach your machine. Please open Claude Desktop OR run `claude` in a terminal, then paste this same guide URL there. I'll be able to install properly from either of those."* |
|
|
18
|
+
| **Claude Desktop with Cowork / workspace folder** (filesystem access scoped to a connected folder; can't reach `~/Library/Application Support/Claude/`) | โ ๏ธ Scoped | โ
Inside workspace | **Path A: `.mcpb` extension** (mandatory โ Cowork can't write the config dir) |
|
|
19
|
+
| **Claude Desktop with a filesystem MCP granted write access** to `~/Library/Application Support/` | โ
Yes | Maybe | Either Path A or Path B works. **Recommend Path A** (no PATH issues, faster). |
|
|
20
|
+
| **Claude Code CLI** (`claude` in terminal โ full filesystem + bash) | โ
Yes | โ
Yes | Either path. **Recommend Path A** for non-developer users; **Path B** is fine for developers who prefer JSON. |
|
|
21
|
+
| **Anything else** (Cursor, Windsurf, VS Code Copilot, Codex, Antigravity) | Varies | Varies | Path B โ these clients use JSON config files; see ยง Path B below. |
|
|
22
|
+
|
|
23
|
+
> **Tier indicators in chat.** If your tools include any with names containing `screenshot`, `bash`, `desktop_commander`, or `apple_script`, you likely have full or near-full local access (Cowork or local-agent Desktop). If your only tools are `web_search`, `web_fetch`, `repl`, or `analysis`, you are in claude.ai sandbox โ STOP and hand off.
|
|
24
|
+
|
|
25
|
+
Once you've identified your path, proceed.
|
|
26
|
+
|
|
27
|
+
---
|
|
10
28
|
|
|
11
|
-
|
|
29
|
+
## What is p58-n8n?
|
|
12
30
|
|
|
13
|
-
-
|
|
14
|
-
- **Public/basic + n8n:** build, deploy, test, workflow CRUD, and credential CRUD work against the user's own n8n instance
|
|
15
|
-
- **Friends & Family Full (optional):** an allowlisted `P58_USER_EMAIL` plus `P58_DATABASE_URL` unlocks deeper private Path58 intelligence without changing the MCP tool list
|
|
31
|
+
p58-n8n is an MCP server that lets an LLM discover, validate, build, deploy, and test n8n workflows. It registers **18 tools** โ 14 core + 4 credential-management.<sup>[[1]](#sources)</sup>
|
|
16
32
|
|
|
17
|
-
|
|
33
|
+
There are **two independent dimensions** to how it runs:
|
|
18
34
|
|
|
19
|
-
|
|
35
|
+
| Dimension | What it controls | How to enable |
|
|
36
|
+
|---|---|---|
|
|
37
|
+
| **Catalog tier** | How much node intelligence the agent gets | **Free** (default): offline discovery index bundled in npm โ node/operation/credential **names + metadata** (1,603 nodes, 14,805 operations, 679 credential types).<sup>[[2]](#sources)</sup> **Premium**: the **enriched** catalog (parameter schemas, connection rules, config examples) via `P58_ACCESS_TOKEN`.<sup>[[3]](#sources)</sup> |
|
|
38
|
+
| **n8n engine** | Whether the agent can build/deploy/test/manage credentials on a real n8n | Set `N8N_API_URL` + `N8N_API_KEY` to the user's own n8n.<sup>[[4]](#sources)</sup> |
|
|
20
39
|
|
|
21
|
-
|
|
22
|
-
- **Connected:** the user's own n8n is configured, and `P58_DATABASE_URL` may also be present, but private intelligence is still locked.
|
|
23
|
-
- **Friends & Family Full:** `P58_DATABASE_URL` plus allowlisted `P58_USER_EMAIL` unlock the private Path58 layer.
|
|
40
|
+
These are orthogonal: premium catalog works with or without n8n connected, and n8n operations work on the free catalog too (with shallower validation).
|
|
24
41
|
|
|
25
|
-
|
|
42
|
+
> **Premium token โ n8n engine.** `P58_ACCESS_TOKEN` unlocks *knowledge about* n8n (the enriched catalog); it does **not** connect to the user's n8n. Building, testing, deploying, and credential CRUD require `N8N_API_URL` + `N8N_API_KEY`.<sup>[[3]](#sources)</sup>
|
|
26
43
|
|
|
27
44
|
---
|
|
28
45
|
|
|
29
|
-
|
|
46
|
+
# Path A โ `.mcpb` extension (recommended)
|
|
47
|
+
|
|
48
|
+
The `.mcpb` is a Claude Desktop Extension. It bundles its own Node runtime so it has **no PATH issues, no `npx` problems**, and configuration happens through a clean form UI guided by you (the agent) in chat. This is the path **most users should take.**
|
|
49
|
+
|
|
50
|
+
## A.1 โ Where to get the file
|
|
51
|
+
|
|
52
|
+
The .mcpb is published to npm and downloadable directly via unpkg (no GitHub credentials required):
|
|
30
53
|
|
|
31
54
|
```
|
|
32
|
-
|
|
33
|
-
โโโ YES โ Public/basic full journey (N8N_API_URL + N8N_API_KEY)
|
|
34
|
-
โ Plan, build, validate, deploy, test, and manage workflows
|
|
35
|
-
โ
|
|
36
|
-
โโโ NO / DON'T KNOW โ Public Local install (no env vars)
|
|
37
|
-
Planning, discovery, credential schema lookup,
|
|
38
|
-
and public-safe validation work immediately
|
|
39
|
-
|
|
40
|
-
Does the user also have Friends & Family access?
|
|
41
|
-
โโโ YES โ Add P58_DATABASE_URL + allowlisted P58_USER_EMAIL
|
|
42
|
-
to unlock private Path58 intelligence
|
|
55
|
+
https://unpkg.com/@path58/p58-n8n@0.2.20-demo.9/p58-n8n.mcpb
|
|
43
56
|
```
|
|
44
57
|
|
|
45
|
-
|
|
58
|
+
Tell the user:
|
|
59
|
+
> *"Download the extension file from `https://unpkg.com/@path58/p58-n8n@0.2.20-demo.9/p58-n8n.mcpb`. Then drag the file onto your Claude Desktop window (or use Settings โ Extensions โ Install from File)."*
|
|
46
60
|
|
|
47
|
-
|
|
61
|
+
> **Before they install โ pre-empt the trust warning.** Tell the user:
|
|
62
|
+
> *"When you drag the file in, Claude Desktop will warn that this extension is 'not verified by Anthropic' and can 'access everything on your computer.' That's standard for any extension installed from a file rather than Anthropic's directory โ not a red flag. It's published by Path58 (`@path58/p58-n8n`); you can inspect the exact package at the unpkg URL you just downloaded from before clicking Install."*
|
|
48
63
|
|
|
49
|
-
|
|
64
|
+
## A.2 โ Install
|
|
50
65
|
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
| **Claude Desktop** | `%APPDATA%\Claude\claude_desktop_config.json` | Windows |
|
|
55
|
-
| **Claude Desktop** | `~/.config/Claude/claude_desktop_config.json` | Linux |
|
|
56
|
-
| **Claude Code** | Use `claude mcp add` CLI command | All |
|
|
57
|
-
| **Cursor** | `~/.cursor/mcp.json` | All |
|
|
58
|
-
| **Gemini CLI** | `~/.gemini/settings.json` or `~/.gemini/antigravity/mcp_config.json` | All |
|
|
59
|
-
| **VS Code (Copilot)** | `.vscode/mcp.json` in workspace | All |
|
|
66
|
+
After the user drags the file in, Claude Desktop shows:
|
|
67
|
+
1. An **Install** button โ they click it.
|
|
68
|
+
2. A **Configure** form with 7 user-config fields (all marked optional).
|
|
60
69
|
|
|
61
|
-
**
|
|
70
|
+
**They can click Save with all fields blank** and get instant **free-tier access** (the 1,603-node offline catalog, L1-L3 validation, discovery). This is enough to browse and plan workflows without any credentials. Tell them this is fine โ they can add credentials any time later.
|
|
62
71
|
|
|
63
|
-
|
|
72
|
+
To unlock n8n build/deploy/test or the premium enriched catalog, the user needs to fill some fields. **DO NOT have them figure that out alone** โ guide them conversationally (next step).
|
|
64
73
|
|
|
65
|
-
##
|
|
74
|
+
## A.3 โ Configure conversationally (the AX-Native part)
|
|
66
75
|
|
|
67
|
-
|
|
76
|
+
After the .mcpb is installed (with or without blank fields), the user opens Claude chat and says something like *"configure p58-n8n"* or *"finish setting up p58-n8n"*.
|
|
68
77
|
|
|
69
|
-
|
|
70
|
-
```bash
|
|
71
|
-
echo $N8N_API_URL
|
|
72
|
-
echo $N8N_API_BASE_URL
|
|
73
|
-
echo $N8N_HOST
|
|
74
|
-
```
|
|
78
|
+
**Your loop:**
|
|
75
79
|
|
|
76
|
-
|
|
77
|
-
|
|
78
|
-
|
|
79
|
-
|
|
80
|
-
|
|
81
|
-
|
|
82
|
-
|
|
80
|
+
1. Call `setup_check`. The response tells you exactly what's missing โ `n8n_configured: false` if no n8n URL+key, `access_mode: "free"` if no premium token, etc.
|
|
81
|
+
2. For each missing field, ask the user **one question at a time**. Don't dump all 7 fields on them.
|
|
82
|
+
3. After the user gives you a value, tell them exactly where to paste it:
|
|
83
|
+
> *"Paste that into the **n8n_api_url** field of the p58-n8n extension settings. Open Claude Desktop โ Settings โ Extensions โ p58-n8n โ Configure. Click Save when you've pasted it. Let me know when done."*
|
|
84
|
+
4. When they say "done," call `setup_check` again. Confirm it shows the new value registered. Move to the next field.
|
|
85
|
+
5. **Search before asking** when possible โ try common locations for credentials so you don't ask for things the user already has stored. See ยง Credential search (below).
|
|
86
|
+
6. Stop when `setup_check` returns `n8n_configured: true` AND the user's intended `access_mode` is achieved (`premium` if they have a P58 token, `free` if not).
|
|
87
|
+
|
|
88
|
+
**Order of fields to ask about (in priority):**
|
|
89
|
+
|
|
90
|
+
| Field | Why ask | Skip if |
|
|
91
|
+
|---|---|---|
|
|
92
|
+
| `n8n_api_url` | Required for build/deploy/test | User has no n8n / doesn't want to connect one |
|
|
93
|
+
| `n8n_api_key` | Pairs with the URL | (same as above) |
|
|
94
|
+
| `p58_access_token` | Unlocks premium enriched catalog | User has no token |
|
|
95
|
+
| `cf_access_client_id` + `cf_access_client_secret` | Only if their n8n is behind Cloudflare Access | Pair-test shows no 302 to cloudflareaccess.com |
|
|
96
|
+
| `n8n_user_email` + `n8n_user_password` | Optional โ enables clean `test_credential` + run-and-verify | User doesn't need credential testing |
|
|
97
|
+
|
|
98
|
+
After every Save โ restart, the `.mcpb` extension reloads with the new env vars and `setup_check` reflects them. Don't proceed until verified.
|
|
99
|
+
|
|
100
|
+
## A.4 โ Credential search (search before asking)
|
|
101
|
+
|
|
102
|
+
Before asking the user for `N8N_API_KEY` or `P58_ACCESS_TOKEN`, search common locations:
|
|
83
103
|
|
|
84
|
-
### Method C: Check Docker containers
|
|
85
104
|
```bash
|
|
86
|
-
|
|
87
|
-
|
|
105
|
+
# .env files in the user's current directory or common project paths
|
|
106
|
+
grep -rl "N8N_API_KEY" . --include=".env*" 2>/dev/null
|
|
107
|
+
grep -rl "P58_ACCESS_TOKEN" . --include=".env*" 2>/dev/null
|
|
108
|
+
|
|
109
|
+
# Sibling MCP configs (they may have it set there from a prior install)
|
|
110
|
+
~/Library/Application\ Support/Claude/claude_desktop_config.json
|
|
111
|
+
~/.cursor/mcp.json
|
|
112
|
+
.vscode/mcp.json
|
|
113
|
+
|
|
114
|
+
# Secret managers
|
|
115
|
+
op item list 2>/dev/null | grep -i n8n # 1Password
|
|
116
|
+
security find-generic-password -s n8n 2>/dev/null # macOS Keychain
|
|
88
117
|
```
|
|
89
118
|
|
|
90
|
-
|
|
119
|
+
If you find values, **confirm with the user** before using them ("I found an N8N_API_KEY in your `.env` โ want me to use it?"). Don't autofill secrets without consent.
|
|
120
|
+
|
|
121
|
+
## A.5 โ Validate the pairing โ **before** declaring config done
|
|
122
|
+
|
|
123
|
+
A valid-looking key against the wrong instance fails silently. After the user fills `n8n_api_url` + `n8n_api_key`, before announcing success, pair-test:
|
|
124
|
+
|
|
91
125
|
```bash
|
|
92
|
-
|
|
126
|
+
curl -s -o /dev/null -w "%{http_code}" "$N8N_API_URL/workflows?limit=1" -H "X-N8N-API-KEY: $KEY" -L
|
|
93
127
|
```
|
|
94
128
|
|
|
95
|
-
|
|
96
|
-
|
|
129
|
+
| Result | Meaning | Action |
|
|
130
|
+
|---|---|---|
|
|
131
|
+
| `200` | Correct pair | โ
Tell user, move on |
|
|
132
|
+
| `401 {"message":"invalid signature"}` | Valid JWT, **wrong instance** (e.g. prod key vs local n8n) | Re-pair: "the key is real but points at a different n8n than the URL you gave me. Which is right?" |
|
|
133
|
+
| `401 {"message":"unauthorized"}` | Wrong/expired key | Ask user to mint a fresh one: n8n โ Settings โ API โ Create API Key |
|
|
134
|
+
| `302` โ `*.cloudflareaccess.com` | n8n is **behind Cloudflare Access** | Trigger the CF-Access branch (ask for `CF_ACCESS_CLIENT_ID` + `CF_ACCESS_CLIENT_SECRET`) |
|
|
97
135
|
|
|
98
|
-
|
|
136
|
+
> If `setup_check` says `n8n_configured: true` but the curl pair-test fails, trust the curl. The server may be caching the previous successful test. Re-test after any field change.
|
|
99
137
|
|
|
100
138
|
---
|
|
101
139
|
|
|
102
|
-
|
|
140
|
+
# Path B โ JSON config (advanced / power users)
|
|
103
141
|
|
|
104
|
-
|
|
142
|
+
Use this path when:
|
|
143
|
+
- The user is on Claude Code CLI (`claude` in terminal)
|
|
144
|
+
- The user is on Cursor / Windsurf / VS Code Copilot / Codex / Antigravity
|
|
145
|
+
- The user explicitly wants to manage `claude_desktop_config.json` themselves
|
|
105
146
|
|
|
106
|
-
|
|
107
|
-
1. Open n8n in your browser (the URL from Step 2, without `/api/v1`)
|
|
108
|
-
2. Go to **Settings โ API Keys** (or **Settings โ n8n API**)
|
|
109
|
-
3. Click **Create an API key**
|
|
110
|
-
4. Copy the key โ it starts with `eyJ...` (JWT format)
|
|
111
|
-
5. Share it with me so I can add it to your config
|
|
147
|
+
## B.1 โ Detect the MCP client
|
|
112
148
|
|
|
113
|
-
|
|
149
|
+
| Client | Config file | OS |
|
|
150
|
+
|---|---|---|
|
|
151
|
+
| **Claude Desktop** | `~/Library/Application Support/Claude/claude_desktop_config.json` | macOS |
|
|
152
|
+
| **Claude Desktop** | `%APPDATA%\Claude\claude_desktop_config.json` | Windows |
|
|
153
|
+
| **Claude Desktop** | `~/.config/Claude/claude_desktop_config.json` | Linux |
|
|
154
|
+
| **Claude Code** | `claude mcp add` CLI | All |
|
|
155
|
+
| **VS Code** | `.vscode/mcp.json` (uses `"servers"` key, not `"mcpServers"`) | All |
|
|
156
|
+
| **Cursor** | `~/.cursor/mcp.json` | All |
|
|
157
|
+
| **Windsurf** | `~/.codeium/windsurf/mcp_config.json` | All |
|
|
158
|
+
| **Codex (OpenAI)** | `~/.codex/config.toml` (**TOML**, not JSON) | All |
|
|
159
|
+
| **Antigravity (Google)** | `~/.gemini/antigravity/mcp_config.json` (needs global install + full paths) | All |
|
|
114
160
|
|
|
115
|
-
|
|
161
|
+
## B.2 โ Resolve absolute path to `npx` (CRITICAL on macOS)
|
|
116
162
|
|
|
117
|
-
|
|
163
|
+
Desktop apps on macOS don't inherit your shell's PATH. Bare `npx` in MCP config **silently fails** with `Failed to spawn process: No such file or directory` because the app searches only `/usr/local/bin:/usr/bin:/bin:/sbin` โ but Homebrew Node lives in `/opt/homebrew/bin/npx` and nvm Node lives in `~/.nvm/versions/node/vX.Y.Z/bin/npx`.
|
|
118
164
|
|
|
119
|
-
|
|
165
|
+
**ALWAYS resolve to the absolute path before writing the config:**
|
|
120
166
|
|
|
121
|
-
|
|
122
|
-
|
|
167
|
+
```bash
|
|
168
|
+
NPX_PATH="$(command -v npx)"
|
|
169
|
+
echo "Using: $NPX_PATH"
|
|
170
|
+
# Use $NPX_PATH below โ NEVER write the bare word "npx" in the command field.
|
|
171
|
+
```
|
|
123
172
|
|
|
124
|
-
|
|
173
|
+
If `command -v npx` returns nothing, Node isn't installed. Tell the user:
|
|
174
|
+
> *"Node isn't installed. Install it first: `brew install node` on macOS (or download from nodejs.org), then run this guide again."*
|
|
125
175
|
|
|
126
|
-
|
|
127
|
-
- These credentials are stored in the MCP config file alongside the API key (same security model)
|
|
128
|
-
- The MCP server never logs credentials โ they are only used to obtain a session cookie from n8n
|
|
129
|
-
- The session cookie is ephemeral and not persisted to disk
|
|
130
|
-
- If the user is uncomfortable storing their password in the config, they can omit it and provide credentials per-call when using `test_credential`
|
|
176
|
+
## B.3 โ Find the user's n8n instance
|
|
131
177
|
|
|
132
|
-
|
|
178
|
+
Same as A.4 + try environment variables and standard ports:
|
|
133
179
|
|
|
134
|
-
|
|
135
|
-
|
|
136
|
-
{
|
|
137
|
-
|
|
138
|
-
|
|
139
|
-
"command": "sh",
|
|
140
|
-
"args": ["-c", "N8N_API_KEY=$(op read 'op://Vault/n8n/api-key') N8N_USER_EMAIL=$(op read 'op://Vault/n8n/email') N8N_USER_PASSWORD=$(op read 'op://Vault/n8n/password') N8N_API_URL=http://localhost:5678/api/v1 npx -y @path58/p58-n8n"]
|
|
141
|
-
}
|
|
142
|
-
}
|
|
143
|
-
}
|
|
180
|
+
```bash
|
|
181
|
+
echo "$N8N_API_URL"; echo "$N8N_API_BASE_URL"; echo "$N8N_HOST"
|
|
182
|
+
curl -s -o /dev/null -w "%{http_code}" http://localhost:5678/api/v1/workflows
|
|
183
|
+
docker ps --filter "name=n8n" --format "{{.Ports}}"
|
|
184
|
+
ps aux | grep -i n8n | grep -v grep
|
|
144
185
|
```
|
|
145
|
-
This way no secrets are stored in the config file โ they're fetched from 1Password at startup with biometric approval.
|
|
146
186
|
|
|
147
|
-
|
|
187
|
+
If none work, ask: *"What's the URL of your n8n instance? (e.g. `http://localhost:5678` or `https://n8n.example.com`)"*
|
|
148
188
|
|
|
149
|
-
|
|
189
|
+
> The API URL must include the `/api/v1` suffix.
|
|
150
190
|
|
|
151
|
-
|
|
191
|
+
## B.4 โ Get credentials
|
|
152
192
|
|
|
153
|
-
|
|
193
|
+
Same as A.4 (search-first, then ask).
|
|
194
|
+
|
|
195
|
+
## B.5 โ Pair-test (before writing config)
|
|
196
|
+
|
|
197
|
+
Same as A.5.
|
|
198
|
+
|
|
199
|
+
## B.6 โ Write the configuration
|
|
200
|
+
|
|
201
|
+
Add p58-n8n inside the existing `mcpServers` object โ **do not overwrite other servers.** Use the **absolute** npx path you resolved in B.2.
|
|
202
|
+
|
|
203
|
+
### Claude Desktop / Cursor / Windsurf (JSON)
|
|
154
204
|
|
|
155
|
-
**Full config (with n8n):**
|
|
156
205
|
```json
|
|
157
206
|
{
|
|
158
207
|
"mcpServers": {
|
|
159
208
|
"p58-n8n": {
|
|
160
|
-
"command": "npx",
|
|
161
|
-
"args": ["-y", "@path58/p58-n8n"],
|
|
209
|
+
"command": "/opt/homebrew/bin/npx",
|
|
210
|
+
"args": ["-y", "@path58/p58-n8n@0.2.20-demo.9"],
|
|
162
211
|
"env": {
|
|
163
|
-
"N8N_API_URL": "
|
|
164
|
-
"N8N_API_KEY": "<
|
|
165
|
-
"
|
|
166
|
-
"N8N_USER_PASSWORD": "<n8n-login-password>"
|
|
212
|
+
"N8N_API_URL": "https://YOUR-n8n-host/api/v1",
|
|
213
|
+
"N8N_API_KEY": "<n8n-api-key>",
|
|
214
|
+
"P58_ACCESS_TOKEN": "<premium-token-if-you-have-one>"
|
|
167
215
|
}
|
|
168
216
|
}
|
|
169
217
|
}
|
|
170
218
|
}
|
|
171
219
|
```
|
|
172
220
|
|
|
173
|
-
|
|
174
|
-
|
|
175
|
-
|
|
176
|
-
|
|
177
|
-
|
|
178
|
-
|
|
179
|
-
|
|
180
|
-
|
|
181
|
-
|
|
182
|
-
|
|
221
|
+
> Replace `/opt/homebrew/bin/npx` with whatever `command -v npx` returned in B.2. Never write the bare `"npx"` string here.
|
|
222
|
+
|
|
223
|
+
### VS Code
|
|
224
|
+
|
|
225
|
+
Top-level key is `"servers"` (not `"mcpServers"`), and add `"type": "stdio"`.
|
|
226
|
+
|
|
227
|
+
### Claude Code (CLI)
|
|
228
|
+
|
|
229
|
+
```bash
|
|
230
|
+
NPX_PATH="$(command -v npx)"
|
|
231
|
+
claude mcp add p58-n8n \
|
|
232
|
+
-e N8N_API_URL=https://YOUR-n8n-host/api/v1 \
|
|
233
|
+
-e N8N_API_KEY=<n8n-api-key> \
|
|
234
|
+
-e P58_ACCESS_TOKEN=<premium-token-if-you-have-one> \
|
|
235
|
+
-- "$NPX_PATH" -y @path58/p58-n8n@0.2.20-demo.9
|
|
183
236
|
```
|
|
184
237
|
|
|
185
|
-
|
|
238
|
+
### Codex (TOML)
|
|
239
|
+
|
|
240
|
+
```toml
|
|
241
|
+
[mcpServers.p58-n8n]
|
|
242
|
+
command = "/opt/homebrew/bin/npx"
|
|
243
|
+
args = ["-y", "@path58/p58-n8n@0.2.20-demo.9"]
|
|
244
|
+
|
|
245
|
+
[mcpServers.p58-n8n.env]
|
|
246
|
+
N8N_API_URL = "https://YOUR-n8n-host/api/v1"
|
|
247
|
+
N8N_API_KEY = "<n8n-api-key>"
|
|
248
|
+
P58_ACCESS_TOKEN = "<premium-token-if-you-have-one>"
|
|
249
|
+
```
|
|
250
|
+
|
|
251
|
+
### Avoid plaintext secrets (optional)
|
|
252
|
+
|
|
253
|
+
To keep secrets out of `~/.claude.json` / config files, wrap them with a secret manager at launch:
|
|
254
|
+
|
|
186
255
|
```json
|
|
187
256
|
{
|
|
188
257
|
"mcpServers": {
|
|
189
258
|
"p58-n8n": {
|
|
190
|
-
"command": "
|
|
191
|
-
"args": ["-
|
|
192
|
-
"env": {
|
|
193
|
-
"N8N_API_URL": "http://localhost:5678/api/v1",
|
|
194
|
-
"N8N_API_KEY": "<paste-api-key-here>",
|
|
195
|
-
"P58_DATABASE_URL": "<friend-and-family-db-url>",
|
|
196
|
-
"P58_USER_EMAIL": "friend@example.com"
|
|
197
|
-
}
|
|
259
|
+
"command": "/bin/sh",
|
|
260
|
+
"args": ["-c", "N8N_API_KEY=$(op read 'op://Vault/n8n/api-key') P58_ACCESS_TOKEN=$(op read 'op://Vault/p58/access-token') N8N_API_URL=https://YOUR-n8n-host/api/v1 /opt/homebrew/bin/npx -y @path58/p58-n8n@0.2.20-demo.9"]
|
|
198
261
|
}
|
|
199
262
|
}
|
|
200
263
|
}
|
|
201
264
|
```
|
|
202
265
|
|
|
203
|
-
|
|
266
|
+
## B.7 โ Restart the client
|
|
204
267
|
|
|
205
|
-
|
|
206
|
-
|
|
207
|
-
|
|
208
|
-
|
|
209
|
-
|
|
210
|
-
|
|
211
|
-
-e N8N_USER_PASSWORD=<n8n-login-password> \
|
|
212
|
-
-- npx -y @path58/p58-n8n
|
|
213
|
-
```
|
|
268
|
+
| Client | Restart |
|
|
269
|
+
|---|---|
|
|
270
|
+
| **Claude Desktop** | Fully quit (Cmd+Q on macOS โ closing the window is not enough), reopen |
|
|
271
|
+
| **Claude Code** | Exit and restart the CLI session |
|
|
272
|
+
| **Cursor / Windsurf / VS Code** | Reload window / restart |
|
|
273
|
+
| **Codex / Antigravity** | Restart the app |
|
|
214
274
|
|
|
215
|
-
|
|
216
|
-
|
|
217
|
-
|
|
275
|
+
## B.8 โ Verify with `setup_check`
|
|
276
|
+
|
|
277
|
+
After restart, call `setup_check`. A healthy connected result shows:
|
|
278
|
+
- `access_mode: "premium"` (if a token is set) or `"free"`
|
|
279
|
+
- `n8n_configured: true` + `workflow_engine_connected: true`
|
|
280
|
+
- a `credential_count`, and `issues: []`
|
|
281
|
+
|
|
282
|
+
If `n8n_configured: false`, the URL/key pairing is wrong โ re-run ยง A.5.
|
|
283
|
+
|
|
284
|
+
---
|
|
285
|
+
|
|
286
|
+
# Step โ โ Proactively offer an opportunistic demo (BOTH paths)
|
|
287
|
+
|
|
288
|
+
The moment `setup_check` returns GREEN for the first time after install, **don't wait for the user to ask** what to do next. Discover what they have, propose a tailored workflow that pulls live data and delivers a visible result, and build it.
|
|
289
|
+
|
|
290
|
+
This is the "wow" moment of the install. Done well, the user goes from "ok it's connected" to "holy crap that worked" in 30 seconds.
|
|
291
|
+
|
|
292
|
+
## โ.1 โ Discover what the user has
|
|
293
|
+
|
|
294
|
+
Call `list_credentials`. Bucket each credential by capability:
|
|
295
|
+
|
|
296
|
+
```
|
|
297
|
+
DATASOURCE (preferred: PUBLIC APIs to avoid touching user data)
|
|
298
|
+
ZERO-CRED: HTTP request to public endpoints (no n8n credential needed):
|
|
299
|
+
- HackerNews top stories (hacker-news.firebaseio.com)
|
|
300
|
+
- Wikipedia daily featured (en.wikipedia.org/api)
|
|
301
|
+
- GitHub trending (api.github.com/search)
|
|
302
|
+
- Public RSS feeds
|
|
303
|
+
- boredapi.com, jsonplaceholder.typicode.com (test APIs)
|
|
304
|
+
- cat-facts API (catfact.ninja)
|
|
305
|
+
KEY-BASED public: openWeatherMap, serpApi, newsApi, perplexityApi,
|
|
306
|
+
coinMarketCap, exchangeRateApi
|
|
307
|
+
USER-DATA SaaS: notionApi, airtableApi, googleSheets, githubApi,
|
|
308
|
+
hubspotApi, salesforceApi, monday, supabase
|
|
309
|
+
USER DB: postgres, mysql, mongodb, microsoftSql, redis
|
|
310
|
+
|
|
311
|
+
AI
|
|
312
|
+
openAi, anthropic, googlePalmApi, mistralCloud, cohereApi,
|
|
313
|
+
openRouterApi, perplexityApi, huggingFaceApi
|
|
314
|
+
|
|
315
|
+
CHANNEL
|
|
316
|
+
slackApi, telegramApi, gmailOAuth2, discordApi, twilioApi,
|
|
317
|
+
microsoftOutlookOAuth2, microsoftTeams, sendGrid, mailgun
|
|
218
318
|
```
|
|
219
319
|
|
|
220
|
-
|
|
221
|
-
|
|
222
|
-
|
|
223
|
-
|
|
224
|
-
|
|
225
|
-
|
|
226
|
-
|
|
227
|
-
-- npx -y @path58/p58-n8n
|
|
320
|
+
## โ.2 โ Pick datasource using PUBLIC-FIRST priority ladder
|
|
321
|
+
|
|
322
|
+
```
|
|
323
|
+
1. ZERO-CRED public APIs โ works for everyone, never touches user data
|
|
324
|
+
2. KEY-BASED public APIs โ if user has e.g. openWeatherMap credential
|
|
325
|
+
3. USER-DATA SaaS โ ONLY with explicit consent ("want me to use your Notion?")
|
|
326
|
+
4. USER DB โ ONLY when user explicitly invites it
|
|
228
327
|
```
|
|
229
328
|
|
|
230
|
-
|
|
329
|
+
The default is always tier 1 or 2 (public data). Only escalate to user-data tiers if the user asks for richer demo with their own data.
|
|
231
330
|
|
|
232
|
-
##
|
|
331
|
+
## โ.3 โ Pick AI + Channel from their list
|
|
233
332
|
|
|
234
|
-
|
|
333
|
+
- AI: prefer Anthropic > OpenAI > others (any AI cred works)
|
|
334
|
+
- Channel: prefer Slack > Telegram > Gmail > Discord > whatever they have
|
|
235
335
|
|
|
236
|
-
|
|
237
|
-
|--------|---------------|
|
|
238
|
-
| **Claude Desktop** | Quit completely (Cmd+Q on macOS), then reopen |
|
|
239
|
-
| **Claude Code** | Exit and restart the CLI session |
|
|
240
|
-
| **Cursor** | Restart Cursor (Cmd+Shift+P โ Reload Window) |
|
|
241
|
-
| **Gemini CLI** | Exit and restart the CLI session, or use the MCP refresh command |
|
|
336
|
+
## โ.4 โ Propose ONE workflow before building
|
|
242
337
|
|
|
243
|
-
|
|
338
|
+
Tell the user concretely what you'd build, using THEIR actual tools by name:
|
|
244
339
|
|
|
245
|
-
|
|
340
|
+
> *"You've got OpenAI + Slack connected. I'd build a quick demo: pull the current top 5 HackerNews stories, have GPT-4 summarize them into a 3-sentence digest, and post to your Slack #general. ~15 seconds. Want me to go ahead?"*
|
|
246
341
|
|
|
247
|
-
|
|
342
|
+
| User has | Proposed demo (public-data default) |
|
|
343
|
+
|---|---|
|
|
344
|
+
| OpenAI + Slack | HackerNews top 5 โ GPT summarizes โ post to Slack |
|
|
345
|
+
| Anthropic + Telegram | Wikipedia daily featured โ Claude shortens to a tweet โ Telegram DM |
|
|
346
|
+
| OpenAI + Gmail | GitHub trending repos โ GPT picks 3 most relevant โ email summary |
|
|
347
|
+
| openWeatherMap + Anthropic + Slack | Tel Aviv weather โ Claude writes 2-line forecast with personality โ Slack |
|
|
348
|
+
| Just OpenAI (no channel) | Wikipedia featured โ GPT summary โ respond inline in chat |
|
|
349
|
+
| Just Slack (no AI) | OpenWeatherMap (free key) โ simple 2-node weather post |
|
|
248
350
|
|
|
249
|
-
|
|
351
|
+
If the user has user-data credentials (Notion, Airtable, Postgres) but ALSO has a public-data path available, **propose the public-data demo by default** and OFFER the richer one as an alternative:
|
|
250
352
|
|
|
251
|
-
|
|
252
|
-
Ask: "List n8n nodes for sending email"
|
|
253
|
-
- **Expected:** The LLM calls `list_nodes` and returns results
|
|
254
|
-
- **If tools not visible:** Config file has syntax error or wrong path
|
|
353
|
+
> *"Quick proof-of-life demo: HackerNews โ GPT โ Slack. If you want a more personalized one, I could pull from your Notion or query your Postgres instead โ just say the word."*
|
|
255
354
|
|
|
256
|
-
|
|
257
|
-
Ask: "Check n8n server health"
|
|
258
|
-
- **Expected:** `connected: true` with server version
|
|
259
|
-
- **If `connected: false`:** Check N8N_API_URL โ is n8n actually running at that address?
|
|
260
|
-
- **If `Authentication failed`:** Check N8N_API_KEY โ is it valid?
|
|
355
|
+
## โ.5 โ Build defensively
|
|
261
356
|
|
|
262
|
-
|
|
263
|
-
Ask: "List my n8n credentials"
|
|
264
|
-
- **Expected:** Returns list of configured credentials
|
|
265
|
-
- **If error:** API key may be expired or n8n needs restart
|
|
357
|
+
Once the user says yes:
|
|
266
358
|
|
|
267
|
-
|
|
359
|
+
1. **Use a webhook trigger** โ runs via public URL, no n8n session login needed for execution.
|
|
360
|
+
2. **Bind credentials by ID, not name** โ use the cred IDs from `list_credentials`.
|
|
361
|
+
3. **Hardcode explicit values** โ channel name, city, message text. Don't depend on payload defaults.
|
|
362
|
+
4. **Prefer version-stable nodes** โ Webhook, HTTP Request, Slack, OpenAI/Anthropic, Code over volatile LangChain nodes for the FIRST run.
|
|
363
|
+
5. **Cap at 3-5 nodes.** Don't get fancy โ the goal is "it runs and posts."
|
|
364
|
+
|
|
365
|
+
```
|
|
366
|
+
build_workflow โ returns workflow ID + canvas link
|
|
367
|
+
test_workflow โ returns sync execution result
|
|
368
|
+
```
|
|
369
|
+
|
|
370
|
+
On a config gap, read `failed_node` + `recovery_hint` and `partial_update_workflow` the fix, then re-test. Don't tell the user it failed if the side-effect actually landed.
|
|
268
371
|
|
|
269
|
-
##
|
|
372
|
+
## โ.6 โ Report honestly with evidence
|
|
270
373
|
|
|
271
|
-
|
|
272
|
-
|----------|-----------|-------------|-------------|
|
|
273
|
-
| `N8N_API_URL` | For Tier 2-7 tools | n8n instance API URL | See Step 2 above |
|
|
274
|
-
| `N8N_API_KEY` | For Tier 2-7 tools | n8n API authentication key | n8n โ Settings โ API Keys |
|
|
275
|
-
| `N8N_USER_EMAIL` | For `test_credential` | n8n login email (REST session auth) | Same email you use to log into n8n UI |
|
|
276
|
-
| `N8N_USER_PASSWORD` | For `test_credential` | n8n login password (REST session auth) | Same password you use to log into n8n UI |
|
|
277
|
-
| `P58_DATABASE_URL` | Optional | Friends & Family private intelligence connection | Provided directly by Path58 |
|
|
278
|
-
| `P58_USER_EMAIL` | Optional with `P58_DATABASE_URL` | Allowlist identity for unlocking private intelligence | Must match the allowlisted email |
|
|
374
|
+
โ
if the workflow actually delivered (Slack message landed, email arrived, etc.). Include the concrete proof:
|
|
279
375
|
|
|
280
|
-
>
|
|
376
|
+
> *"โ
Built workflow `YQcQOAy8IcG7zG6w`, test_workflow GREEN. Top story 'X' summarized and posted to #general at 09:42:13. Open the canvas: <link>."*
|
|
281
377
|
|
|
282
|
-
|
|
378
|
+
If `test_workflow` returned a session-auth false negative (see Step A.5 โ ๏ธ note) but the result actually landed in the channel, **say so plainly** โ don't claim failure when there's a real Slack message:
|
|
283
379
|
|
|
284
|
-
|
|
285
|
-
|
|
286
|
-
|
|
287
|
-
|
|
288
|
-
|
|
380
|
+
> *"It ran and the message should have arrived in #general. I couldn't run my verification pass without your n8n login, but check the channel โ it almost certainly landed."*
|
|
381
|
+
|
|
382
|
+
---
|
|
383
|
+
|
|
384
|
+
## Environment variables
|
|
385
|
+
|
|
386
|
+
| Variable | Required? | Purpose |
|
|
387
|
+
|----------|-----------|---------|
|
|
388
|
+
| `N8N_API_URL` | For build/deploy/test/credential tools | n8n API URL (include `/api/v1`); `N8N_API_BASE_URL` is a fallback |
|
|
389
|
+
| `N8N_API_KEY` | For build/deploy/test/credential tools | n8n API key (Settings โ API) |
|
|
390
|
+
| `P58_ACCESS_TOKEN` | For the enriched (premium) catalog | Path58 premium token; unlocks parameter/connection schemas |
|
|
391
|
+
| `N8N_USER_EMAIL` | Optional โ `test_credential` + clean run-and-verify | n8n web-UI login email (session auth). Workflows still run without it. |
|
|
392
|
+
| `N8N_USER_PASSWORD` | Optional โ `test_credential` + clean run-and-verify | n8n web-UI login password |
|
|
393
|
+
| `CF_ACCESS_CLIENT_ID` | Only if n8n is behind Cloudflare Access | CF Access service-token id |
|
|
394
|
+
| `CF_ACCESS_CLIENT_SECRET` | Only if n8n is behind Cloudflare Access | CF Access service-token secret |
|
|
395
|
+
|
|
396
|
+
> Without any env vars, the catalog discovery tools work from the bundled index.<sup>[[2]](#sources)</sup> `P58_DATABASE_URL` (direct-DB "dev" mode) is for Path58 internal use and is **not** part of customer installation.<sup>[[3]](#sources)</sup>
|
|
289
397
|
|
|
290
398
|
---
|
|
291
399
|
|
|
292
400
|
## Troubleshooting
|
|
293
401
|
|
|
294
402
|
| Symptom | Cause | Fix |
|
|
295
|
-
|
|
296
|
-
| Tools not appearing |
|
|
297
|
-
|
|
|
298
|
-
| "npx: command not found" | Node.js not installed |
|
|
299
|
-
|
|
|
300
|
-
|
|
|
301
|
-
| `
|
|
302
|
-
|
|
|
303
|
-
|
|
|
403
|
+
|---|---|---|
|
|
404
|
+
| Tools not appearing after install | `.mcpb` not installed OR JSON config broken | A: re-install .mcpb. B: validate JSON and absolute npx path (B.2) |
|
|
405
|
+
| `"Failed to spawn process: No such file or directory"` | Path B with bare `npx` โ Claude Desktop can't find it | Re-run B.2 to get absolute path; replace `"npx"` with that path in config |
|
|
406
|
+
| `"npx: command not found"` in logs | Node.js not installed at all | `brew install node` (or nodejs.org) |
|
|
407
|
+
| `setup_check` โ `n8n_configured: false` after Save | Wrong URL/key pairing | Re-run A.5 pair-test; check pair returns 200 |
|
|
408
|
+
| `401 invalid signature` from n8n | Valid key, wrong instance | Confirm URL matches the n8n that issued the key |
|
|
409
|
+
| `302` to cloudflareaccess.com | n8n behind Cloudflare Access | Add `CF_ACCESS_CLIENT_ID` + `CF_ACCESS_CLIENT_SECRET` |
|
|
410
|
+
| New env vars not taking effect | Process not restarted | Cmd+Q + reopen (Desktop) / exit + re-run (CLI) |
|
|
411
|
+
| `test_workflow` says fail but Slack/email got the message | Session-auth false negative (Step A.5 โ ๏ธ) | Set `N8N_USER_EMAIL` + `N8N_USER_PASSWORD`; or trust the side-effect |
|
|
304
412
|
|
|
305
413
|
---
|
|
306
414
|
|
|
307
|
-
##
|
|
308
|
-
|
|
309
|
-
Once installed, the user can ask their AI assistant to:
|
|
415
|
+
## Sources
|
|
310
416
|
|
|
311
|
-
|
|
312
|
-
|
|
313
|
-
|
|
314
|
-
|
|
315
|
-
|
|
417
|
+
1. **18 tools** โ `src/mcp/tools/index.ts` `TOOL_ENTRIES` (14 core + 4 credential-management; RAG-4.97.2 locked set).
|
|
418
|
+
2. **Bundled catalog counts** โ `src/data/public-catalog/manifest.json` (`bundle_type: public-basic`): 1,603 nodes / 14,805 operations / 679 credential types.
|
|
419
|
+
3. **Tier model** โ `src/mcp/runtime/access-mode.ts`: `P58_ACCESS_TOKEN` โ `premium`; `P58_DATABASE_URL` โ `dev` (internal); neither โ `free`.
|
|
420
|
+
4. **n8n engine env vars** โ `src/config/env.schema.ts` (`N8N_API_BASE_URL`/`N8N_API_KEY`/`N8N_USER_EMAIL`/`N8N_USER_PASSWORD`).
|
|
421
|
+
5. **Search-first discovery + validation loop** โ field report `MCP_INSTALL_FIELD_REPORT_2026-06-01` ยง6 (key discovery), ยง7 (pair-test matrix).
|
|
422
|
+
6. **Cloudflare Access headers** โ `src/shared/n8n-api-adapter.ts` injects `CF-Access-Client-Id`/`CF-Access-Client-Secret`.
|
|
316
423
|
|
|
317
424
|
---
|
|
318
425
|
|
|
319
|
-
**Package:** `@path58/p58-n8n`
|
|
426
|
+
**Package:** `@path58/p58-n8n` ยท **npm:** https://www.npmjs.com/package/@path58/p58-n8n ยท **Version:** 0.2.20-demo.9 (candidate)
|