@path58/n8n-mcp 0.1.0

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.
Files changed (319) hide show
  1. package/AGENT_INSTALL.md +223 -0
  2. package/CHANGELOG.md +38 -0
  3. package/LICENSE +21 -0
  4. package/README.md +187 -0
  5. package/dist/autofix/suggestion-fixers/deprecated-node-fixer.js +465 -0
  6. package/dist/autofix/suggestion-fixers/deprecated-node-fixer.js.map +1 -0
  7. package/dist/autofix/suggestion-fixers/fixer-registry.js +495 -0
  8. package/dist/autofix/suggestion-fixers/fixer-registry.js.map +1 -0
  9. package/dist/autofix/suggestion-fixers/l1-structure-fixer.js +639 -0
  10. package/dist/autofix/suggestion-fixers/l1-structure-fixer.js.map +1 -0
  11. package/dist/autofix/suggestion-fixers/l4-connection-fixer.js +449 -0
  12. package/dist/autofix/suggestion-fixers/l4-connection-fixer.js.map +1 -0
  13. package/dist/autofix/suggestion-fixers/l5-parameter-fixer.js +575 -0
  14. package/dist/autofix/suggestion-fixers/l5-parameter-fixer.js.map +1 -0
  15. package/dist/autofix/suggestion-fixers/l5-typeversion-fixer.js +431 -0
  16. package/dist/autofix/suggestion-fixers/l5-typeversion-fixer.js.map +1 -0
  17. package/dist/autofix/suggestion-fixers/l5-webhook-path-fixer.js +356 -0
  18. package/dist/autofix/suggestion-fixers/l5-webhook-path-fixer.js.map +1 -0
  19. package/dist/autofix/suggestion-fixers/l6-ai-tool-variant-fixer.js +618 -0
  20. package/dist/autofix/suggestion-fixers/l6-ai-tool-variant-fixer.js.map +1 -0
  21. package/dist/autofix/suggestion-fixers/l6-pattern-fixer.js +1475 -0
  22. package/dist/autofix/suggestion-fixers/l6-pattern-fixer.js.map +1 -0
  23. package/dist/autofix/suggestion-fixers/llm-fixer.js +716 -0
  24. package/dist/autofix/suggestion-fixers/llm-fixer.js.map +1 -0
  25. package/dist/autofix/suggestion-fixers/missing-credential-fixer.js +336 -0
  26. package/dist/autofix/suggestion-fixers/missing-credential-fixer.js.map +1 -0
  27. package/dist/autofix/suggestion-fixers/types.js +29 -0
  28. package/dist/autofix/suggestion-fixers/types.js.map +1 -0
  29. package/dist/autofix/suggestion-fixers/typo-fixer.js +197 -0
  30. package/dist/autofix/suggestion-fixers/typo-fixer.js.map +1 -0
  31. package/dist/classification/certification-engine.js +208 -0
  32. package/dist/classification/certification-engine.js.map +1 -0
  33. package/dist/classification/feedback-collector.js +516 -0
  34. package/dist/classification/feedback-collector.js.map +1 -0
  35. package/dist/classification/l5-parameter-analyzer.js +670 -0
  36. package/dist/classification/l5-parameter-analyzer.js.map +1 -0
  37. package/dist/classification/l6-graph-analyzer.js +613 -0
  38. package/dist/classification/l6-graph-analyzer.js.map +1 -0
  39. package/dist/classification/severity-classifier.js +237 -0
  40. package/dist/classification/severity-classifier.js.map +1 -0
  41. package/dist/config/env.js +280 -0
  42. package/dist/config/env.js.map +1 -0
  43. package/dist/config/env.schema.js +234 -0
  44. package/dist/config/env.schema.js.map +1 -0
  45. package/dist/config/scraperEnv.js +55 -0
  46. package/dist/config/scraperEnv.js.map +1 -0
  47. package/dist/db/postgresClient.js +38 -0
  48. package/dist/db/postgresClient.js.map +1 -0
  49. package/dist/db/scraperDb.js +6 -0
  50. package/dist/db/scraperDb.js.map +1 -0
  51. package/dist/db/scraperPostgresClient.js +118 -0
  52. package/dist/db/scraperPostgresClient.js.map +1 -0
  53. package/dist/db/validationRepository.js +55 -0
  54. package/dist/db/validationRepository.js.map +1 -0
  55. package/dist/db/validatorPostgresClient.js +248 -0
  56. package/dist/db/validatorPostgresClient.js.map +1 -0
  57. package/dist/db/workflowInstanceMappingRepository.js +128 -0
  58. package/dist/db/workflowInstanceMappingRepository.js.map +1 -0
  59. package/dist/errors/AppError.js +156 -0
  60. package/dist/errors/AppError.js.map +1 -0
  61. package/dist/errors/index.js +7 -0
  62. package/dist/errors/index.js.map +1 -0
  63. package/dist/factory/error-to-problem-mappers.js +385 -0
  64. package/dist/factory/error-to-problem-mappers.js.map +1 -0
  65. package/dist/factory/gap-recorder.js +260 -0
  66. package/dist/factory/gap-recorder.js.map +1 -0
  67. package/dist/factory/problem-recorder.js +94 -0
  68. package/dist/factory/problem-recorder.js.map +1 -0
  69. package/dist/factory/warning-to-gap-mappers.js +493 -0
  70. package/dist/factory/warning-to-gap-mappers.js.map +1 -0
  71. package/dist/factory/workflow-normalizer.js +247 -0
  72. package/dist/factory/workflow-normalizer.js.map +1 -0
  73. package/dist/mcp/adapters/catalog.js +13 -0
  74. package/dist/mcp/adapters/catalog.js.map +1 -0
  75. package/dist/mcp/adapters/index.js +36 -0
  76. package/dist/mcp/adapters/index.js.map +1 -0
  77. package/dist/mcp/adapters/supabase-catalog.js +467 -0
  78. package/dist/mcp/adapters/supabase-catalog.js.map +1 -0
  79. package/dist/mcp/adapters/test-catalog-adapter.js +100 -0
  80. package/dist/mcp/adapters/test-catalog-adapter.js.map +1 -0
  81. package/dist/mcp/adapters/validation.js +258 -0
  82. package/dist/mcp/adapters/validation.js.map +1 -0
  83. package/dist/mcp/build-email-workflow.js +113 -0
  84. package/dist/mcp/build-email-workflow.js.map +1 -0
  85. package/dist/mcp/config.js +22 -0
  86. package/dist/mcp/config.js.map +1 -0
  87. package/dist/mcp/formatters/errors.js +217 -0
  88. package/dist/mcp/formatters/errors.js.map +1 -0
  89. package/dist/mcp/formatters/index.js +12 -0
  90. package/dist/mcp/formatters/index.js.map +1 -0
  91. package/dist/mcp/formatters/response.js +141 -0
  92. package/dist/mcp/formatters/response.js.map +1 -0
  93. package/dist/mcp/quick-test.js +33 -0
  94. package/dist/mcp/quick-test.js.map +1 -0
  95. package/dist/mcp/server.js +70 -0
  96. package/dist/mcp/server.js.map +1 -0
  97. package/dist/mcp/test-mcp-error.js +81 -0
  98. package/dist/mcp/test-mcp-error.js.map +1 -0
  99. package/dist/mcp/test-mcp.js +80 -0
  100. package/dist/mcp/test-mcp.js.map +1 -0
  101. package/dist/mcp/tools/fixes/expression-fixes.js +166 -0
  102. package/dist/mcp/tools/fixes/expression-fixes.js.map +1 -0
  103. package/dist/mcp/tools/fixes/flow-fixes.js +155 -0
  104. package/dist/mcp/tools/fixes/flow-fixes.js.map +1 -0
  105. package/dist/mcp/tools/fixes/index.js +91 -0
  106. package/dist/mcp/tools/fixes/index.js.map +1 -0
  107. package/dist/mcp/tools/fixes/node-fixes.js +233 -0
  108. package/dist/mcp/tools/fixes/node-fixes.js.map +1 -0
  109. package/dist/mcp/tools/fixes/parameter-fixes.js +277 -0
  110. package/dist/mcp/tools/fixes/parameter-fixes.js.map +1 -0
  111. package/dist/mcp/tools/fixes/types.js +10 -0
  112. package/dist/mcp/tools/fixes/types.js.map +1 -0
  113. package/dist/mcp/tools/handlers/check-parameter.js +300 -0
  114. package/dist/mcp/tools/handlers/check-parameter.js.map +1 -0
  115. package/dist/mcp/tools/handlers/find-similar-pattern.js +121 -0
  116. package/dist/mcp/tools/handlers/find-similar-pattern.js.map +1 -0
  117. package/dist/mcp/tools/handlers/get-node-info.js +131 -0
  118. package/dist/mcp/tools/handlers/get-node-info.js.map +1 -0
  119. package/dist/mcp/tools/handlers/get-operation-schema.js +141 -0
  120. package/dist/mcp/tools/handlers/get-operation-schema.js.map +1 -0
  121. package/dist/mcp/tools/handlers/list-nodes.js +126 -0
  122. package/dist/mcp/tools/handlers/list-nodes.js.map +1 -0
  123. package/dist/mcp/tools/handlers/list-operations.js +138 -0
  124. package/dist/mcp/tools/handlers/list-operations.js.map +1 -0
  125. package/dist/mcp/tools/handlers/suggest-fix.js +120 -0
  126. package/dist/mcp/tools/handlers/suggest-fix.js.map +1 -0
  127. package/dist/mcp/tools/handlers/validate-workflow.js +92 -0
  128. package/dist/mcp/tools/handlers/validate-workflow.js.map +1 -0
  129. package/dist/mcp/tools/index.js +190 -0
  130. package/dist/mcp/tools/index.js.map +1 -0
  131. package/dist/mcp/tools/schemas.js +195 -0
  132. package/dist/mcp/tools/schemas.js.map +1 -0
  133. package/dist/mcp/tools/validate.js +95 -0
  134. package/dist/mcp/tools/validate.js.map +1 -0
  135. package/dist/mcp/types/mcp.js +7 -0
  136. package/dist/mcp/types/mcp.js.map +1 -0
  137. package/dist/mcp/utils/timeout.js +78 -0
  138. package/dist/mcp/utils/timeout.js.map +1 -0
  139. package/dist/services/BatchProcessor.js +433 -0
  140. package/dist/services/BatchProcessor.js.map +1 -0
  141. package/dist/services/CheckpointManager.js +281 -0
  142. package/dist/services/CheckpointManager.js.map +1 -0
  143. package/dist/services/CostCalculator.js +211 -0
  144. package/dist/services/CostCalculator.js.map +1 -0
  145. package/dist/services/EmbeddingCache.js +68 -0
  146. package/dist/services/EmbeddingCache.js.map +1 -0
  147. package/dist/services/EmbeddingService.js +143 -0
  148. package/dist/services/EmbeddingService.js.map +1 -0
  149. package/dist/services/RankingService.js +81 -0
  150. package/dist/services/RankingService.js.map +1 -0
  151. package/dist/services/RedisCache.js +376 -0
  152. package/dist/services/RedisCache.js.map +1 -0
  153. package/dist/services/RedisCatalogCache.js +680 -0
  154. package/dist/services/RedisCatalogCache.js.map +1 -0
  155. package/dist/services/ResumeManager.js +252 -0
  156. package/dist/services/ResumeManager.js.map +1 -0
  157. package/dist/services/SearchService.js +282 -0
  158. package/dist/services/SearchService.js.map +1 -0
  159. package/dist/services/SemanticCatalogSearch.js +405 -0
  160. package/dist/services/SemanticCatalogSearch.js.map +1 -0
  161. package/dist/services/ValidationCache.js +157 -0
  162. package/dist/services/ValidationCache.js.map +1 -0
  163. package/dist/services/WorkflowPipelineService.js +1997 -0
  164. package/dist/services/WorkflowPipelineService.js.map +1 -0
  165. package/dist/services/catalog/index.js +34 -0
  166. package/dist/services/catalog/index.js.map +1 -0
  167. package/dist/services/catalog/interfaces.js +17 -0
  168. package/dist/services/catalog/interfaces.js.map +1 -0
  169. package/dist/services/catalog/loaders.js +169 -0
  170. package/dist/services/catalog/loaders.js.map +1 -0
  171. package/dist/services/catalog/types.js +138 -0
  172. package/dist/services/catalog/types.js.map +1 -0
  173. package/dist/services/documentation-normalization/docUrlUtils.js +88 -0
  174. package/dist/services/documentation-normalization/docUrlUtils.js.map +1 -0
  175. package/dist/services/error-quality/ErrorQualityService.js +262 -0
  176. package/dist/services/error-quality/ErrorQualityService.js.map +1 -0
  177. package/dist/services/error-quality/analyzers/CredentialAnalyzer.js +260 -0
  178. package/dist/services/error-quality/analyzers/CredentialAnalyzer.js.map +1 -0
  179. package/dist/services/error-quality/analyzers/IssuePredictor.js +380 -0
  180. package/dist/services/error-quality/analyzers/IssuePredictor.js.map +1 -0
  181. package/dist/services/error-quality/analyzers/MockCoverageAnalyzer.js +267 -0
  182. package/dist/services/error-quality/analyzers/MockCoverageAnalyzer.js.map +1 -0
  183. package/dist/services/error-quality/data/ErrorPatternSeeder.js +963 -0
  184. package/dist/services/error-quality/data/ErrorPatternSeeder.js.map +1 -0
  185. package/dist/services/error-quality/index.js +25 -0
  186. package/dist/services/error-quality/index.js.map +1 -0
  187. package/dist/services/error-quality/reports/ReportGenerator.js +343 -0
  188. package/dist/services/error-quality/reports/ReportGenerator.js.map +1 -0
  189. package/dist/services/error-quality/taxonomy/ErrorTaxonomy.js +698 -0
  190. package/dist/services/error-quality/taxonomy/ErrorTaxonomy.js.map +1 -0
  191. package/dist/services/error-quality/types.js +11 -0
  192. package/dist/services/error-quality/types.js.map +1 -0
  193. package/dist/services/progress/ProgressTracker.js +288 -0
  194. package/dist/services/progress/ProgressTracker.js.map +1 -0
  195. package/dist/services/progress/formatters.js +122 -0
  196. package/dist/services/progress/formatters.js.map +1 -0
  197. package/dist/services/progress/index.js +36 -0
  198. package/dist/services/progress/index.js.map +1 -0
  199. package/dist/services/progress/types.js +7 -0
  200. package/dist/services/progress/types.js.map +1 -0
  201. package/dist/services/search/embeddingGenerator.js +112 -0
  202. package/dist/services/search/embeddingGenerator.js.map +1 -0
  203. package/dist/types/aiCapabilities.js +7 -0
  204. package/dist/types/aiCapabilities.js.map +1 -0
  205. package/dist/types/aiConfigSchema.js +7 -0
  206. package/dist/types/aiConfigSchema.js.map +1 -0
  207. package/dist/utils/bannerLogger.js +186 -0
  208. package/dist/utils/bannerLogger.js.map +1 -0
  209. package/dist/utils/bannerService.js +23 -0
  210. package/dist/utils/bannerService.js.map +1 -0
  211. package/dist/utils/bannerServiceAdapter.js +54 -0
  212. package/dist/utils/bannerServiceAdapter.js.map +1 -0
  213. package/dist/utils/batchLogger.js +171 -0
  214. package/dist/utils/batchLogger.js.map +1 -0
  215. package/dist/utils/bottomStickyBanner.js +239 -0
  216. package/dist/utils/bottomStickyBanner.js.map +1 -0
  217. package/dist/utils/credentialMatcher.js +206 -0
  218. package/dist/utils/credentialMatcher.js.map +1 -0
  219. package/dist/utils/credentialNormalizer.js +442 -0
  220. package/dist/utils/credentialNormalizer.js.map +1 -0
  221. package/dist/utils/integratedBannerLogger.js +59 -0
  222. package/dist/utils/integratedBannerLogger.js.map +1 -0
  223. package/dist/utils/n8nSourceGit.js +195 -0
  224. package/dist/utils/n8nSourceGit.js.map +1 -0
  225. package/dist/utils/nodeTypeNormalizer.js +131 -0
  226. package/dist/utils/nodeTypeNormalizer.js.map +1 -0
  227. package/dist/utils/openaiClient.js +397 -0
  228. package/dist/utils/openaiClient.js.map +1 -0
  229. package/dist/utils/productionLogger.js +16 -0
  230. package/dist/utils/productionLogger.js.map +1 -0
  231. package/dist/utils/progressBarBanner.js +132 -0
  232. package/dist/utils/progressBarBanner.js.map +1 -0
  233. package/dist/utils/scriptHeartbeat.js +117 -0
  234. package/dist/utils/scriptHeartbeat.js.map +1 -0
  235. package/dist/utils/scriptLogger.js +125 -0
  236. package/dist/utils/scriptLogger.js.map +1 -0
  237. package/dist/utils/scriptRunner.js +95 -0
  238. package/dist/utils/scriptRunner.js.map +1 -0
  239. package/dist/utils/scriptTimeout.js +128 -0
  240. package/dist/utils/scriptTimeout.js.map +1 -0
  241. package/dist/utils/scriptWrapper.js +219 -0
  242. package/dist/utils/scriptWrapper.js.map +1 -0
  243. package/dist/utils/stickyBanner.js +226 -0
  244. package/dist/utils/stickyBanner.js.map +1 -0
  245. package/dist/utils/terminalSpinner.js +97 -0
  246. package/dist/utils/terminalSpinner.js.map +1 -0
  247. package/dist/utils/threeLineBanner.js +427 -0
  248. package/dist/utils/threeLineBanner.js.map +1 -0
  249. package/dist/utils/validatorCheckpointManager.js +170 -0
  250. package/dist/utils/validatorCheckpointManager.js.map +1 -0
  251. package/dist/utils/validatorConnectionManager.js +124 -0
  252. package/dist/utils/validatorConnectionManager.js.map +1 -0
  253. package/dist/validation/catalog.js +56 -0
  254. package/dist/validation/catalog.js.map +1 -0
  255. package/dist/validation/config/deprecated-nodes.js +234 -0
  256. package/dist/validation/config/deprecated-nodes.js.map +1 -0
  257. package/dist/validation/config/l6-severity.js +227 -0
  258. package/dist/validation/config/l6-severity.js.map +1 -0
  259. package/dist/validation/config/terminal-nodes.js +132 -0
  260. package/dist/validation/config/terminal-nodes.js.map +1 -0
  261. package/dist/validation/config/unreachable-nodes.js +67 -0
  262. package/dist/validation/config/unreachable-nodes.js.map +1 -0
  263. package/dist/validation/core.js +47 -0
  264. package/dist/validation/core.js.map +1 -0
  265. package/dist/validation/docExtraction.js +12 -0
  266. package/dist/validation/docExtraction.js.map +1 -0
  267. package/dist/validation/dryRunMockRunner.js +128 -0
  268. package/dist/validation/dryRunMockRunner.js.map +1 -0
  269. package/dist/validation/fixtureEngine.js +61 -0
  270. package/dist/validation/fixtureEngine.js.map +1 -0
  271. package/dist/validation/index.js +15 -0
  272. package/dist/validation/index.js.map +1 -0
  273. package/dist/validation/k-levels/k2-blockers.js +222 -0
  274. package/dist/validation/k-levels/k2-blockers.js.map +1 -0
  275. package/dist/validation/l1-structure.js +296 -0
  276. package/dist/validation/l1-structure.js.map +1 -0
  277. package/dist/validation/l2-nodes.js +282 -0
  278. package/dist/validation/l2-nodes.js.map +1 -0
  279. package/dist/validation/l3-credentials.js +322 -0
  280. package/dist/validation/l3-credentials.js.map +1 -0
  281. package/dist/validation/l4-connections.js +698 -0
  282. package/dist/validation/l4-connections.js.map +1 -0
  283. package/dist/validation/l5-parameters.js +803 -0
  284. package/dist/validation/l5-parameters.js.map +1 -0
  285. package/dist/validation/l6-checks/ai-tool-variants.js +407 -0
  286. package/dist/validation/l6-checks/ai-tool-variants.js.map +1 -0
  287. package/dist/validation/l6-checks/catalog-checks.js +260 -0
  288. package/dist/validation/l6-checks/catalog-checks.js.map +1 -0
  289. package/dist/validation/l6-checks/data-contracts.js +197 -0
  290. package/dist/validation/l6-checks/data-contracts.js.map +1 -0
  291. package/dist/validation/l6-checks/deprecation.js +133 -0
  292. package/dist/validation/l6-checks/deprecation.js.map +1 -0
  293. package/dist/validation/l6-checks/error-handling.js +193 -0
  294. package/dist/validation/l6-checks/error-handling.js.map +1 -0
  295. package/dist/validation/l6-checks/expression-syntax.js +387 -0
  296. package/dist/validation/l6-checks/expression-syntax.js.map +1 -0
  297. package/dist/validation/l6-checks/flow-integrity.js +504 -0
  298. package/dist/validation/l6-checks/flow-integrity.js.map +1 -0
  299. package/dist/validation/l6-checks/index.js +106 -0
  300. package/dist/validation/l6-checks/index.js.map +1 -0
  301. package/dist/validation/l6-checks/loops.js +370 -0
  302. package/dist/validation/l6-checks/loops.js.map +1 -0
  303. package/dist/validation/l6-checks/performance.js +182 -0
  304. package/dist/validation/l6-checks/performance.js.map +1 -0
  305. package/dist/validation/l6-checks/security.js +273 -0
  306. package/dist/validation/l6-checks/security.js.map +1 -0
  307. package/dist/validation/l6-patterns.js +472 -0
  308. package/dist/validation/l6-patterns.js.map +1 -0
  309. package/dist/validation/mockLevelResolver.js +95 -0
  310. package/dist/validation/mockLevelResolver.js.map +1 -0
  311. package/dist/validation/n8nApiClient.js +21 -0
  312. package/dist/validation/n8nApiClient.js.map +1 -0
  313. package/dist/validation/n8nCli.js +87 -0
  314. package/dist/validation/n8nCli.js.map +1 -0
  315. package/dist/validation/types.js +8 -0
  316. package/dist/validation/types.js.map +1 -0
  317. package/dist/validation/usageStats.js +82 -0
  318. package/dist/validation/usageStats.js.map +1 -0
  319. package/package.json +274 -0
@@ -0,0 +1,223 @@
1
+ # P58-n8n — Drop & Install
2
+
3
+ **For users:** Drop this file into any AI chat and say: **"Install this MCP server for me"**
4
+
5
+ **For AI agents:** Follow the instructions in the AI AGENT section below.
6
+
7
+ ---
8
+
9
+ ## What you'll get
10
+
11
+ P58-n8n gives your AI assistant deep n8n workflow knowledge — 1,982 nodes, 40,179 operations, 26 auto-fix rules.
12
+
13
+ | Tool | What it does |
14
+ |------|-------------|
15
+ | `validate_workflow` | Run L1-L6 validation on workflow JSON |
16
+ | `get_operation_schema` | Get exact parameter requirements for any operation |
17
+ | `check_parameter` | Validate a parameter value with typo detection |
18
+ | `suggest_fix` | Get fix suggestions for validation issues |
19
+ | `list_nodes` | Browse and search 1,982 n8n nodes |
20
+ | `list_operations` | List all operations for a node type |
21
+ | `get_node_info` | Get comprehensive node metadata |
22
+ | `find_similar_pattern` | Search 9,000+ validated workflows |
23
+
24
+ ### Supported clients
25
+
26
+ | Client | Support | Transport |
27
+ |--------|---------|-----------|
28
+ | Claude Desktop (Chat + Cowork) | Primary | stdio |
29
+ | Claude Code (CLI) | Primary | stdio |
30
+ | Gemini CLI | Secondary | stdio |
31
+ | ChatGPT Desktop | Not supported | Requires HTTP/SSE |
32
+
33
+ ---
34
+
35
+ ## AI AGENT: Follow These Instructions
36
+
37
+ ### STEP 1 — Detect Environment
38
+
39
+ Determine your capabilities and the user's platform.
40
+
41
+ **Can you execute commands?**
42
+ ```
43
+ Can I run shell commands?
44
+ ├─ YES (Claude Code, Cowork mode, Gemini CLI) → Go to STEP 2a (Auto-Install)
45
+ └─ NO (Claude Desktop Chat-only) → Go to STEP 2b (Guided Install)
46
+ ```
47
+
48
+ **Detect platform:**
49
+ ```
50
+ What OS is the user on?
51
+ ├─ macOS → Config paths use ~/Library/Application Support/
52
+ ├─ Windows → Config paths use %APPDATA%\
53
+ └─ Linux → Config paths use ~/.config/
54
+ ```
55
+
56
+ ---
57
+
58
+ ### STEP 2a — Auto-Install (can run commands)
59
+
60
+ **Prerequisites — verify first:**
61
+
62
+ ```bash
63
+ node --version
64
+ # Must be v18.0.0 or higher. If not installed, tell the user to install from https://nodejs.org/
65
+ ```
66
+
67
+ **Then install based on which client the user wants:**
68
+
69
+ #### Claude Code
70
+
71
+ Run this single command:
72
+
73
+ ```bash
74
+ claude mcp add p58-n8n -- npx -y @path58/n8n-mcp
75
+ ```
76
+
77
+ Done. Skip to STEP 3.
78
+
79
+ #### Claude Desktop (Cowork mode — can write files)
80
+
81
+ Read the existing config file first, then MERGE the p58-n8n entry. NEVER overwrite the entire file.
82
+
83
+ **Config file paths:**
84
+ - macOS: `~/Library/Application Support/Claude/claude_desktop_config.json`
85
+ - Windows: `%APPDATA%\Claude\claude_desktop_config.json`
86
+ - Linux: `~/.config/Claude/claude_desktop_config.json`
87
+
88
+ **If file exists:** Read it, parse the JSON, add this entry inside `mcpServers`:
89
+
90
+ ```json
91
+ "p58-n8n": {
92
+ "command": "npx",
93
+ "args": ["-y", "@path58/n8n-mcp"]
94
+ }
95
+ ```
96
+
97
+ **If file doesn't exist:** Create it with:
98
+
99
+ ```json
100
+ {
101
+ "mcpServers": {
102
+ "p58-n8n": {
103
+ "command": "npx",
104
+ "args": ["-y", "@path58/n8n-mcp"]
105
+ }
106
+ }
107
+ }
108
+ ```
109
+
110
+ Tell the user to restart Claude Desktop.
111
+
112
+ #### Gemini CLI
113
+
114
+ There is NO `gemini mcp add` command. Edit the config file directly.
115
+
116
+ **Config path:** `~/.gemini/settings.json` (user-level) or `.gemini/settings.json` (project-level)
117
+
118
+ **If file exists:** Read it, parse JSON, add the `p58-n8n` entry inside `mcpServers`.
119
+
120
+ **If file doesn't exist:** Create it with:
121
+
122
+ ```json
123
+ {
124
+ "mcpServers": {
125
+ "p58-n8n": {
126
+ "command": "npx",
127
+ "args": ["-y", "@path58/n8n-mcp"]
128
+ }
129
+ }
130
+ }
131
+ ```
132
+
133
+ ---
134
+
135
+ ### STEP 2b — Guided Install (chat-only)
136
+
137
+ Ask the user which client they want to set up, then give them copy-paste instructions.
138
+
139
+ **Ask:** "Which AI client do you want to use P58-n8n with?"
140
+
141
+ #### For Claude Desktop
142
+
143
+ Tell the user:
144
+
145
+ 1. Open your Claude Desktop config file:
146
+ - **macOS:** `~/Library/Application Support/Claude/claude_desktop_config.json`
147
+ - **Windows:** `%APPDATA%\Claude\claude_desktop_config.json`
148
+ - **Linux:** `~/.config/Claude/claude_desktop_config.json`
149
+
150
+ 2. Add this inside the `mcpServers` object (create the file if it doesn't exist):
151
+
152
+ ```json
153
+ {
154
+ "mcpServers": {
155
+ "p58-n8n": {
156
+ "command": "npx",
157
+ "args": ["-y", "@path58/n8n-mcp"]
158
+ }
159
+ }
160
+ }
161
+ ```
162
+
163
+ 3. Restart Claude Desktop.
164
+
165
+ #### For Claude Code
166
+
167
+ Tell the user to run:
168
+
169
+ ```bash
170
+ claude mcp add p58-n8n -- npx -y @path58/n8n-mcp
171
+ ```
172
+
173
+ #### For Gemini CLI
174
+
175
+ Tell the user:
176
+
177
+ 1. Open `~/.gemini/settings.json` (create if needed)
178
+ 2. Add:
179
+
180
+ ```json
181
+ {
182
+ "mcpServers": {
183
+ "p58-n8n": {
184
+ "command": "npx",
185
+ "args": ["-y", "@path58/n8n-mcp"]
186
+ }
187
+ }
188
+ }
189
+ ```
190
+
191
+ #### For ChatGPT Desktop
192
+
193
+ Tell the user: **ChatGPT Desktop is not supported.** It requires HTTP/SSE transport for MCP servers, but P58-n8n uses stdio transport. This may be supported in a future version.
194
+
195
+ ---
196
+
197
+ ### STEP 3 — Verify Installation
198
+
199
+ After setup, test with this prompt:
200
+
201
+ > "List available n8n nodes for email"
202
+
203
+ **Expected result:** The AI calls `list_nodes` and returns nodes like `n8n-nodes-base.gmail`, `n8n-nodes-base.emailSend`, etc.
204
+
205
+ **If it doesn't work:**
206
+
207
+ ```
208
+ Tools not appearing?
209
+ ├─ Config file in wrong location → Check OS-specific paths above
210
+ ├─ Invalid JSON syntax → Validate with: cat <path> | python3 -m json.tool
211
+ ├─ Client not restarted → Close and reopen the AI client
212
+ ├─ npx not found → Install Node.js 18+ from https://nodejs.org/
213
+ └─ Permission error → Try: sudo npm install -g @path58/n8n-mcp
214
+
215
+ Server starts but tools don't work?
216
+ ├─ Database not accessible → Server needs network access to Supabase
217
+ ├─ Timeout errors → Check internet connection
218
+ └─ "Module not found" → Run: npm install -g @path58/n8n-mcp (reinstall)
219
+ ```
220
+
221
+ ---
222
+
223
+ **Package:** `@path58/n8n-mcp` | **License:** MIT | **Built by [Path58](https://path58.com)**
package/CHANGELOG.md ADDED
@@ -0,0 +1,38 @@
1
+ # Changelog
2
+
3
+ All notable changes to this project will be documented in this file.
4
+
5
+ The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.1.0/),
6
+ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html).
7
+
8
+ ## [0.1.0] - 2026-02-06
9
+
10
+ ### Added
11
+
12
+ - **MCP Server** with 8 tools for LLM integration via stdio transport
13
+ - `validate_workflow` — Full L1-L6 static validation pipeline
14
+ - `get_operation_schema` — Parameter requirements lookup for any node operation
15
+ - `check_parameter` — Real-time parameter validation against catalog
16
+ - `suggest_fix` — Concrete fix suggestions powered by 26 deterministic auto-fixers
17
+ - `list_operations` — Browse all operations for a given node type
18
+ - `list_nodes` — Search and browse 1,982 available n8n nodes
19
+ - `get_node_info` — Full node details, configuration, and metadata
20
+ - `find_similar_pattern` — Working examples from 9,178 real workflows
21
+ - **L1-L6 Static Validation Pipeline** (~1.4s total)
22
+ - L1: JSON structure, required fields, duplicate detection (~30ms)
23
+ - L2: Node type catalog validation (~60ms)
24
+ - L3: Credential type validation (~80ms)
25
+ - L4: Connection topology validation (~180ms)
26
+ - L5: Parameter configuration validation (~850ms)
27
+ - L6: Flow integrity, security, and expression patterns (~200ms)
28
+ - **AutoFix Infrastructure** with 26 deterministic fixers across L1-L6
29
+ - Zero LLM cost for automatic repairs
30
+ - 97%+ success rate on fixable errors
31
+ - **Node Catalog** with 1,982 nodes, 654 credential types, 40,179 operations
32
+ - **Pattern Library** with 9,178 real workflow patterns for discovery
33
+ - **Multi-client support** for Claude Desktop, Claude Code, and Gemini CLI
34
+ - **Drop-and-install** configuration via `AGENT_INSTALL.md`
35
+ - npm package published as `@path58/n8n-mcp`
36
+ - ESM module support with shebang for direct `npx` execution
37
+
38
+ [0.1.0]: https://github.com/tsvika58/n8n-workflow-validator/releases/tag/v0.1.0
package/LICENSE ADDED
@@ -0,0 +1,21 @@
1
+ MIT License
2
+
3
+ Copyright (c) 2026 Path58
4
+
5
+ Permission is hereby granted, free of charge, to any person obtaining a copy
6
+ of this software and associated documentation files (the "Software"), to deal
7
+ in the Software without restriction, including without limitation the rights
8
+ to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
9
+ copies of the Software, and to permit persons to whom the Software is
10
+ furnished to do so, subject to the following conditions:
11
+
12
+ The above copyright notice and this permission notice shall be included in all
13
+ copies or substantial portions of the Software.
14
+
15
+ THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
16
+ IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
17
+ FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
18
+ AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
19
+ LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
20
+ OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
21
+ SOFTWARE.
package/README.md ADDED
@@ -0,0 +1,187 @@
1
+ # P58-n8n — Path58's n8n MCP Server
2
+
3
+ **Enterprise-grade n8n workflow validation for LLMs**
4
+
5
+ [![npm](https://img.shields.io/npm/v/@path58/n8n-mcp)](https://www.npmjs.com/package/@path58/n8n-mcp)
6
+ [![License: MIT](https://img.shields.io/badge/License-MIT-blue.svg)](LICENSE)
7
+
8
+ P58-n8n gives your AI assistant deep knowledge of n8n — **1,982 nodes**, **40,179 operations**, and **26 auto-fix rules** — so it can build, validate, and fix workflows correctly the first time.
9
+
10
+ ---
11
+
12
+ ## Why P58-n8n?
13
+
14
+ | Metric | P58-n8n | n8n-mcp | Claude alone |
15
+ |--------|---------|---------|-------------|
16
+ | **Accuracy** | 63.6% | 59.1% | 42.0% |
17
+ | **Cost per prompt** | $0.25 | $0.76 | ~$0.05 |
18
+ | **Reliability** | 100% | 82% | 100% |
19
+ | **Token usage** | 1x | 3.2x | 0.3x |
20
+
21
+ > 4.5 percentage points more accurate, 67% cheaper, and 100% reliable.
22
+ > Benchmarked on 22 real-world workflow generation tasks.
23
+
24
+ ---
25
+
26
+ ## Quick Start (< 5 minutes)
27
+
28
+ ### 1. Configure your AI client
29
+
30
+ **Claude Code** (one command):
31
+
32
+ ```bash
33
+ claude mcp add p58-n8n -- npx -y @path58/n8n-mcp
34
+ ```
35
+
36
+ **Claude Desktop:**
37
+
38
+ Add to your `claude_desktop_config.json` ([find your config path](docs/INSTALLATION.md)):
39
+
40
+ ```json
41
+ {
42
+ "mcpServers": {
43
+ "p58-n8n": {
44
+ "command": "npx",
45
+ "args": ["-y", "@path58/n8n-mcp"]
46
+ }
47
+ }
48
+ }
49
+ ```
50
+
51
+ Then restart Claude Desktop.
52
+
53
+ **Gemini CLI, global install, and other options:** [docs/INSTALLATION.md](docs/INSTALLATION.md)
54
+
55
+ ### 2. Try it
56
+
57
+ Ask your AI assistant:
58
+
59
+ > "What nodes does n8n have for sending Slack messages?"
60
+
61
+ or
62
+
63
+ > "Validate this n8n workflow JSON for me: { ... }"
64
+
65
+ ---
66
+
67
+ ## 8 MCP Tools
68
+
69
+ ### Validation (4 tools)
70
+
71
+ | Tool | What it does |
72
+ |------|-------------|
73
+ | `validate_workflow` | Run L1-L6 validation on workflow JSON — structure, nodes, credentials, connections, parameters, and patterns |
74
+ | `get_operation_schema` | Get exact parameter requirements for any node operation — prevents hallucinated parameters |
75
+ | `check_parameter` | Validate a specific parameter value in real-time — type checking, enum validation, typo detection |
76
+ | `suggest_fix` | Get concrete fix suggestions for validation issues — rename, add, remove, or replace |
77
+
78
+ ### Discovery (4 tools)
79
+
80
+ | Tool | What it does |
81
+ |------|-------------|
82
+ | `list_nodes` | Browse and search 1,982 n8n nodes by category or keyword |
83
+ | `list_operations` | List all operations for a node type, grouped by resource |
84
+ | `get_node_info` | Get comprehensive node details — operations, credentials, properties |
85
+ | `find_similar_pattern` | Search 9,000+ validated workflows for working examples |
86
+
87
+ Full reference with input/output schemas: [docs/TOOLS.md](docs/TOOLS.md)
88
+
89
+ ---
90
+
91
+ ## What makes P58-n8n different
92
+
93
+ **Ground-truth catalog.** Every parameter, operation, and connection rule comes from the actual n8n node catalog — not LLM guesses.
94
+
95
+ **6-level validation.** L1 (structure) through L6 (flow patterns) catches problems before execution:
96
+
97
+ ```
98
+ L1 Structure → L2 Nodes → L3 Credentials → L4 Connections → L5 Parameters → L6 Patterns
99
+ ~30ms ~60ms ~80ms ~180ms ~850ms ~200ms
100
+ ```
101
+
102
+ Full pipeline: ~1.4 seconds.
103
+
104
+ **26 auto-fix rules.** Automatic repair for common issues — orphan connections, deprecated nodes, missing parameters, dead-end flows, and more.
105
+
106
+ **9,000+ validated workflows.** Real working examples your AI can reference when building new workflows.
107
+
108
+ ---
109
+
110
+ ## Usage Examples
111
+
112
+ See [docs/EXAMPLES.md](docs/EXAMPLES.md) for detailed walkthroughs:
113
+
114
+ 1. **Discover & Build** — Find the right nodes and build a Slack notification workflow
115
+ 2. **Validate & Fix** — Catch and repair issues in an existing workflow
116
+ 3. **Schema-Driven Generation** — Use operation schemas to generate correct parameters
117
+
118
+ ---
119
+
120
+ ## Architecture
121
+
122
+ P58-n8n runs as a local stdio MCP server. No API keys or cloud services required.
123
+
124
+ ```
125
+ AI Client (Claude/Gemini)
126
+ ↕ MCP Protocol (stdio)
127
+ P58-n8n Server
128
+
129
+ Validation Engine (L1-L6) + Node Catalog (1,982 nodes, 40,179 ops)
130
+ ```
131
+
132
+ See [docs/ARCHITECTURE.md](docs/ARCHITECTURE.md) for the full system design.
133
+
134
+ ---
135
+
136
+ ## Troubleshooting
137
+
138
+ ### Server not starting
139
+
140
+ ```bash
141
+ # Verify Node.js 18+
142
+ node --version
143
+
144
+ # Test the server directly
145
+ npx -y @path58/n8n-mcp
146
+ # Should start without errors (it waits for MCP input on stdio)
147
+ ```
148
+
149
+ ### Tools not appearing in Claude Desktop
150
+
151
+ 1. Restart Claude Desktop after editing config
152
+ 2. Check config file path is correct for your OS
153
+ 3. Verify JSON syntax — trailing commas break it
154
+
155
+ ### "Command not found" errors
156
+
157
+ ```bash
158
+ # Ensure Node.js and npx are available
159
+ which npx
160
+
161
+ # Or install globally instead
162
+ npm install -g @path58/n8n-mcp
163
+ p58-n8n # Run directly
164
+ ```
165
+
166
+ ### ChatGPT Desktop
167
+
168
+ ChatGPT Desktop is **not supported** — it requires HTTP/SSE transport, but P58-n8n uses stdio. See [docs/INSTALLATION.md](docs/INSTALLATION.md) for details.
169
+
170
+ ---
171
+
172
+ ## Contributing
173
+
174
+ P58-n8n is currently in **soft launch** (friends & family). Feedback welcome:
175
+
176
+ - **Issues:** [GitHub Issues](https://github.com/tsvika58/n8n-workflow-validator/issues)
177
+ - **Email:** tvagman@gmail.com
178
+
179
+ ---
180
+
181
+ ## License
182
+
183
+ MIT — see [LICENSE](LICENSE) for details.
184
+
185
+ ---
186
+
187
+ **Built by [Path58](https://path58.com)**