This is page 53 of 59. Use http://codebase.md/czlonkowski/n8n-mcp?lines=true&page={x} to view the full context. # Directory Structure ``` ├── _config.yml ├── .claude │ └── agents │ ├── code-reviewer.md │ ├── context-manager.md │ ├── debugger.md │ ├── deployment-engineer.md │ ├── mcp-backend-engineer.md │ ├── n8n-mcp-tester.md │ ├── technical-researcher.md │ └── test-automator.md ├── .dockerignore ├── .env.docker ├── .env.example ├── .env.n8n.example ├── .env.test ├── .env.test.example ├── .github │ ├── ABOUT.md │ ├── BENCHMARK_THRESHOLDS.md │ ├── FUNDING.yml │ ├── gh-pages.yml │ ├── secret_scanning.yml │ └── workflows │ ├── benchmark-pr.yml │ ├── benchmark.yml │ ├── docker-build-fast.yml │ ├── docker-build-n8n.yml │ ├── docker-build.yml │ ├── release.yml │ ├── test.yml │ └── update-n8n-deps.yml ├── .gitignore ├── .npmignore ├── ATTRIBUTION.md ├── CHANGELOG.md ├── CLAUDE.md ├── codecov.yml ├── coverage.json ├── data │ ├── .gitkeep │ ├── nodes.db │ ├── nodes.db-shm │ ├── nodes.db-wal │ └── templates.db ├── deploy │ └── quick-deploy-n8n.sh ├── docker │ ├── docker-entrypoint.sh │ ├── n8n-mcp │ ├── parse-config.js │ └── README.md ├── docker-compose.buildkit.yml ├── docker-compose.extract.yml ├── docker-compose.n8n.yml ├── docker-compose.override.yml.example ├── docker-compose.test-n8n.yml ├── docker-compose.yml ├── Dockerfile ├── Dockerfile.railway ├── Dockerfile.test ├── docs │ ├── AUTOMATED_RELEASES.md │ ├── BENCHMARKS.md │ ├── CHANGELOG.md │ ├── CLAUDE_CODE_SETUP.md │ ├── CLAUDE_INTERVIEW.md │ ├── CODECOV_SETUP.md │ ├── CODEX_SETUP.md │ ├── CURSOR_SETUP.md │ ├── DEPENDENCY_UPDATES.md │ ├── DOCKER_README.md │ ├── DOCKER_TROUBLESHOOTING.md │ ├── FINAL_AI_VALIDATION_SPEC.md │ ├── FLEXIBLE_INSTANCE_CONFIGURATION.md │ ├── HTTP_DEPLOYMENT.md │ ├── img │ │ ├── cc_command.png │ │ ├── cc_connected.png │ │ ├── codex_connected.png │ │ ├── cursor_tut.png │ │ ├── Railway_api.png │ │ ├── Railway_server_address.png │ │ ├── vsc_ghcp_chat_agent_mode.png │ │ ├── vsc_ghcp_chat_instruction_files.png │ │ ├── vsc_ghcp_chat_thinking_tool.png │ │ └── windsurf_tut.png │ ├── INSTALLATION.md │ ├── LIBRARY_USAGE.md │ ├── local │ │ ├── DEEP_DIVE_ANALYSIS_2025-10-02.md │ │ ├── DEEP_DIVE_ANALYSIS_README.md │ │ ├── Deep_dive_p1_p2.md │ │ ├── integration-testing-plan.md │ │ ├── integration-tests-phase1-summary.md │ │ ├── N8N_AI_WORKFLOW_BUILDER_ANALYSIS.md │ │ ├── P0_IMPLEMENTATION_PLAN.md │ │ └── TEMPLATE_MINING_ANALYSIS.md │ ├── MCP_ESSENTIALS_README.md │ ├── MCP_QUICK_START_GUIDE.md │ ├── N8N_DEPLOYMENT.md │ ├── RAILWAY_DEPLOYMENT.md │ ├── README_CLAUDE_SETUP.md │ ├── README.md │ ├── tools-documentation-usage.md │ ├── VS_CODE_PROJECT_SETUP.md │ ├── WINDSURF_SETUP.md │ └── workflow-diff-examples.md ├── examples │ └── enhanced-documentation-demo.js ├── fetch_log.txt ├── LICENSE ├── MEMORY_N8N_UPDATE.md ├── MEMORY_TEMPLATE_UPDATE.md ├── monitor_fetch.sh ├── N8N_HTTP_STREAMABLE_SETUP.md ├── n8n-nodes.db ├── P0-R3-TEST-PLAN.md ├── package-lock.json ├── package.json ├── package.runtime.json ├── PRIVACY.md ├── railway.json ├── README.md ├── renovate.json ├── scripts │ ├── analyze-optimization.sh │ ├── audit-schema-coverage.ts │ ├── build-optimized.sh │ ├── compare-benchmarks.js │ ├── demo-optimization.sh │ ├── deploy-http.sh │ ├── deploy-to-vm.sh │ ├── export-webhook-workflows.ts │ ├── extract-changelog.js │ ├── extract-from-docker.js │ ├── extract-nodes-docker.sh │ ├── extract-nodes-simple.sh │ ├── format-benchmark-results.js │ ├── generate-benchmark-stub.js │ ├── generate-detailed-reports.js │ ├── generate-test-summary.js │ ├── http-bridge.js │ ├── mcp-http-client.js │ ├── migrate-nodes-fts.ts │ ├── migrate-tool-docs.ts │ ├── n8n-docs-mcp.service │ ├── nginx-n8n-mcp.conf │ ├── prebuild-fts5.ts │ ├── prepare-release.js │ ├── publish-npm-quick.sh │ ├── publish-npm.sh │ ├── quick-test.ts │ ├── run-benchmarks-ci.js │ ├── sync-runtime-version.js │ ├── test-ai-validation-debug.ts │ ├── test-code-node-enhancements.ts │ ├── test-code-node-fixes.ts │ ├── test-docker-config.sh │ ├── test-docker-fingerprint.ts │ ├── test-docker-optimization.sh │ ├── test-docker.sh │ ├── test-empty-connection-validation.ts │ ├── test-error-message-tracking.ts │ ├── test-error-output-validation.ts │ ├── test-error-validation.js │ ├── test-essentials.ts │ ├── test-expression-code-validation.ts │ ├── test-expression-format-validation.js │ ├── test-fts5-search.ts │ ├── test-fuzzy-fix.ts │ ├── test-fuzzy-simple.ts │ ├── test-helpers-validation.ts │ ├── test-http-search.ts │ ├── test-http.sh │ ├── test-jmespath-validation.ts │ ├── test-multi-tenant-simple.ts │ ├── test-multi-tenant.ts │ ├── test-n8n-integration.sh │ ├── test-node-info.js │ ├── test-node-type-validation.ts │ ├── test-nodes-base-prefix.ts │ ├── test-operation-validation.ts │ ├── test-optimized-docker.sh │ ├── test-release-automation.js │ ├── test-search-improvements.ts │ ├── test-security.ts │ ├── test-single-session.sh │ ├── test-sqljs-triggers.ts │ ├── test-telemetry-debug.ts │ ├── test-telemetry-direct.ts │ ├── test-telemetry-env.ts │ ├── test-telemetry-integration.ts │ ├── test-telemetry-no-select.ts │ ├── test-telemetry-security.ts │ ├── test-telemetry-simple.ts │ ├── test-typeversion-validation.ts │ ├── test-url-configuration.ts │ ├── test-user-id-persistence.ts │ ├── test-webhook-validation.ts │ ├── test-workflow-insert.ts │ ├── test-workflow-sanitizer.ts │ ├── test-workflow-tracking-debug.ts │ ├── update-and-publish-prep.sh │ ├── update-n8n-deps.js │ ├── update-readme-version.js │ ├── vitest-benchmark-json-reporter.js │ └── vitest-benchmark-reporter.ts ├── SECURITY.md ├── src │ ├── config │ │ └── n8n-api.ts │ ├── data │ │ └── canonical-ai-tool-examples.json │ ├── database │ │ ├── database-adapter.ts │ │ ├── migrations │ │ │ └── add-template-node-configs.sql │ │ ├── node-repository.ts │ │ ├── nodes.db │ │ ├── schema-optimized.sql │ │ └── schema.sql │ ├── errors │ │ └── validation-service-error.ts │ ├── http-server-single-session.ts │ ├── http-server.ts │ ├── index.ts │ ├── loaders │ │ └── node-loader.ts │ ├── mappers │ │ └── docs-mapper.ts │ ├── mcp │ │ ├── handlers-n8n-manager.ts │ │ ├── handlers-workflow-diff.ts │ │ ├── index.ts │ │ ├── server.ts │ │ ├── stdio-wrapper.ts │ │ ├── tool-docs │ │ │ ├── configuration │ │ │ │ ├── get-node-as-tool-info.ts │ │ │ │ ├── get-node-documentation.ts │ │ │ │ ├── get-node-essentials.ts │ │ │ │ ├── get-node-info.ts │ │ │ │ ├── get-property-dependencies.ts │ │ │ │ ├── index.ts │ │ │ │ └── search-node-properties.ts │ │ │ ├── discovery │ │ │ │ ├── get-database-statistics.ts │ │ │ │ ├── index.ts │ │ │ │ ├── list-ai-tools.ts │ │ │ │ ├── list-nodes.ts │ │ │ │ └── search-nodes.ts │ │ │ ├── guides │ │ │ │ ├── ai-agents-guide.ts │ │ │ │ └── index.ts │ │ │ ├── index.ts │ │ │ ├── system │ │ │ │ ├── index.ts │ │ │ │ ├── n8n-diagnostic.ts │ │ │ │ ├── n8n-health-check.ts │ │ │ │ ├── n8n-list-available-tools.ts │ │ │ │ └── tools-documentation.ts │ │ │ ├── templates │ │ │ │ ├── get-template.ts │ │ │ │ ├── get-templates-for-task.ts │ │ │ │ ├── index.ts │ │ │ │ ├── list-node-templates.ts │ │ │ │ ├── list-tasks.ts │ │ │ │ ├── search-templates-by-metadata.ts │ │ │ │ └── search-templates.ts │ │ │ ├── types.ts │ │ │ ├── validation │ │ │ │ ├── index.ts │ │ │ │ ├── validate-node-minimal.ts │ │ │ │ ├── validate-node-operation.ts │ │ │ │ ├── validate-workflow-connections.ts │ │ │ │ ├── validate-workflow-expressions.ts │ │ │ │ └── validate-workflow.ts │ │ │ └── workflow_management │ │ │ ├── index.ts │ │ │ ├── n8n-autofix-workflow.ts │ │ │ ├── n8n-create-workflow.ts │ │ │ ├── n8n-delete-execution.ts │ │ │ ├── n8n-delete-workflow.ts │ │ │ ├── n8n-get-execution.ts │ │ │ ├── n8n-get-workflow-details.ts │ │ │ ├── n8n-get-workflow-minimal.ts │ │ │ ├── n8n-get-workflow-structure.ts │ │ │ ├── n8n-get-workflow.ts │ │ │ ├── n8n-list-executions.ts │ │ │ ├── n8n-list-workflows.ts │ │ │ ├── n8n-trigger-webhook-workflow.ts │ │ │ ├── n8n-update-full-workflow.ts │ │ │ ├── n8n-update-partial-workflow.ts │ │ │ └── n8n-validate-workflow.ts │ │ ├── tools-documentation.ts │ │ ├── tools-n8n-friendly.ts │ │ ├── tools-n8n-manager.ts │ │ ├── tools.ts │ │ └── workflow-examples.ts │ ├── mcp-engine.ts │ ├── mcp-tools-engine.ts │ ├── n8n │ │ ├── MCPApi.credentials.ts │ │ └── MCPNode.node.ts │ ├── parsers │ │ ├── node-parser.ts │ │ ├── property-extractor.ts │ │ └── simple-parser.ts │ ├── scripts │ │ ├── debug-http-search.ts │ │ ├── extract-from-docker.ts │ │ ├── fetch-templates-robust.ts │ │ ├── fetch-templates.ts │ │ ├── rebuild-database.ts │ │ ├── rebuild-optimized.ts │ │ ├── rebuild.ts │ │ ├── sanitize-templates.ts │ │ ├── seed-canonical-ai-examples.ts │ │ ├── test-autofix-documentation.ts │ │ ├── test-autofix-workflow.ts │ │ ├── test-execution-filtering.ts │ │ ├── test-node-suggestions.ts │ │ ├── test-protocol-negotiation.ts │ │ ├── test-summary.ts │ │ ├── test-webhook-autofix.ts │ │ ├── validate.ts │ │ └── validation-summary.ts │ ├── services │ │ ├── ai-node-validator.ts │ │ ├── ai-tool-validators.ts │ │ ├── confidence-scorer.ts │ │ ├── config-validator.ts │ │ ├── enhanced-config-validator.ts │ │ ├── example-generator.ts │ │ ├── execution-processor.ts │ │ ├── expression-format-validator.ts │ │ ├── expression-validator.ts │ │ ├── n8n-api-client.ts │ │ ├── n8n-validation.ts │ │ ├── node-documentation-service.ts │ │ ├── node-similarity-service.ts │ │ ├── node-specific-validators.ts │ │ ├── operation-similarity-service.ts │ │ ├── property-dependencies.ts │ │ ├── property-filter.ts │ │ ├── resource-similarity-service.ts │ │ ├── sqlite-storage-service.ts │ │ ├── task-templates.ts │ │ ├── universal-expression-validator.ts │ │ ├── workflow-auto-fixer.ts │ │ ├── workflow-diff-engine.ts │ │ └── workflow-validator.ts │ ├── telemetry │ │ ├── batch-processor.ts │ │ ├── config-manager.ts │ │ ├── early-error-logger.ts │ │ ├── error-sanitization-utils.ts │ │ ├── error-sanitizer.ts │ │ ├── event-tracker.ts │ │ ├── event-validator.ts │ │ ├── index.ts │ │ ├── performance-monitor.ts │ │ ├── rate-limiter.ts │ │ ├── startup-checkpoints.ts │ │ ├── telemetry-error.ts │ │ ├── telemetry-manager.ts │ │ ├── telemetry-types.ts │ │ └── workflow-sanitizer.ts │ ├── templates │ │ ├── batch-processor.ts │ │ ├── metadata-generator.ts │ │ ├── README.md │ │ ├── template-fetcher.ts │ │ ├── template-repository.ts │ │ └── template-service.ts │ ├── types │ │ ├── index.ts │ │ ├── instance-context.ts │ │ ├── n8n-api.ts │ │ ├── node-types.ts │ │ └── workflow-diff.ts │ └── utils │ ├── auth.ts │ ├── bridge.ts │ ├── cache-utils.ts │ ├── console-manager.ts │ ├── documentation-fetcher.ts │ ├── enhanced-documentation-fetcher.ts │ ├── error-handler.ts │ ├── example-generator.ts │ ├── fixed-collection-validator.ts │ ├── logger.ts │ ├── mcp-client.ts │ ├── n8n-errors.ts │ ├── node-source-extractor.ts │ ├── node-type-normalizer.ts │ ├── node-type-utils.ts │ ├── node-utils.ts │ ├── npm-version-checker.ts │ ├── protocol-version.ts │ ├── simple-cache.ts │ ├── ssrf-protection.ts │ ├── template-node-resolver.ts │ ├── template-sanitizer.ts │ ├── url-detector.ts │ ├── validation-schemas.ts │ └── version.ts ├── test-output.txt ├── test-reinit-fix.sh ├── tests │ ├── __snapshots__ │ │ └── .gitkeep │ ├── auth.test.ts │ ├── benchmarks │ │ ├── database-queries.bench.ts │ │ ├── index.ts │ │ ├── mcp-tools.bench.ts │ │ ├── mcp-tools.bench.ts.disabled │ │ ├── mcp-tools.bench.ts.skip │ │ ├── node-loading.bench.ts.disabled │ │ ├── README.md │ │ ├── search-operations.bench.ts.disabled │ │ └── validation-performance.bench.ts.disabled │ ├── bridge.test.ts │ ├── comprehensive-extraction-test.js │ ├── data │ │ └── .gitkeep │ ├── debug-slack-doc.js │ ├── demo-enhanced-documentation.js │ ├── docker-tests-README.md │ ├── error-handler.test.ts │ ├── examples │ │ └── using-database-utils.test.ts │ ├── extracted-nodes-db │ │ ├── database-import.json │ │ ├── extraction-report.json │ │ ├── insert-nodes.sql │ │ ├── n8n-nodes-base__Airtable.json │ │ ├── n8n-nodes-base__Discord.json │ │ ├── n8n-nodes-base__Function.json │ │ ├── n8n-nodes-base__HttpRequest.json │ │ ├── n8n-nodes-base__If.json │ │ ├── n8n-nodes-base__Slack.json │ │ ├── n8n-nodes-base__SplitInBatches.json │ │ └── n8n-nodes-base__Webhook.json │ ├── factories │ │ ├── node-factory.ts │ │ └── property-definition-factory.ts │ ├── fixtures │ │ ├── .gitkeep │ │ ├── database │ │ │ └── test-nodes.json │ │ ├── factories │ │ │ ├── node.factory.ts │ │ │ └── parser-node.factory.ts │ │ └── template-configs.ts │ ├── helpers │ │ └── env-helpers.ts │ ├── http-server-auth.test.ts │ ├── integration │ │ ├── ai-validation │ │ │ ├── ai-agent-validation.test.ts │ │ │ ├── ai-tool-validation.test.ts │ │ │ ├── chat-trigger-validation.test.ts │ │ │ ├── e2e-validation.test.ts │ │ │ ├── helpers.ts │ │ │ ├── llm-chain-validation.test.ts │ │ │ ├── README.md │ │ │ └── TEST_REPORT.md │ │ ├── ci │ │ │ └── database-population.test.ts │ │ ├── database │ │ │ ├── connection-management.test.ts │ │ │ ├── empty-database.test.ts │ │ │ ├── fts5-search.test.ts │ │ │ ├── node-fts5-search.test.ts │ │ │ ├── node-repository.test.ts │ │ │ ├── performance.test.ts │ │ │ ├── template-node-configs.test.ts │ │ │ ├── template-repository.test.ts │ │ │ ├── test-utils.ts │ │ │ └── transactions.test.ts │ │ ├── database-integration.test.ts │ │ ├── docker │ │ │ ├── docker-config.test.ts │ │ │ ├── docker-entrypoint.test.ts │ │ │ └── test-helpers.ts │ │ ├── flexible-instance-config.test.ts │ │ ├── mcp │ │ │ └── template-examples-e2e.test.ts │ │ ├── mcp-protocol │ │ │ ├── basic-connection.test.ts │ │ │ ├── error-handling.test.ts │ │ │ ├── performance.test.ts │ │ │ ├── protocol-compliance.test.ts │ │ │ ├── README.md │ │ │ ├── session-management.test.ts │ │ │ ├── test-helpers.ts │ │ │ ├── tool-invocation.test.ts │ │ │ └── workflow-error-validation.test.ts │ │ ├── msw-setup.test.ts │ │ ├── n8n-api │ │ │ ├── executions │ │ │ │ ├── delete-execution.test.ts │ │ │ │ ├── get-execution.test.ts │ │ │ │ ├── list-executions.test.ts │ │ │ │ └── trigger-webhook.test.ts │ │ │ ├── scripts │ │ │ │ └── cleanup-orphans.ts │ │ │ ├── system │ │ │ │ ├── diagnostic.test.ts │ │ │ │ ├── health-check.test.ts │ │ │ │ └── list-tools.test.ts │ │ │ ├── test-connection.ts │ │ │ ├── types │ │ │ │ └── mcp-responses.ts │ │ │ ├── utils │ │ │ │ ├── cleanup-helpers.ts │ │ │ │ ├── credentials.ts │ │ │ │ ├── factories.ts │ │ │ │ ├── fixtures.ts │ │ │ │ ├── mcp-context.ts │ │ │ │ ├── n8n-client.ts │ │ │ │ ├── node-repository.ts │ │ │ │ ├── response-types.ts │ │ │ │ ├── test-context.ts │ │ │ │ └── webhook-workflows.ts │ │ │ └── workflows │ │ │ ├── autofix-workflow.test.ts │ │ │ ├── create-workflow.test.ts │ │ │ ├── delete-workflow.test.ts │ │ │ ├── get-workflow-details.test.ts │ │ │ ├── get-workflow-minimal.test.ts │ │ │ ├── get-workflow-structure.test.ts │ │ │ ├── get-workflow.test.ts │ │ │ ├── list-workflows.test.ts │ │ │ ├── smart-parameters.test.ts │ │ │ ├── update-partial-workflow.test.ts │ │ │ ├── update-workflow.test.ts │ │ │ └── validate-workflow.test.ts │ │ ├── security │ │ │ ├── command-injection-prevention.test.ts │ │ │ └── rate-limiting.test.ts │ │ ├── setup │ │ │ ├── integration-setup.ts │ │ │ └── msw-test-server.ts │ │ ├── telemetry │ │ │ ├── docker-user-id-stability.test.ts │ │ │ └── mcp-telemetry.test.ts │ │ ├── templates │ │ │ └── metadata-operations.test.ts │ │ └── workflow-creation-node-type-format.test.ts │ ├── logger.test.ts │ ├── MOCKING_STRATEGY.md │ ├── mocks │ │ ├── n8n-api │ │ │ ├── data │ │ │ │ ├── credentials.ts │ │ │ │ ├── executions.ts │ │ │ │ └── workflows.ts │ │ │ ├── handlers.ts │ │ │ └── index.ts │ │ └── README.md │ ├── node-storage-export.json │ ├── setup │ │ ├── global-setup.ts │ │ ├── msw-setup.ts │ │ ├── TEST_ENV_DOCUMENTATION.md │ │ └── test-env.ts │ ├── test-database-extraction.js │ ├── test-direct-extraction.js │ ├── test-enhanced-documentation.js │ ├── test-enhanced-integration.js │ ├── test-mcp-extraction.js │ ├── test-mcp-server-extraction.js │ ├── test-mcp-tools-integration.js │ ├── test-node-documentation-service.js │ ├── test-node-list.js │ ├── test-package-info.js │ ├── test-parsing-operations.js │ ├── test-slack-node-complete.js │ ├── test-small-rebuild.js │ ├── test-sqlite-search.js │ ├── test-storage-system.js │ ├── unit │ │ ├── __mocks__ │ │ │ ├── n8n-nodes-base.test.ts │ │ │ ├── n8n-nodes-base.ts │ │ │ └── README.md │ │ ├── database │ │ │ ├── __mocks__ │ │ │ │ └── better-sqlite3.ts │ │ │ ├── database-adapter-unit.test.ts │ │ │ ├── node-repository-core.test.ts │ │ │ ├── node-repository-operations.test.ts │ │ │ ├── node-repository-outputs.test.ts │ │ │ ├── README.md │ │ │ └── template-repository-core.test.ts │ │ ├── docker │ │ │ ├── config-security.test.ts │ │ │ ├── edge-cases.test.ts │ │ │ ├── parse-config.test.ts │ │ │ └── serve-command.test.ts │ │ ├── errors │ │ │ └── validation-service-error.test.ts │ │ ├── examples │ │ │ └── using-n8n-nodes-base-mock.test.ts │ │ ├── flexible-instance-security-advanced.test.ts │ │ ├── flexible-instance-security.test.ts │ │ ├── http-server │ │ │ └── multi-tenant-support.test.ts │ │ ├── http-server-n8n-mode.test.ts │ │ ├── http-server-n8n-reinit.test.ts │ │ ├── http-server-session-management.test.ts │ │ ├── loaders │ │ │ └── node-loader.test.ts │ │ ├── mappers │ │ │ └── docs-mapper.test.ts │ │ ├── mcp │ │ │ ├── get-node-essentials-examples.test.ts │ │ │ ├── handlers-n8n-manager-simple.test.ts │ │ │ ├── handlers-n8n-manager.test.ts │ │ │ ├── handlers-workflow-diff.test.ts │ │ │ ├── lru-cache-behavior.test.ts │ │ │ ├── multi-tenant-tool-listing.test.ts.disabled │ │ │ ├── parameter-validation.test.ts │ │ │ ├── search-nodes-examples.test.ts │ │ │ ├── tools-documentation.test.ts │ │ │ └── tools.test.ts │ │ ├── monitoring │ │ │ └── cache-metrics.test.ts │ │ ├── MULTI_TENANT_TEST_COVERAGE.md │ │ ├── multi-tenant-integration.test.ts │ │ ├── parsers │ │ │ ├── node-parser-outputs.test.ts │ │ │ ├── node-parser.test.ts │ │ │ ├── property-extractor.test.ts │ │ │ └── simple-parser.test.ts │ │ ├── scripts │ │ │ └── fetch-templates-extraction.test.ts │ │ ├── services │ │ │ ├── ai-node-validator.test.ts │ │ │ ├── ai-tool-validators.test.ts │ │ │ ├── confidence-scorer.test.ts │ │ │ ├── config-validator-basic.test.ts │ │ │ ├── config-validator-edge-cases.test.ts │ │ │ ├── config-validator-node-specific.test.ts │ │ │ ├── config-validator-security.test.ts │ │ │ ├── debug-validator.test.ts │ │ │ ├── enhanced-config-validator-integration.test.ts │ │ │ ├── enhanced-config-validator-operations.test.ts │ │ │ ├── enhanced-config-validator.test.ts │ │ │ ├── example-generator.test.ts │ │ │ ├── execution-processor.test.ts │ │ │ ├── expression-format-validator.test.ts │ │ │ ├── expression-validator-edge-cases.test.ts │ │ │ ├── expression-validator.test.ts │ │ │ ├── fixed-collection-validation.test.ts │ │ │ ├── loop-output-edge-cases.test.ts │ │ │ ├── n8n-api-client.test.ts │ │ │ ├── n8n-validation.test.ts │ │ │ ├── node-similarity-service.test.ts │ │ │ ├── node-specific-validators.test.ts │ │ │ ├── operation-similarity-service-comprehensive.test.ts │ │ │ ├── operation-similarity-service.test.ts │ │ │ ├── property-dependencies.test.ts │ │ │ ├── property-filter-edge-cases.test.ts │ │ │ ├── property-filter.test.ts │ │ │ ├── resource-similarity-service-comprehensive.test.ts │ │ │ ├── resource-similarity-service.test.ts │ │ │ ├── task-templates.test.ts │ │ │ ├── template-service.test.ts │ │ │ ├── universal-expression-validator.test.ts │ │ │ ├── validation-fixes.test.ts │ │ │ ├── workflow-auto-fixer.test.ts │ │ │ ├── workflow-diff-engine.test.ts │ │ │ ├── workflow-fixed-collection-validation.test.ts │ │ │ ├── workflow-validator-comprehensive.test.ts │ │ │ ├── workflow-validator-edge-cases.test.ts │ │ │ ├── workflow-validator-error-outputs.test.ts │ │ │ ├── workflow-validator-expression-format.test.ts │ │ │ ├── workflow-validator-loops-simple.test.ts │ │ │ ├── workflow-validator-loops.test.ts │ │ │ ├── workflow-validator-mocks.test.ts │ │ │ ├── workflow-validator-performance.test.ts │ │ │ ├── workflow-validator-with-mocks.test.ts │ │ │ └── workflow-validator.test.ts │ │ ├── telemetry │ │ │ ├── batch-processor.test.ts │ │ │ ├── config-manager.test.ts │ │ │ ├── event-tracker.test.ts │ │ │ ├── event-validator.test.ts │ │ │ ├── rate-limiter.test.ts │ │ │ ├── telemetry-error.test.ts │ │ │ ├── telemetry-manager.test.ts │ │ │ ├── v2.18.3-fixes-verification.test.ts │ │ │ └── workflow-sanitizer.test.ts │ │ ├── templates │ │ │ ├── batch-processor.test.ts │ │ │ ├── metadata-generator.test.ts │ │ │ ├── template-repository-metadata.test.ts │ │ │ └── template-repository-security.test.ts │ │ ├── test-env-example.test.ts │ │ ├── test-infrastructure.test.ts │ │ ├── types │ │ │ ├── instance-context-coverage.test.ts │ │ │ └── instance-context-multi-tenant.test.ts │ │ ├── utils │ │ │ ├── auth-timing-safe.test.ts │ │ │ ├── cache-utils.test.ts │ │ │ ├── console-manager.test.ts │ │ │ ├── database-utils.test.ts │ │ │ ├── fixed-collection-validator.test.ts │ │ │ ├── n8n-errors.test.ts │ │ │ ├── node-type-normalizer.test.ts │ │ │ ├── node-type-utils.test.ts │ │ │ ├── node-utils.test.ts │ │ │ ├── simple-cache-memory-leak-fix.test.ts │ │ │ ├── ssrf-protection.test.ts │ │ │ └── template-node-resolver.test.ts │ │ └── validation-fixes.test.ts │ └── utils │ ├── assertions.ts │ ├── builders │ │ └── workflow.builder.ts │ ├── data-generators.ts │ ├── database-utils.ts │ ├── README.md │ └── test-helpers.ts ├── thumbnail.png ├── tsconfig.build.json ├── tsconfig.json ├── types │ ├── mcp.d.ts │ └── test-env.d.ts ├── verify-telemetry-fix.js ├── versioned-nodes.md ├── vitest.config.benchmark.ts ├── vitest.config.integration.ts └── vitest.config.ts ``` # Files -------------------------------------------------------------------------------- /docs/CHANGELOG.md: -------------------------------------------------------------------------------- ```markdown 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.0.0/), 6 | and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html). 7 | 8 | ## [Unreleased] - Phase 0: Connection Operations Critical Fixes 9 | 10 | ### Fixed 11 | - **🐛 CRITICAL: Fixed `addConnection` sourceIndex handling (Issue #272, discovered in hands-on testing)** 12 | - Multi-output nodes (IF, Switch) now work correctly with sourceIndex parameter 13 | - Changed from `||` to `??` operator to properly handle explicit 0 values 14 | - Added defensive array validation before accessing indices 15 | - Improves rating from 3/10 to 8/10 for multi-output node scenarios 16 | - **Impact**: IF nodes, Switch nodes, and all conditional routing now reliable 17 | 18 | - **🐛 CRITICAL: Added runtime validation for `updateConnection` (Issue #272, #204)** 19 | - Prevents server crashes when `updates` object is missing 20 | - Provides helpful error message with: 21 | - Clear explanation of what's wrong 22 | - Correct format example 23 | - Suggestion to use removeConnection + addConnection for rewiring 24 | - Validates `updates` is an object, not string or other type 25 | - **Impact**: No more cryptic "Cannot read properties of undefined" crashes 26 | 27 | ### Enhanced 28 | - **Error Messages**: `updateConnection` errors now include actionable guidance 29 | - Example format shown in error 30 | - Alternative approaches suggested (removeConnection + addConnection) 31 | - Clear explanation that updateConnection modifies properties, not targets 32 | 33 | ### Testing 34 | - Added 8 comprehensive tests for Phase 0 fixes 35 | - 2 tests for updateConnection validation (missing updates, invalid type) 36 | - 5 tests for sourceIndex handling (IF nodes, parallel execution, Switch nodes, explicit 0) 37 | - 1 test for complex multi-output routing scenarios 38 | - All 126 existing tests still passing 39 | 40 | ### Documentation 41 | - Updated tool documentation to clarify: 42 | - `addConnection` now properly handles sourceIndex (Phase 0 fix noted) 43 | - `updateConnection` REQUIRES 'updates' object (Phase 0 validation noted) 44 | - Added pitfalls about updateConnection limitations 45 | - Clarified that updateConnection modifies properties, NOT connection targets 46 | 47 | ### Developer Experience 48 | - More defensive programming throughout connection operations 49 | - Better use of nullish coalescing (??) vs. logical OR (||) 50 | - Clear inline comments explaining expected behavior 51 | - Improved type safety with runtime guards 52 | 53 | ### References 54 | - Comprehensive analysis: `docs/local/connection-operations-deep-dive-and-improvement-plan.md` 55 | - Based on hands-on testing with n8n-mcp-tester agent 56 | - Overall experience rating improved from 4.5/10 to estimated 6/10 57 | 58 | ## [2.14.4] - 2025-09-30 59 | 60 | ### Added 61 | - **Workflow Cleanup Operations**: Two new operations for `n8n_update_partial_workflow` to handle broken workflow recovery 62 | - `cleanStaleConnections`: Automatically removes all connections referencing non-existent nodes 63 | - Essential after node renames or deletions that leave dangling connection references 64 | - Supports `dryRun: true` mode to preview what would be removed 65 | - Removes both source and target stale connections 66 | - `replaceConnections`: Replace entire connections object in a single operation 67 | - Faster than crafting many individual connection operations 68 | - Useful for bulk connection rewiring 69 | 70 | - **Graceful Error Handling for Connection Operations**: Enhanced `removeConnection` operation 71 | - New `ignoreErrors` flag: When `true`, operation succeeds even if connection doesn't exist 72 | - Perfect for cleanup scenarios where you're not sure if connections exist 73 | - Maintains backwards compatibility (defaults to `false` for strict validation) 74 | 75 | - **Best-Effort Mode**: New `continueOnError` mode for `WorkflowDiffRequest` 76 | - Apply valid operations even if some fail 77 | - Returns detailed results with `applied` and `failed` operation indices 78 | - Breaks atomic guarantees intentionally for bulk cleanup scenarios 79 | - Maintains atomic mode as default for safety 80 | 81 | ### Enhanced 82 | - **Tool Documentation**: Updated `n8n_update_partial_workflow` documentation 83 | - Added examples for cleanup scenarios 84 | - Documented new operation types and modes 85 | - Added best practices for workflow recovery 86 | - Clarified atomic vs. best-effort behavior 87 | 88 | - **Type System**: Extended workflow diff types 89 | - Added `CleanStaleConnectionsOperation` interface 90 | - Added `ReplaceConnectionsOperation` interface 91 | - Extended `WorkflowDiffResult` with `applied`, `failed`, and `staleConnectionsRemoved` fields 92 | - Updated type guards for new connection operations 93 | 94 | ### Testing 95 | - Added comprehensive test suite for v2.14.4 features 96 | - 15 new tests covering all new operations and modes 97 | - Tests for cleanStaleConnections with various stale scenarios 98 | - Tests for replaceConnections validation 99 | - Tests for ignoreErrors flag behavior 100 | - Tests for continueOnError mode with mixed success/failure 101 | - Backwards compatibility verification tests 102 | 103 | ### Impact 104 | - **Time Saved**: Reduces broken workflow fix time from 10-15 minutes to 30 seconds 105 | - **Token Efficiency**: `cleanStaleConnections` is 1 operation vs 10+ manual operations 106 | - **User Experience**: Dramatically improved workflow recovery capabilities 107 | - **Backwards Compatibility**: 100% - all additions are optional and default to existing behavior 108 | 109 | ## [2.13.2] - 2025-01-24 110 | 111 | ### Added 112 | - **Operation and Resource Validation with Intelligent Suggestions**: New similarity services for n8n node configuration validation 113 | - `OperationSimilarityService`: Validates operations and suggests similar alternatives using Levenshtein distance and pattern matching 114 | - `ResourceSimilarityService`: Validates resources with automatic plural/singular conversion and typo detection 115 | - Provides "Did you mean...?" suggestions when invalid operations or resources are used 116 | - Example: `operation: "listFiles"` suggests `"search"` for Google Drive nodes 117 | - Example: `resource: "files"` suggests singular `"file"` with 95% confidence 118 | - Confidence-based suggestions (minimum 30% threshold) with contextual fix messages 119 | - Resource-aware operation filtering ensures suggestions are contextually appropriate 120 | - 5-minute cache duration for performance optimization 121 | - Integrated into `EnhancedConfigValidator` for seamless validation flow 122 | 123 | - **Custom Error Handling**: New `ValidationServiceError` class for better error management 124 | - Proper error chaining with cause tracking 125 | - Specialized factory methods for common error scenarios 126 | - Type-safe error propagation throughout the validation pipeline 127 | 128 | ### Enhanced 129 | - **Code Quality and Security Improvements** (based on code review feedback): 130 | - Safe JSON parsing with try-catch error boundaries 131 | - Type guards for safe property access (`getOperationValue`, `getResourceValue`) 132 | - Memory leak prevention with periodic cache cleanup 133 | - Performance optimization with early termination for exact matches 134 | - Replaced magic numbers with named constants for better maintainability 135 | - Comprehensive JSDoc documentation for all public methods 136 | - Improved confidence calculation for typos and transpositions 137 | 138 | ### Fixed 139 | - **Test Compatibility**: Updated test expectations to correctly handle exact match scenarios 140 | - **Cache Management**: Fixed cache cleanup to prevent unbounded memory growth 141 | - **Validation Deduplication**: Enhanced config validator now properly replaces base validator errors with detailed suggestions 142 | 143 | ### Testing 144 | - Added comprehensive test coverage for similarity services (37 new tests) 145 | - All unit tests passing with proper edge case handling 146 | - Integration confirmed via n8n-mcp-tester agent validation 147 | 148 | ## [2.13.1] - 2025-01-24 149 | 150 | ### Changed 151 | - **Removed 5-operation limit from n8n_update_partial_workflow**: The workflow diff engine now supports unlimited operations per request 152 | - Previously limited to 5 operations for "transactional integrity" 153 | - Analysis revealed the limit was unnecessary - the clone-validate-apply pattern already ensures atomicity 154 | - All operations are validated before any are applied, maintaining data integrity 155 | - Enables complex workflow refactoring in single API calls 156 | - Updated documentation and examples to demonstrate large batch operations (26+ operations) 157 | 158 | ## [2.13.0] - 2025-01-24 159 | 160 | ### Added 161 | - **Webhook Path Autofixer**: Automatically generates UUIDs for webhook nodes missing path configuration 162 | - Generates unique UUID for both `path` parameter and `webhookId` field 163 | - Conditionally updates typeVersion to 2.1 only when < 2.1 to ensure compatibility 164 | - High confidence fix (95%) as UUID generation is deterministic 165 | - Resolves webhook nodes showing "?" in the n8n UI 166 | 167 | - **Enhanced Node Type Suggestions**: Intelligent node type correction with similarity matching 168 | - Multi-factor scoring system: name similarity, category match, package match, pattern match 169 | - Handles deprecated package prefixes (n8n-nodes-base. → nodes-base.) 170 | - Corrects capitalization mistakes (HttpRequest → httpRequest) 171 | - Suggests correct packages (nodes-base.openai → nodes-langchain.openAi) 172 | - Only auto-fixes suggestions with ≥90% confidence 173 | - 5-minute cache for performance optimization 174 | 175 | - **n8n_autofix_workflow Tool**: New MCP tool for automatic workflow error correction 176 | - Comprehensive documentation with examples and best practices 177 | - Supports 5 fix types: expression-format, typeversion-correction, error-output-config, node-type-correction, webhook-missing-path 178 | - Confidence-based system (high/medium/low) for safe fixes 179 | - Preview mode to review changes before applying 180 | - Integrated with workflow validation pipeline 181 | 182 | ### Fixed 183 | - **Security**: Eliminated ReDoS vulnerability in NodeSimilarityService 184 | - Replaced all regex patterns with string-based matching 185 | - No performance impact while maintaining accuracy 186 | 187 | - **Performance**: Optimized similarity matching algorithms 188 | - Levenshtein distance algorithm optimized from O(m*n) space to O(n) 189 | - Added early termination for performance improvement 190 | - Cache invalidation with version tracking prevents memory leaks 191 | 192 | - **Code Quality**: Improved maintainability and type safety 193 | - Extracted magic numbers into named constants 194 | - Added proper type guards for runtime safety 195 | - Created centralized node-type-utils for consistent type normalization 196 | - Fixed silent failures in setNestedValue operations 197 | 198 | ### Changed 199 | - Template sanitizer now includes defensive null checks for runtime safety 200 | - Workflow validator uses centralized type normalization utility 201 | 202 | ## [2.12.2] - 2025-01-22 203 | 204 | ### Changed 205 | - Updated n8n dependencies to latest versions: 206 | - n8n: 1.111.0 → 1.112.3 207 | - n8n-core: 1.110.0 → 1.111.0 208 | - n8n-workflow: 1.108.0 → 1.109.0 209 | - @n8n/n8n-nodes-langchain: 1.110.0 → 1.111.1 210 | - Rebuilt node database with 536 nodes (438 from n8n-nodes-base, 98 from langchain) 211 | 212 | ## [2.12.1] - 2025-01-21 213 | 214 | ### Added 215 | - **Comprehensive Expression Format Validation System**: Three-tier validation strategy for n8n expressions 216 | - **Universal Expression Validator**: 100% reliable detection of expression format issues 217 | - Enforces required `=` prefix for all expressions `{{ }}` 218 | - Validates expression syntax (bracket matching, empty expressions) 219 | - Detects common mistakes (template literals, nested brackets, double prefixes) 220 | - Provides confidence score of 1.0 for universal rules 221 | - **Confidence-Based Node-Specific Recommendations**: Intelligent resource locator suggestions 222 | - Confidence scoring system (0.0 to 1.0) for field-specific recommendations 223 | - High confidence (≥0.8): Exact field matches for known nodes (GitHub owner/repository, Slack channels) 224 | - Medium confidence (≥0.5): Field pattern matches (fields ending in Id, Key, Name) 225 | - Factors: exact field match, field patterns, value patterns, node category 226 | - **Resource Locator Format Detection**: Identifies fields needing `__rl` structure 227 | - Validates resource locator mode (id, url, expression, name, list) 228 | - Auto-fixes missing prefixes in resource locator values 229 | - Provides clear JSON examples showing correct format 230 | - **Enhanced Safety Features**: 231 | - Recursion depth protection (MAX_RECURSION_DEPTH = 100) prevents infinite loops 232 | - Pattern matching precision using exact/prefix matching instead of includes() 233 | - Circular reference detection with WeakSet 234 | - **Separation of Concerns**: Clean architecture for maintainability 235 | - Universal rules separated from node-specific intelligence 236 | - Confidence-based application of suggestions 237 | - Future-proof design that works with any n8n node 238 | 239 | ## [2.12.1] - 2025-09-22 240 | 241 | ### Fixed 242 | - **Error Output Validation**: Enhanced workflow validator to detect incorrect error output configurations 243 | - Detects when multiple nodes are incorrectly placed in the same output array (main[0]) 244 | - Validates that error handlers are properly connected to main[1] (error output) instead of main[0] 245 | - Cross-validates onError property ('continueErrorOutput') matches actual connection structure 246 | - Provides clear, actionable error messages with JSON examples showing correct configuration 247 | - Uses heuristic detection for error handler nodes (names containing "error", "fail", "catch", etc.) 248 | - Added comprehensive test coverage with 16+ test cases 249 | 250 | ### Improved 251 | - **Validation Messages**: Error messages now include detailed JSON examples showing both incorrect and correct configurations 252 | - **Pattern Detection**: Fixed `checkWorkflowPatterns` to check main[1] for error outputs instead of non-existent outputs.error 253 | - **Test Coverage**: Added new test file `workflow-validator-error-outputs.test.ts` with extensive error output validation scenarios 254 | 255 | ## [2.12.0] - 2025-09-19 256 | 257 | ### Added 258 | - **Flexible Instance Configuration**: Complete multi-instance support for serving multiple n8n instances dynamically 259 | - New `InstanceContext` interface for runtime configuration without multi-tenancy implications 260 | - Dual-mode API client supporting both singleton (env vars) and instance-specific configurations 261 | - LRU cache with SHA-256 hashing for secure client management (100 instances, 30-min TTL) 262 | - Comprehensive input validation preventing injection attacks and invalid configurations 263 | - Session context management in HTTP server for per-session instance configuration 264 | - 100% backward compatibility - existing deployments work unchanged 265 | - Full test coverage with 83 new tests covering security, caching, and validation 266 | 267 | ### Security 268 | - **SHA-256 Cache Key Hashing**: All instance identifiers are hashed before caching 269 | - **Input Validation**: Comprehensive validation for URLs, API keys, and numeric parameters 270 | - **Secure Logging**: Sensitive data never logged, only partial hashes for debugging 271 | - **Memory Management**: LRU eviction and TTL prevent unbounded growth 272 | - **URL Validation**: Blocks dangerous protocols (file://, javascript://, etc.) 273 | 274 | ### Performance 275 | - **Efficient Caching**: LRU cache with automatic cleanup reduces API client creation 276 | - **Fast Lookups**: SHA-256 hashed keys for O(1) cache access 277 | - **Memory Optimized**: Maximum 100 concurrent instances with 30-minute TTL 278 | - **Token Savings**: Reuses existing clients instead of recreating 279 | 280 | ### Documentation 281 | - Added comprehensive [Flexible Instance Configuration Guide](./FLEXIBLE_INSTANCE_CONFIGURATION.md) 282 | - Detailed architecture, usage examples, and security considerations 283 | - Migration guide for existing deployments 284 | - Complete API documentation for InstanceContext 285 | 286 | ## [2.11.3] - 2025-09-17 287 | 288 | ### Fixed 289 | - **n8n_update_partial_workflow Tool**: Fixed critical bug where updateNode and updateConnection operations were using incorrect property name 290 | - Changed from `changes` property to `updates` property to match documentation and expected behavior 291 | - Resolves issue where AI agents would break workflow connections when updating nodes 292 | - Fixes GitHub issues #159 (update_partial_workflow is invalid) and #168 (partial workflow update returns error) 293 | - All related tests updated to use correct property name 294 | 295 | ## [2.11.2] - 2025-09-16 296 | 297 | ### Updated 298 | - **n8n Dependencies**: Updated to latest versions for compatibility and new features 299 | - n8n: 1.110.1 → 1.111.0 300 | - n8n-core: 1.109.0 → 1.110.0 301 | - n8n-workflow: 1.107.0 → 1.108.0 302 | - @n8n/n8n-nodes-langchain: 1.109.1 → 1.110.0 303 | - **Node Database**: Rebuilt with 535 nodes from updated n8n packages 304 | - **Templates**: Preserved all 2,598 workflow templates with metadata intact 305 | - All critical nodes validated successfully (httpRequest, code, slack, agent) 306 | - Test suite: 1,911 tests passing, 5 flaky performance tests failing (99.7% pass rate) 307 | 308 | ## [2.11.1] - 2025-09-15 309 | 310 | ### Added 311 | - **Optional Fields Parameter for search_templates**: Enhanced search_templates tool with field filtering capability 312 | - New optional `fields` parameter accepts an array of field names to include in response 313 | - Supported fields: 'id', 'name', 'description', 'author', 'nodes', 'views', 'created', 'url', 'metadata' 314 | - Reduces response size by 70-98% when requesting only specific fields (e.g., just id and name) 315 | - Maintains full backward compatibility - existing calls without fields parameter work unchanged 316 | - Example: `search_templates({query: "slack", fields: ["id", "name"]})` returns minimal data 317 | - Significantly improves AI agent performance by reducing token usage 318 | 319 | ### Added 320 | - **Fuzzy Node Type Matching for Templates**: Improved template discovery with flexible node type resolution 321 | - Templates can now be found using simple node names: `["slack"]` instead of `["n8n-nodes-base.slack"]` 322 | - Accepts various input formats: bare names, partial prefixes, and case variations 323 | - Automatically expands related node types: `["email"]` finds Gmail, email send, and related templates 324 | - `["slack"]` also finds `slackTrigger` templates 325 | - Case-insensitive matching: `["Slack"]`, `["WEBHOOK"]`, `["HttpRequest"]` all work 326 | - Backward compatible - existing exact formats continue working 327 | - Reduces failed queries by approximately 50% 328 | - Added `template-node-resolver.ts` utility for node type resolution 329 | - Added 23 tests for template node resolution 330 | - **Structured Template Metadata System**: Comprehensive metadata for intelligent template discovery 331 | - Generated metadata for 2,534 templates (97.5% coverage) using OpenAI's batch API 332 | - Rich metadata structure: categories, complexity, use cases, setup time, required services, key features, target audience 333 | - New `search_templates_by_metadata` tool for advanced filtering by multiple criteria 334 | - Enhanced `list_templates` tool with optional `includeMetadata` parameter 335 | - Templates now always include descriptions in list responses 336 | - Metadata enables filtering by complexity level (simple/medium/complex) 337 | - Filter by estimated setup time ranges (5-480 minutes) 338 | - Filter by required external services (OpenAI, Slack, Google, etc.) 339 | - Filter by target audience (developers, marketers, analysts, etc.) 340 | - Multiple filter combinations supported for precise template discovery 341 | - SQLite JSON extraction for efficient metadata queries 342 | - Batch processing with OpenAI's gpt-4o-mini model for cost efficiency 343 | - Added comprehensive tool documentation for new metadata features 344 | - New database columns: metadata_json, metadata_generated_at 345 | - Repository methods for metadata search and filtering 346 | 347 | ## [2.11.0] - 2025-01-14 348 | 349 | ### Added 350 | - **Comprehensive Template Pagination**: All template search and list tools now return paginated responses 351 | - Consistent `PaginatedResponse` format with `items`, `total`, `limit`, `offset`, and `hasMore` fields 352 | - Customizable limits (1-100) and offset parameters for all template tools 353 | - Count methods for accurate pagination information across all template queries 354 | - **New `list_templates` Tool**: Efficient browsing of all available templates 355 | - Returns minimal data (id, name, views, nodeCount) for quick overview 356 | - Supports sorting by views, created_at, or name 357 | - Optimized for discovering templates without downloading full workflow data 358 | - **Flexible Template Retrieval Modes**: Enhanced `get_template` with three response modes 359 | - `nodes_only`: Returns just node types and names (minimal tokens) 360 | - `structure`: Returns nodes with positions and connections (moderate detail) 361 | - `full`: Returns complete workflow JSON (default, maximum detail) 362 | - Reduces token usage by 80-90% in minimal modes 363 | 364 | ### Enhanced 365 | - **Template Database Compression**: Implemented gzip compression for workflow JSONs 366 | - Workflow data compressed from ~75MB to 12.10MB (84% reduction) 367 | - Database size reduced from 117MB to 48MB despite 5x more templates 368 | - Transparent compression/decompression with base64 encoding 369 | - No API changes - compression is handled internally 370 | - **Template Quality Filtering**: Automatic filtering of low-quality templates 371 | - Templates with ≤10 views are excluded from the database 372 | - Expanded coverage from 499 to 2,596 high-quality templates (5x increase) 373 | - Filtered 4,505 raw templates down to 2,596 based on popularity 374 | - Ensures AI agents work with proven, valuable workflows 375 | - **Enhanced Database Statistics**: Template metrics now included 376 | - Shows total template count, average/min/max views 377 | - Provides complete database overview including template coverage 378 | 379 | ### Performance 380 | - **Database Optimization**: 59% size reduction while storing 5x more content 381 | - Previous: ~40MB database with 499 templates 382 | - Current: ~48MB database with 2,596 templates 383 | - Without compression would be ~120MB+ 384 | - **Token Efficiency**: 80-90% reduction in response size for minimal queries 385 | - `list_templates`: ~10 tokens per template vs 100+ for full data 386 | - `get_template` with `nodes_only`: Returns just essential node information 387 | - Pagination prevents overwhelming responses for large result sets 388 | 389 | ### Fixed 390 | - **Test Suite Compatibility**: Updated all tests for new template system 391 | - Fixed parameter validation tests to expect new method signatures 392 | - Updated integration tests to use templates with >10 views 393 | - Removed redundant test files that were testing at wrong abstraction level 394 | - All 1,700+ tests now passing 395 | 396 | ## [2.10.9] - 2025-01-09 397 | 398 | ### Changed 399 | - **Dependencies**: Updated n8n packages to 1.110.1 400 | - n8n: 1.109.2 → 1.110.1 401 | - n8n-core: 1.108.0 → 1.109.0 402 | - n8n-workflow: 1.106.0 → 1.107.0 403 | - @n8n/n8n-nodes-langchain: 1.108.1 → 1.109.1 404 | 405 | ### Updated 406 | - **Node Database**: Rebuilt with 536 nodes from updated n8n packages 407 | - **Templates**: Refreshed workflow templates database with latest 499 templates from n8n.io 408 | 409 | ## [2.10.8] - 2025-09-04 410 | 411 | ### Updated 412 | - **n8n Dependencies**: Updated to latest versions for compatibility and new features 413 | - n8n: 1.107.4 → 1.109.2 414 | - @n8n/n8n-nodes-langchain: 1.106.2 → 1.109.1 415 | - n8n-nodes-base: 1.106.3 → 1.108.0 (via dependencies) 416 | - **Node Database**: Rebuilt with 535 nodes from updated n8n packages 417 | - **Node.js Compatibility**: Optimized for Node.js v22.17.0 LTS 418 | - Enhanced better-sqlite3 native binary compatibility 419 | - Fixed SQL.js fallback mode for environments without native binaries 420 | - **CI/CD Improvements**: Fixed Rollup native module compatibility for GitHub Actions 421 | - Added explicit platform-specific rollup binaries for cross-platform builds 422 | - Resolved npm ci failures in Linux CI environment 423 | - Fixed package-lock.json synchronization issues 424 | - **Platform Support**: Enhanced cross-platform deployment compatibility 425 | - macOS ARM64 and Linux x64 platform binaries included 426 | - Improved npm package distribution with proper dependency resolution 427 | - All 1,728+ tests passing with updated dependencies 428 | 429 | ### Fixed 430 | - **CI/CD Pipeline**: Resolved test failures in GitHub Actions 431 | - Fixed pyodide version conflicts between langchain dependencies 432 | - Regenerated package-lock.json with proper dependency resolution 433 | - Fixed Rollup native module loading in Linux CI environment 434 | - **Database Compatibility**: Enhanced SQL.js fallback reliability 435 | - Improved parameter binding and state management 436 | - Fixed statement cleanup to prevent memory leaks 437 | - **Deployment Reliability**: Better handling of platform-specific dependencies 438 | - npm ci now works consistently across development and CI environments 439 | 440 | ## [2.10.5] - 2025-08-20 441 | 442 | ### Updated 443 | - **n8n Dependencies**: Updated to latest versions for compatibility and new features 444 | - n8n: 1.106.3 → 1.107.4 445 | - n8n-core: 1.105.3 → 1.106.2 446 | - n8n-workflow: 1.103.3 → 1.104.1 447 | - @n8n/n8n-nodes-langchain: 1.105.3 → 1.106.2 448 | - **Node Database**: Rebuilt with 535 nodes from updated n8n packages 449 | - All tests passing with updated dependencies 450 | 451 | ## [2.10.4] - 2025-08-12 452 | 453 | ### Updated 454 | - **n8n Dependencies**: Updated to latest versions for compatibility and new features 455 | - n8n: 1.105.2 → 1.106.3 456 | - n8n-core: 1.104.1 → 1.105.3 457 | - n8n-workflow: 1.102.1 → 1.103.3 458 | - @n8n/n8n-nodes-langchain: 1.104.1 → 1.105.3 459 | - **Node Database**: Rebuilt with 535 nodes from updated n8n packages 460 | - All 1,728 tests passing with updated dependencies 461 | 462 | ## [2.10.3] - 2025-08-07 463 | 464 | ### Fixed 465 | - **Validation System Robustness**: Fixed multiple critical validation issues affecting AI agents and workflow validation (fixes #58, #68, #70, #73) 466 | - **Issue #73**: Fixed `validate_node_minimal` crash when config is undefined 467 | - Added safe property access with optional chaining (`config?.resource`) 468 | - Tool now handles undefined, null, and malformed configs gracefully 469 | - **Issue #58**: Fixed `validate_node_operation` crash on invalid nodeType 470 | - Added type checking before calling string methods 471 | - Prevents "Cannot read properties of undefined (reading 'replace')" error 472 | - **Issue #70**: Fixed validation profile settings being ignored 473 | - Extended profile parameter to all validation phases (nodes, connections, expressions) 474 | - Added Sticky Notes filtering to reduce false positives 475 | - Enhanced cycle detection to allow legitimate loops (SplitInBatches) 476 | - **Issue #68**: Added error recovery suggestions for AI agents 477 | - New `addErrorRecoverySuggestions()` method provides actionable recovery steps 478 | - Categorizes errors and suggests specific fixes for each type 479 | - Helps AI agents self-correct when validation fails 480 | 481 | ### Added 482 | - **Input Validation System**: Comprehensive validation for all MCP tool inputs 483 | - Created `validation-schemas.ts` with custom validation utilities 484 | - No external dependencies - pure TypeScript implementation 485 | - Tool-specific validation schemas for all MCP tools 486 | - Clear error messages with field-level details 487 | - **Enhanced Cycle Detection**: Improved detection of legitimate loops vs actual cycles 488 | - Recognizes SplitInBatches loop patterns as valid 489 | - Reduces false positive cycle warnings 490 | - **Comprehensive Test Suite**: Added 16 tests covering all validation fixes 491 | - Tests for crash prevention with malformed inputs 492 | - Tests for profile behavior across validation phases 493 | - Tests for error recovery suggestions 494 | - Tests for legitimate loop patterns 495 | 496 | ### Enhanced 497 | - **Validation Profiles**: Now consistently applied across all validation phases 498 | - `minimal`: Reduces warnings for basic validation 499 | - `runtime`: Standard validation for production workflows 500 | - `ai-friendly`: Optimized for AI agent workflow creation 501 | - `strict`: Maximum validation for critical workflows 502 | - **Error Messages**: More helpful and actionable for both humans and AI agents 503 | - Specific recovery suggestions for common errors 504 | - Clear guidance on fixing validation issues 505 | - Examples of correct configurations 506 | 507 | ## [2.10.2] - 2025-08-05 508 | 509 | ### Updated 510 | - **n8n Dependencies**: Updated to latest versions for compatibility and new features 511 | - n8n: 1.104.1 → 1.105.2 512 | - n8n-core: 1.103.1 → 1.104.1 513 | - n8n-workflow: 1.101.0 → 1.102.1 514 | - @n8n/n8n-nodes-langchain: 1.103.1 → 1.104.1 515 | - **Node Database**: Rebuilt with 534 nodes from updated n8n packages 516 | - **Template Library**: Fetched 499 workflow templates from the last 12 months 517 | - Templates are filtered to include only those created or updated within the past year 518 | - This ensures the template library contains fresh and actively maintained workflows 519 | - All 1,620 tests passing with updated dependencies 520 | 521 | ## [2.10.1] - 2025-08-02 522 | 523 | ### Fixed 524 | - **Memory Leak in SimpleCache**: Fixed critical memory leak causing MCP server connection loss after several hours (fixes #118) 525 | - Added proper timer cleanup in `SimpleCache.destroy()` method 526 | - Updated MCP server shutdown to clean up cache timers 527 | - Enhanced HTTP server error handling with transport error handlers 528 | - Fixed event listener cleanup to prevent accumulation 529 | - Added comprehensive test coverage for memory leak prevention 530 | 531 | ## [2.10.0] - 2025-08-02 532 | 533 | ### Added 534 | - **Automated Release System**: Complete CI/CD pipeline for automated releases on version bump 535 | - GitHub Actions workflow (`.github/workflows/release.yml`) with 7 coordinated jobs 536 | - Automatic version detection and changelog extraction 537 | - Multi-artifact publishing: GitHub releases, NPM package, Docker images 538 | - Interactive release preparation tool (`npm run prepare:release`) 539 | - Comprehensive release testing tool (`npm run test:release-automation`) 540 | - Full documentation in `docs/AUTOMATED_RELEASES.md` 541 | - Zero-touch releases: version bump → automatic everything 542 | 543 | ### Security 544 | - **CI/CD Security Enhancements**: 545 | - Replaced deprecated `actions/create-release@v1` with secure `gh` CLI 546 | - Fixed git checkout vulnerability using safe `git show` commands 547 | - Fixed command injection risk using proper argument arrays 548 | - Added concurrency control to prevent simultaneous releases 549 | - Added disk space checks before resource-intensive operations 550 | - Implemented confirmation gates for destructive operations 551 | 552 | ### Changed 553 | - **Dockerfile Consolidation**: Removed redundant `Dockerfile.n8n` in favor of single optimized `Dockerfile` 554 | - n8n packages are not required at runtime for N8N_MODE functionality 555 | - Standard image works perfectly with `N8N_MODE=true` environment variable 556 | - Reduces build complexity and maintenance overhead 557 | - Image size reduced by 500MB+ (no unnecessary n8n packages) 558 | - Build time improved from 8+ minutes to 1-2 minutes 559 | 560 | ### Added (CI/CD Features) 561 | - **Developer Tools**: 562 | - `scripts/prepare-release.js`: Interactive guided release tool 563 | - `scripts/test-release-automation.js`: Validates entire release setup 564 | - `scripts/extract-changelog.js`: Modular changelog extraction 565 | - **Release Automation Features**: 566 | - NPM publishing with 3-retry mechanism for network resilience 567 | - Multi-platform Docker builds (amd64, arm64) 568 | - Semantic version validation and prerelease detection 569 | - Automatic documentation badge updates 570 | - Runtime-optimized NPM package (8 deps vs 50+, ~50MB vs 1GB+) 571 | 572 | ### Fixed 573 | - Fixed missing `axios` dependency in `package.runtime.json` causing Docker build failures 574 | 575 | ## [2.9.1] - 2025-08-02 576 | 577 | ### Fixed 578 | - **Fixed Collection Validation**: Fixed critical issue where AI agents created invalid fixedCollection structures causing "propertyValues[itemName] is not iterable" error (fixes #90) 579 | - Created generic `FixedCollectionValidator` utility class that handles 12 different node types 580 | - Validates and auto-fixes common AI-generated patterns for Switch, If, Filter nodes 581 | - Extended support to Summarize, Compare Datasets, Sort, Aggregate, Set, HTML, HTTP Request, and Airtable nodes 582 | - Added comprehensive test coverage with 19 tests for all affected node types 583 | - Provides clear error messages and automatic structure corrections 584 | - **TypeScript Type Safety**: Improved type safety in fixed collection validator 585 | - Replaced all `any` types with proper TypeScript types (`NodeConfig`, `NodeConfigValue`) 586 | - Added type guards for safe property access 587 | - Fixed potential memory leak in `getAllPatterns` by creating deep copies 588 | - Added circular reference protection using `WeakSet` in structure traversal 589 | - **Node Type Normalization**: Fixed inconsistent node type casing 590 | - Normalized `compareDatasets` to `comparedatasets` and `httpRequest` to `httprequest` 591 | - Ensures consistent node type handling across all validation tools 592 | - Maintains backward compatibility with existing workflows 593 | 594 | ### Enhanced 595 | - **Code Review Improvements**: Addressed all code review feedback 596 | - Made output keys deterministic by removing `Math.random()` usage 597 | - Improved error handling with comprehensive null/undefined/array checks 598 | - Enhanced memory safety with proper object cloning 599 | - Added protection against circular references in configuration objects 600 | 601 | ### Testing 602 | - **Comprehensive Test Coverage**: Added extensive tests for fixedCollection validation 603 | - 19 tests covering all 12 affected node types 604 | - Tests for edge cases including empty configs, non-object values, and circular references 605 | - Real-world AI agent pattern tests based on actual ChatGPT/Claude generated configs 606 | - Version compatibility tests across all validation profiles 607 | - TypeScript compilation tests ensuring type safety 608 | 609 | ## [2.9.0] - 2025-08-01 610 | 611 | ### Added 612 | - **n8n Integration with MCP Client Tool Support**: Complete n8n integration enabling n8n-mcp to run as MCP server within n8n workflows 613 | - Full compatibility with n8n's MCP Client Tool node 614 | - Dedicated n8n mode (`N8N_MODE=true`) for optimized operation 615 | - Workflow examples and n8n-friendly tool descriptions 616 | - Quick deployment script (`deploy/quick-deploy-n8n.sh`) for easy setup 617 | - Docker configuration specifically for n8n deployment (`Dockerfile.n8n`, `docker-compose.n8n.yml`) 618 | - Test scripts for n8n integration (`test-n8n-integration.sh`, `test-n8n-mode.sh`) 619 | - **n8n Deployment Documentation**: Comprehensive guide for deploying n8n-MCP with n8n (`docs/N8N_DEPLOYMENT.md`) 620 | - Local testing instructions using `/scripts/test-n8n-mode.sh` 621 | - Production deployment with Docker Compose 622 | - Cloud deployment guide for Hetzner, AWS, and other providers 623 | - n8n MCP Client Tool setup and configuration 624 | - Troubleshooting section with common issues and solutions 625 | - **Protocol Version Negotiation**: Intelligent client detection for n8n compatibility 626 | - Automatically detects n8n clients and uses protocol version 2024-11-05 627 | - Standard MCP clients get the latest version (2025-03-26) 628 | - Improves compatibility with n8n's MCP Client Tool node 629 | - Comprehensive protocol negotiation test suite 630 | - **Comprehensive Parameter Validation**: Enhanced validation for all MCP tools 631 | - Clear, user-friendly error messages for invalid parameters 632 | - Numeric parameter conversion and edge case handling 633 | - 52 new parameter validation tests 634 | - Consistent error format across all tools 635 | - **Session Management**: Improved session handling with comprehensive test coverage 636 | - Fixed memory leak potential with async cleanup 637 | - Better connection close handling 638 | - Enhanced session management tests 639 | - **Dynamic README Version Badge**: Made version badge update automatically from package.json 640 | - Added `update-readme-version.js` script 641 | - Enhanced `sync-runtime-version.js` to update README badges 642 | - Version badge now stays in sync during publish workflow 643 | 644 | ### Fixed 645 | - **Docker Build Optimization**: Fixed Dockerfile.n8n using wrong dependencies 646 | - Now uses `package.runtime.json` instead of full `package.json` 647 | - Reduces build time from 13+ minutes to 1-2 minutes 648 | - Fixes ARM64 build failures due to network timeouts 649 | - Reduces image size from ~1.5GB to ~280MB 650 | - **CI Test Failures**: Resolved Docker entrypoint permission issues 651 | - Updated tests to accept dynamic UID range (10000-59999) 652 | - Enhanced lock file creation with better error recovery 653 | - Fixed TypeScript lint errors in test files 654 | - Fixed flaky performance tests with deterministic versions 655 | - **Schema Validation Issues**: Fixed n8n nested output format compatibility 656 | - Added validation for n8n's nested output workaround 657 | - Fixed schema validation errors with n8n MCP Client Tool 658 | - Enhanced error sanitization for production environments 659 | 660 | ### Changed 661 | - **Memory Management**: Improved session cleanup to prevent memory leaks 662 | - **Error Handling**: Enhanced error sanitization for production environments 663 | - **Docker Security**: Using unpredictable UIDs/GIDs (10000-59999 range) for better security 664 | - **CI/CD Configuration**: Made codecov patch coverage informational to prevent CI failures on infrastructure code 665 | - **Test Scripts**: Enhanced with Docker auto-installation and better user experience 666 | - Added colored output and progress indicators 667 | - Automatic Docker installation for multiple operating systems 668 | - n8n API key flow for management tools 669 | 670 | ### Security 671 | - **Enhanced Docker Security**: Dynamic UID/GID generation for containers 672 | - **Error Sanitization**: Improved error messages to prevent information leakage 673 | - **Permission Handling**: Better permission management for mounted volumes 674 | - **Input Validation**: Comprehensive parameter validation prevents injection attacks 675 | 676 | ## [2.8.3] - 2025-07-31 677 | 678 | ### Fixed 679 | - **Docker User Switching**: Fixed critical issue where user switching was completely broken in Alpine Linux containers 680 | - Added `su-exec` package for proper privilege dropping in Alpine containers 681 | - Fixed broken shell command in entrypoint that used invalid `exec $*` syntax 682 | - Fixed non-existent `printf %q` command in Alpine's BusyBox shell 683 | - Rewrote user switching logic to properly exec processes with nodejs user 684 | - Fixed race condition in database initialization by ensuring lock directory exists 685 | - **Docker Integration Tests**: Fixed failing tests due to Alpine Linux ps command behavior 686 | - Alpine's BusyBox ps shows numeric UIDs instead of usernames for non-system users 687 | - Tests now accept multiple possible values: "nodejs", "1001", or "1" (truncated) 688 | - Added proper process user verification instead of relying on docker exec output 689 | - Added demonstration test showing docker exec vs main process user context 690 | 691 | ### Security 692 | - **Command Injection Prevention**: Added comprehensive input validation in n8n-mcp wrapper 693 | - Whitelist-based argument validation to prevent command injection 694 | - Only allows safe arguments: --port, --host, --verbose, --quiet, --help, --version 695 | - Rejects any arguments containing shell metacharacters or suspicious content 696 | - **Database Initialization**: Added proper file locking to prevent race conditions 697 | - Uses flock for exclusive database initialization 698 | - Prevents multiple containers from corrupting database during simultaneous startup 699 | 700 | ### Testing 701 | - **Docker Test Reliability**: Comprehensive fixes for CI environment compatibility 702 | - Added Docker image build step in test setup 703 | - Fixed environment variable visibility tests to check actual process environment 704 | - Fixed user switching tests to check real process user instead of docker exec context 705 | - All 18 Docker integration tests now pass reliably in CI 706 | 707 | ### Changed 708 | - **Docker Base Image**: Updated su-exec installation in Dockerfile for proper user switching 709 | - **Error Handling**: Improved error messages and logging in Docker entrypoint script 710 | 711 | ## [2.8.2] - 2025-07-31 712 | 713 | ### Added 714 | - **Docker Configuration File Support**: Full support for JSON config files in Docker containers (fixes #105) 715 | - Parse JSON configuration files and safely export as environment variables 716 | - Support for `/app/config.json` mounting in Docker containers 717 | - Secure shell quoting to prevent command injection vulnerabilities 718 | - Dangerous environment variable blocking (PATH, LD_PRELOAD, etc.) 719 | - Key sanitization for invalid environment variable names 720 | - Support for all JSON data types with proper edge case handling 721 | 722 | ### Fixed 723 | - **Docker Server Mode**: Fixed Docker image failing to start in server mode 724 | - Added `n8n-mcp serve` command support in Docker entrypoint 725 | - Properly set HTTP mode when `serve` command is used 726 | - Fixed missing n8n-mcp binary in Docker image 727 | 728 | ### Security 729 | - **Command Injection Prevention**: Comprehensive security hardening for config parsing 730 | - Implemented POSIX-compliant shell quoting without using eval 731 | - Blocked dangerous environment variables that could affect system security 732 | - Added protection against shell metacharacters in configuration values 733 | - Sanitized configuration keys to prevent invalid shell variable names 734 | 735 | ### Testing 736 | - **Docker Configuration Tests**: Added 53 comprehensive tests for Docker config support 737 | - Unit tests for config parsing, security, and edge cases 738 | - Integration tests for Docker entrypoint behavior 739 | - Tests for serve command transformation 740 | - Security-focused tests for injection prevention 741 | 742 | ### Documentation 743 | - Updated Docker documentation with config file mounting examples 744 | - Added troubleshooting guide for Docker configuration issues 745 | 746 | ## [2.8.0] - 2025-07-30 747 | 748 | ### Added 749 | - **Enhanced Test Suite**: Expanded test coverage from 1,182 to 1,356 tests 750 | - **Unit Tests**: Increased from 933 to 1,107 tests across 44 files (was 30) 751 | - Added comprehensive edge case testing for all validators 752 | - Split large test files for better organization and maintainability 753 | - Added test documentation for common patterns and edge cases 754 | - Improved test factory patterns for better test data generation 755 | 756 | ### Fixed 757 | - **All Test Failures**: Achieved 100% test pass rate (was 99.5%) 758 | - Fixed logger tests by properly setting DEBUG environment variable 759 | - Fixed MSW configuration tests with proper environment restoration 760 | - Fixed workflow validator tests by adding proper connections between nodes 761 | - Fixed TypeScript compilation errors with explicit type annotations 762 | - Fixed ValidationResult mocks to include all required properties 763 | - Fixed environment variable handling in tests for better isolation 764 | 765 | ### Enhanced 766 | - **Test Organization**: Restructured test files for better maintainability 767 | - Split config-validator tests into 4 focused files: basic, edge-cases, node-specific, security 768 | - Added dedicated edge case test files for all validators 769 | - Improved test naming convention to "should X when Y" pattern 770 | - Better test isolation with proper setup/teardown 771 | 772 | ### Documentation 773 | - **Test Documentation**: Added comprehensive test guides 774 | - Created test documentation files for common patterns 775 | - Updated test counts in README.md to reflect new test suite 776 | - Added edge case testing guidelines 777 | 778 | ### CI/CD 779 | - **GitHub Actions**: Fixed permission issues 780 | - Added proper permissions for test, benchmark-pr, and publish workflows 781 | - Fixed status write permissions for benchmark comparisons 782 | - Note: Full permissions will take effect after merge to main branch 783 | 784 | ## [2.7.23] - 2025-07-30 785 | 786 | ### Added 787 | - **Comprehensive Testing Infrastructure**: Implemented complete test suite with 1,182 tests 788 | - **933 Unit Tests** across 30 files covering all services, parsers, database, and MCP layers 789 | - **249 Integration Tests** across 14 files for MCP protocol, database operations, and error handling 790 | - **Test Framework**: Vitest with TypeScript, coverage reporting, parallel execution 791 | - **Mock Strategy**: MSW for API mocking, database mocks, MCP SDK test utilities 792 | - **CI/CD**: GitHub Actions workflow with automated testing on all PRs 793 | - **Test Coverage**: Infrastructure in place with lcov, html, and Codecov integration 794 | - **Performance Testing**: Environment-aware thresholds (CI vs local) 795 | - **Database Isolation**: Each test gets its own database for parallel execution 796 | 797 | ### Fixed 798 | - **CI Test Failures**: Resolved all 115 initially failing integration tests 799 | - Fixed MCP response structure: `response.content[0].text` not `response[0].text` 800 | - Fixed `process.exit(0)` in test setup causing Vitest failures 801 | - Fixed database isolation issues for parallel test execution 802 | - Fixed environment-aware performance thresholds 803 | - Fixed MSW setup isolation preventing interference with unit tests 804 | - Fixed empty database handling in CI environment 805 | - Fixed TypeScript lint errors and strict mode compliance 806 | 807 | ### Enhanced 808 | - **Test Architecture**: Complete rewrite for production readiness 809 | - Proper test isolation with no shared state 810 | - Comprehensive custom assertions for MCP responses 811 | - Test data generators and builders for complex scenarios 812 | - Environment configuration for test modes 813 | - VSCode integration for debugging 814 | - Meaningful test organization with AAA pattern 815 | 816 | ### Documentation 817 | - **Testing Documentation**: Complete overhaul to reflect actual implementation 818 | - `docs/testing-architecture.md`: Comprehensive testing guide with real examples 819 | - Documented all 1,182 tests with distribution by component 820 | - Added lessons learned and common issues/solutions 821 | - Updated README with accurate test statistics and badges 822 | 823 | ### Maintenance 824 | - **Cleanup**: Removed 53 development artifacts and test coordination files 825 | - Deleted temporary agent briefings and coordination documents 826 | - Updated .gitignore to prevent future accumulation 827 | - Cleaned up all `FIX_*.md` and `AGENT_*.md` files 828 | 829 | ## [2.7.22] - 2025-07-28 830 | 831 | ### Security 832 | - **Docker base images**: Updated from Node.js 20 Alpine to Node.js 22 LTS Alpine 833 | - Addresses known vulnerabilities in older Alpine images 834 | - Provides better long-term support with Node.js 22 LTS (supported until April 2027) 835 | - All Dockerfiles updated: `Dockerfile`, `Dockerfile.railway`, `Dockerfile.test` 836 | - Docker Compose extractor service updated to use Node.js 22 837 | - Documentation updated to reflect new base image version 838 | 839 | ### Compatibility 840 | - Tested and verified compatibility with Node.js 22 LTS 841 | - All dependencies work correctly with the new Node.js version 842 | - Docker builds complete successfully with improved security posture 843 | 844 | ## [2.7.21] - 2025-07-23 845 | 846 | ### Updated 847 | - **n8n Dependencies**: Updated to latest versions for compatibility and new features 848 | - n8n: 1.102.4 → 1.103.2 849 | - n8n-core: 1.101.2 → 1.102.1 850 | - n8n-workflow: 1.99.1 → 1.100.0 851 | - @n8n/n8n-nodes-langchain: 1.101.2 → 1.102.1 852 | - **Node Database**: Rebuilt with 532 nodes from updated n8n packages 853 | - All validation tests passing with updated dependencies 854 | 855 | ## [2.7.20] - 2025-07-18 856 | 857 | ### Fixed 858 | - **Docker container cleanup on session end** (Issue #66) 859 | - Fixed containers not responding to termination signals when Claude Desktop sessions end 860 | - Added proper SIGTERM/SIGINT signal handlers to stdio-wrapper.ts 861 | - Removed problematic trap commands from docker-entrypoint.sh 862 | - Added STOPSIGNAL directive to Dockerfile for explicit signal handling 863 | - Implemented graceful shutdown in MCP server with database cleanup 864 | - Added stdin close detection for proper cleanup when Claude Desktop closes the pipe 865 | - Containers now properly exit with the `--rm` flag, preventing accumulation 866 | - Recommended using `--init` flag in Docker run command for best signal handling 867 | 868 | ### Documentation 869 | - Updated README with container lifecycle management best practices 870 | - Added `--init` flag to all Docker configuration examples 871 | - Added troubleshooting section for container accumulation issues 872 | 873 | ## [2.7.19] - 2025-07-18 874 | 875 | ### Fixed 876 | - **Enhanced node type format normalization** (Issue #74) 877 | - Fixed issue where `n8n-nodes-langchain.chattrigger` (incorrect format) was not being normalized 878 | - Added support for `n8n-nodes-langchain.*` → `nodes-langchain.*` normalization (without @n8n/ prefix) 879 | - Implemented case-insensitive node name matching (e.g., `chattrigger` → `chatTrigger`) 880 | - Added smart camelCase detection for common patterns (trigger, request, sheets, etc.) 881 | - Fixed `get_node_documentation` tool to use same normalization logic as other tools 882 | - All MCP tools now consistently handle various format variations: 883 | - `nodes-langchain.chatTrigger` (correct format) 884 | - `n8n-nodes-langchain.chatTrigger` (package format) 885 | - `n8n-nodes-langchain.chattrigger` (package + wrong case) 886 | - `nodes-langchain.chattrigger` (wrong case only) 887 | - `@n8n/n8n-nodes-langchain.chatTrigger` (full npm format) 888 | - Updated all 7 node lookup locations to use normalized types for alternatives generation 889 | - Enhanced `getNodeTypeAlternatives()` to normalize all generated alternatives 890 | 891 | ## [2.7.18] - 2025-07-18 892 | 893 | ### Fixed 894 | - **Node type prefix normalization for AI agents** (Issue #71) 895 | - AI agents can now use node types directly from n8n workflow exports without manual conversion 896 | - Added automatic normalization: `n8n-nodes-base.httpRequest` → `nodes-base.httpRequest` 897 | - Added automatic normalization: `@n8n/n8n-nodes-langchain.agent` → `nodes-langchain.agent` 898 | - Fixed 9 MCP tools that were failing with full package names: 899 | - `get_node_info`, `get_node_essentials`, `get_node_as_tool_info` 900 | - `search_node_properties`, `validate_node_minimal`, `validate_node_config` 901 | - `get_property_dependencies`, `search_nodes`, `get_node_documentation` 902 | - Maintains backward compatibility - existing short prefixes continue to work 903 | - Created centralized `normalizeNodeType` utility for consistent handling across all tools 904 | - **Health check endpoint** - Fixed incorrect `/health` endpoint usage 905 | - Now correctly uses `/healthz` endpoint which is available on all n8n instances 906 | - Improved error handling with proper fallback to workflow list endpoint 907 | - Fixed axios import for healthz endpoint access 908 | - **n8n_list_workflows pagination clarity** (Issue #54) 909 | - Changed misleading `total` field to `returned` to clarify it's the count of items in current page 910 | - Added `hasMore` boolean flag for clear pagination indication 911 | - Added `_note` field with guidance when more data is available ("More workflows available. Use cursor to get next page.") 912 | - Applied same improvements to `n8n_list_executions` for consistency 913 | - AI agents now correctly understand they need to use pagination instead of assuming limited total workflows 914 | 915 | ### Added 916 | - **Node type utilities** in `src/utils/node-utils.ts` 917 | - `normalizeNodeType()` - Converts full package names to database format 918 | - `getNodeTypeAlternatives()` - Provides fallback options for edge cases 919 | - `getWorkflowNodeType()` - Constructs proper n8n workflow format from database values 920 | - **workflowNodeType field** in all MCP tool responses that return node information 921 | - AI agents now receive both `nodeType` (internal format) and `workflowNodeType` (n8n format) 922 | - Example: `nodeType: "nodes-base.webhook"`, `workflowNodeType: "n8n-nodes-base.webhook"` 923 | - Prevents confusion where AI agents would search nodes and use wrong format in workflows 924 | - Added to: `search_nodes`, `get_node_info`, `get_node_essentials`, `get_node_as_tool_info`, `validate_node_operation` 925 | - **Version information in health check** 926 | - `n8n_health_check` now returns MCP version and supported n8n version 927 | - Added `mcpVersion`, `supportedN8nVersion`, and `versionNote` fields 928 | - Includes instructions for AI agents to inform users about version compatibility 929 | - Note: n8n API currently doesn't expose instance version, so manual verification is required 930 | 931 | ### Performance 932 | - **n8n_list_workflows response size optimization** 933 | - Tool now returns only minimal metadata (id, name, active, dates, tags, nodeCount) instead of full workflow structure 934 | - Reduced response size by ~95% - from potentially thousands of tokens per workflow to ~10 tokens 935 | - Eliminated token limit errors when listing workflows with many nodes 936 | - Updated tool description to clarify it returns "minimal metadata only" 937 | - Users should use `n8n_get_workflow` to fetch full workflow details when needed 938 | 939 | ## [2.7.17] - 2025-07-17 940 | 941 | ### Fixed 942 | - **Removed faulty auto-generated examples from MCP tools** (Issue #60) 943 | - Removed examples from `get_node_essentials` responses that were misleading AI agents 944 | - Removed examples from `validate_node_operation` when validation errors occur 945 | - Examples were showing incorrect configurations (e.g., Slack showing "channel" property instead of required "select" property) 946 | - Tools now focus on validation errors and fix suggestions instead of potentially incorrect examples 947 | - Preserved helpful format hints in `get_node_for_task` (these show input formats like "#general" or URL examples, not node configurations) 948 | - This change reduces confusion and helps AI agents build correct workflows on the first attempt 949 | 950 | ### Changed 951 | - Updated tool documentation to reflect removal of auto-generated examples 952 | - `get_node_essentials` now points users to `validate_node_operation` for working configurations 953 | - Enhanced validation error messages to be more helpful without relying on examples 954 | 955 | ## [2.7.16] - 2025-07-17 956 | 957 | ### Added 958 | - **Comprehensive MCP tools documentation** (Issue #60) 959 | - Documented 30 previously undocumented MCP tools 960 | - Added complete parameter descriptions, examples, and best practices 961 | - Implemented modular documentation system with per-tool files 962 | - Documentation optimized for AI agent consumption (utilitarian approach) 963 | - Added documentation for all n8n management tools (n8n_*) 964 | - Added documentation for workflow validation tools 965 | - Added documentation for template management tools 966 | - Improved `tools_documentation()` to serve as central documentation hub 967 | 968 | ### Enhanced 969 | - **Tool documentation system** completely rewritten for AI optimization 970 | - Each tool now has its own documentation module 971 | - Consistent structure: description, parameters, examples, tips, common errors 972 | - AI-friendly formatting with clear sections and examples 973 | - Reduced redundancy while maintaining completeness 974 | 975 | ## [2.7.15] - 2025-07-15 976 | 977 | ### Fixed 978 | - **HTTP Server URL Handling**: Fixed hardcoded localhost URLs in HTTP server output (Issue #41, #42) 979 | - Added intelligent URL detection that considers BASE_URL, PUBLIC_URL, and proxy headers 980 | - Server now displays correct public URLs when deployed behind reverse proxies 981 | - Added support for X-Forwarded-Proto and X-Forwarded-Host headers when TRUST_PROXY is enabled 982 | - Fixed port display logic to hide standard ports (80/443) in URLs 983 | - Added new GET endpoints (/, /mcp) for better API discovery 984 | 985 | ### Security 986 | - **Host Header Injection Prevention**: Added hostname validation to prevent malicious proxy headers 987 | - Only accepts valid hostnames (alphanumeric, dots, hyphens, optional port) 988 | - Rejects hostnames with paths, usernames, or special characters 989 | - Falls back to safe defaults when invalid headers are detected 990 | - **URL Scheme Validation**: Restricted URL schemes to http/https only 991 | - Blocks dangerous schemes like javascript:, file://, data: 992 | - Validates all configured URLs (BASE_URL, PUBLIC_URL) 993 | - **Information Disclosure**: Removed sensitive environment data from API responses 994 | - Root endpoint no longer exposes internal configuration 995 | - Only shows essential API information 996 | 997 | ### Added 998 | - **URL Detection Utility**: New `url-detector.ts` module for intelligent URL detection 999 | - Prioritizes explicit configuration (BASE_URL/PUBLIC_URL) 1000 | - Falls back to proxy headers when TRUST_PROXY is enabled 1001 | - Uses host/port configuration as final fallback 1002 | - Includes comprehensive security validations 1003 | - **Test Scripts**: Added test scripts for URL configuration and security validation 1004 | - `test-url-configuration.ts`: Tests various URL detection scenarios 1005 | - `test-security.ts`: Validates security fixes for malicious headers 1006 | 1007 | ### Changed 1008 | - **Consistent Versioning**: Fixed version inconsistency between server implementations 1009 | - Both http-server.ts and http-server-single-session.ts now use PROJECT_VERSION 1010 | - Removed hardcoded version strings 1011 | - **HTTP Bridge**: Updated to use HOST/PORT environment variables for default URL construction 1012 | - **Documentation**: Updated HTTP deployment guide with URL configuration section 1013 | 1014 | ## [2.7.14] - 2025-07-15 1015 | 1016 | ### Fixed 1017 | - **Partial Update Tool**: Fixed validation/execution discrepancy that caused "settings must NOT have additional properties" error (Issue #45) 1018 | - Removed logic in `cleanWorkflowForUpdate` that was incorrectly adding default settings to workflows 1019 | - The function now only removes read-only fields without adding any new properties 1020 | - This fixes the issue where partial updates would pass validation but fail during execution 1021 | - Added comprehensive test coverage in `test-issue-45-fix.ts` 1022 | 1023 | ## [2.7.13] - 2025-07-11 1024 | 1025 | ### Fixed 1026 | - **npx Execution**: Fixed WASM file resolution for sql.js when running via `npx n8n-mcp` (Issue #31) 1027 | - Enhanced WASM file locator to try multiple path resolution strategies 1028 | - Added `require.resolve()` for reliable package location in npm environments 1029 | - Made better-sqlite3 an optional dependency to prevent installation failures 1030 | - Improved error messages when sql.js fails to load 1031 | - The package now works correctly with `npx` without any manual configuration 1032 | 1033 | ### Changed 1034 | - **Database Adapter**: Improved path resolution for both local development and npm package contexts 1035 | - Supports various npm installation scenarios (global, local, npx cache) 1036 | - Better fallback handling for sql.js WebAssembly file loading 1037 | 1038 | ## [2.7.12] - 2025-07-10 1039 | 1040 | ### Updated 1041 | - **n8n Dependencies**: Updated to latest versions for compatibility and new features 1042 | - n8n: 1.100.1 → 1.101.1 1043 | - n8n-core: 1.99.0 → 1.100.0 1044 | - n8n-workflow: 1.97.0 → 1.98.0 1045 | - @n8n/n8n-nodes-langchain: 1.99.0 → 1.100.1 1046 | - **Node Database**: Rebuilt with 528 nodes from updated n8n packages 1047 | - All validation tests passing with updated dependencies 1048 | 1049 | ## [2.7.11] - 2025-07-10 1050 | 1051 | ### Enhanced 1052 | - **Token Efficiency**: Significantly reduced MCP tool description lengths for better AI agent performance 1053 | - Documentation tools: Average 129 chars (down from ~250-450) 1054 | - Management tools: Average 93 chars (down from ~200-400) 1055 | - Overall token reduction: ~65-70% 1056 | - Moved detailed documentation to `tools_documentation()` system 1057 | - Only 2 tools exceed 200 chars (list_nodes: 204, n8n_update_partial_workflow: 284) 1058 | - Preserved all essential information while removing redundancy 1059 | 1060 | ### Fixed 1061 | - **search_nodes Tool**: Major improvements to search functionality for AI agents 1062 | - Primary nodes (webhook, httpRequest) now appear first in search results instead of being buried 1063 | - Fixed issue where searching "webhook" returned specialized triggers instead of the main Webhook node 1064 | - Fixed issue where searching "http call" didn't prioritize HTTP Request node 1065 | - Fixed FUZZY mode returning no results for typos like "slak" (lowered threshold from 300 to 200) 1066 | - Removed unnecessary searchInfo messages that appeared on every search 1067 | - Fixed HTTP node type comparison case sensitivity issue 1068 | - Implemented relevance-based ranking with special boosting for primary nodes 1069 | - **search_templates FTS5 Error**: Fixed "no such module: fts5" error in environments without FTS5 support (fixes Claude Desktop issue) 1070 | - Made FTS5 completely optional - detects support at runtime 1071 | - Removed FTS5 from required schema to prevent initialization failures 1072 | - Automatically falls back to LIKE search when FTS5 is unavailable 1073 | - FTS5 tables and triggers created conditionally only if supported 1074 | - Template search now works in ALL SQLite environments 1075 | 1076 | ### Added 1077 | - **FTS5 Full-Text Search**: Added SQLite FTS5 support for faster and more intelligent node searching 1078 | - Automatic fallback to LIKE queries if FTS5 is unavailable 1079 | - Supports advanced search modes: OR (default), AND (all terms required), FUZZY (typo-tolerant) 1080 | - Significantly improves search performance for large databases 1081 | - FUZZY mode now uses edit distance (Levenshtein) for better typo tolerance 1082 | - **FTS5 Detection**: Added runtime detection of FTS5 support 1083 | - `checkFTS5Support()` method in database adapters 1084 | - Conditional initialization of FTS5 features 1085 | - Graceful degradation when FTS5 not available 1086 | 1087 | ## [Unreleased] 1088 | 1089 | ### Fixed 1090 | - **Code Node Documentation**: Corrected information about `$helpers` object and `getWorkflowStaticData` function 1091 | - `$getWorkflowStaticData()` is a standalone function, NOT `$helpers.getWorkflowStaticData()` 1092 | - Updated Code node guide to clarify which functions are standalone vs methods on $helpers 1093 | - Added validation warning when using incorrect `$helpers.getWorkflowStaticData` syntax 1094 | - Based on n8n community feedback and GitHub issues showing this is a common confusion point 1095 | 1096 | ### Added 1097 | - **Expression vs Code Node Clarification**: Added comprehensive documentation about differences between expression and Code node contexts 1098 | - New section "IMPORTANT: Code Node vs Expression Context" explaining key differences 1099 | - Lists expression-only functions not available in Code nodes ($now(), $today(), Tournament template functions) 1100 | - Clarifies different syntax: $('Node Name') vs $node['Node Name'] 1101 | - Documents reversed JMESPath parameter order between contexts 1102 | - Added "Expression Functions NOT in Code Nodes" section with alternatives 1103 | - **Enhanced Code Node Validation**: Added new validation checks for common expression/Code node confusion 1104 | - Detects expression syntax {{...}} in Code nodes with clear error message 1105 | - Warns about using $node[] syntax instead of $() in Code nodes 1106 | - Identifies expression-only functions with helpful alternatives 1107 | - Checks for wrong JMESPath parameter order 1108 | - Test script `test-expression-code-validation.ts` to verify validation works correctly 1109 | 1110 | ## [2.7.11] - 2025-07-09 1111 | 1112 | ### Fixed 1113 | - **Issue #26**: Fixed critical issue where AI agents were placing error handling properties inside `parameters` instead of at node level 1114 | - Root cause: AI agents were confused by examples showing `parameters.path` updates and assumed all properties followed the same pattern 1115 | - Error handling properties (`onError`, `retryOnFail`, `maxTries`, `waitBetweenTries`, `alwaysOutputData`) must be placed at the NODE level 1116 | - Other node-level properties (`executeOnce`, `disabled`, `notes`, `notesInFlow`, `credentials`) were previously undocumented for AI agents 1117 | - Updated `n8n_create_workflow` and `n8n_update_partial_workflow` documentation with explicit examples and warnings 1118 | - Verified fix with workflows tGyHrsBNWtaK0inQ, usVP2XRXhI35m3Ts, and swuogdCCmNY7jj71 1119 | 1120 | ### Added 1121 | - **Comprehensive Node-Level Properties Reference** in tools documentation (`tools_documentation()`) 1122 | - Documents ALL available node-level properties with explanations 1123 | - Shows correct placement and usage for each property 1124 | - Provides complete example node configuration 1125 | - Accessible via `tools_documentation({depth: "full"})` for AI agents 1126 | - **Enhanced Workflow Validation** for additional node-level properties 1127 | - Now validates `executeOnce`, `disabled`, `notes`, `notesInFlow` types 1128 | - Checks for misplacement of ALL node-level properties (expanded from 6 to 11) 1129 | - Provides clear error messages with correct examples when properties are misplaced 1130 | - Shows specific fix with example node structure 1131 | - **Test Script** `test-node-level-properties.ts` demonstrating correct usage 1132 | - Shows all node-level properties in proper configuration 1133 | - Demonstrates common mistakes to avoid 1134 | - Validates workflow configurations 1135 | - **Comprehensive Code Node Documentation** in tools_documentation 1136 | - New `code_node_guide` topic with complete reference for JavaScript and Python 1137 | - Covers all built-in variables: $input, $json, $node, $workflow, $execution, $prevNode 1138 | - Documents helper functions: DateTime (Luxon), JMESPath, $helpers methods 1139 | - Includes return format requirements with correct/incorrect examples 1140 | - Security considerations and banned operations 1141 | - Common patterns: data transformation, filtering, aggregation, error handling 1142 | - Code node as AI tool examples 1143 | - Performance best practices and debugging tips 1144 | - **Enhanced Code Node Validation** with n8n-specific patterns 1145 | - Validates return statement presence and format 1146 | - Checks for array of objects with json property 1147 | - Detects common mistakes (returning primitives, missing array wrapper) 1148 | - Validates n8n variable usage ($input, items, $json context) 1149 | - Security checks (eval, exec, require, file system access) 1150 | - Language-specific validation for JavaScript and Python 1151 | - Mode-specific warnings ($json in wrong mode) 1152 | - Async/await pattern validation 1153 | - External library detection with helpful alternatives 1154 | - **Expanded Code Node Examples** in ExampleGenerator 1155 | - Data transformation, aggregation, and filtering examples 1156 | - API integration with error handling 1157 | - Python data processing example 1158 | - Code node as AI tool pattern 1159 | - CSV to JSON transformation 1160 | - All examples include proper return format 1161 | - **New Code Node Task Templates** 1162 | - `custom_ai_tool`: Create custom tools for AI agents 1163 | - `aggregate_data`: Summary statistics from multiple items 1164 | - `batch_process_with_api`: Process items in batches with rate limiting 1165 | - `error_safe_transform`: Robust data transformation with validation 1166 | - `async_data_processing`: Concurrent processing with limits 1167 | - `python_data_analysis`: Statistical analysis using Python 1168 | - All templates include comprehensive error handling 1169 | - **Fixed Misleading Documentation** based on real-world testing: 1170 | - **Crypto Module**: Clarified that `require('crypto')` IS available despite editor warnings 1171 | - **Helper Functions**: Fixed documentation showing `$getWorkflowStaticData()` is standalone, not on $helpers 1172 | - **JMESPath**: Corrected syntax from `jmespath.search()` to `$jmespath()` 1173 | - **Node Access**: Fixed from `$node['Node Name']` to `$('Node Name')` 1174 | - **Python**: Documented `item.json.to_py()` for JsProxy conversion 1175 | - Added comprehensive "Available Functions and Libraries" section 1176 | - Created security examples showing proper crypto usage 1177 | - **JMESPath Numeric Literals**: Added critical documentation about n8n-specific requirement for backticks around numbers in filters 1178 | - Example: `[?age >= \`18\`]` not `[?age >= 18]` 1179 | - Added validation to detect and warn about missing backticks 1180 | - Based on Claude Desktop feedback from workflow testing 1181 | - **Webhook Data Structure**: Fixed common webhook data access gotcha 1182 | - Webhook payload is at `items[0].json.body`, NOT `items[0].json` 1183 | - Added dedicated "Webhook Data Access" section in Code node documentation 1184 | - Created webhook processing example showing correct data access 1185 | - Added validation to detect incorrect webhook data access patterns 1186 | - New task template `process_webhook_data` with complete example 1187 | 1188 | ### Enhanced 1189 | - **MCP Tool Documentation** significantly improved: 1190 | - `n8n_create_workflow` now includes complete node example with all properties 1191 | - `n8n_update_partial_workflow` shows difference between node-level vs parameter updates 1192 | - Added "CRITICAL" warnings about property placement 1193 | - Updated best practices and common pitfalls sections 1194 | - **Workflow Validator** improvements: 1195 | - Expanded property checking from 6 to 11 node-level properties 1196 | - Better error messages showing complete correct structure 1197 | - Type validation for all node-level boolean and string properties 1198 | - **Code Node Validation** enhanced with new checks: 1199 | - Detects incorrect `$helpers.getWorkflowStaticData()` usage 1200 | - Warns about `$helpers` usage without availability check 1201 | - Validates crypto usage with proper require statement 1202 | - All based on common errors found in production workflows 1203 | - **Type Definitions** updated: 1204 | - Added `notesInFlow` to WorkflowNode interface in workflow-validator.ts 1205 | - Fixed credentials type from `Record<string, string>` to `Record<string, unknown>` in n8n-api.ts 1206 | - **NodeSpecificValidators** now includes comprehensive Code node validation 1207 | - Language-specific syntax checks 1208 | - Return format validation with detailed error messages 1209 | - n8n variable usage validation 1210 | - Security pattern detection 1211 | - Error handling recommendations 1212 | - Mode-specific suggestions 1213 | - **Config Validator** improved Code node validation 1214 | - Better return statement detection 1215 | - Enhanced syntax checking for both JavaScript and Python 1216 | - More helpful error messages with examples 1217 | - Detection of common n8n Code node mistakes 1218 | - **Fixed Documentation Inaccuracies** based on user testing and n8n official docs: 1219 | - JMESPath: Corrected syntax to `$jmespath()` instead of `jmespath.search()` 1220 | - Node Access: Fixed to show `$('Node Name')` syntax, not `$node` 1221 | - Python: Documented `_input.all()` and `item.json.to_py()` for JsProxy conversion 1222 | - Python: Added underscore prefix documentation for all built-in variables 1223 | - Validation: Skip property visibility warnings for Code nodes to reduce false positives 1224 | 1225 | ## [2.7.10] - 2025-07-09 1226 | 1227 | ### Documentation Update 1228 | - Added comprehensive documentation on how to update error handling properties using `n8n_update_partial_workflow` 1229 | - Error handling properties can be updated at the node level using the workflow diff engine: 1230 | - `continueOnFail`: boolean - Whether to continue workflow on node failure 1231 | - `onError`: 'continueRegularOutput' | 'continueErrorOutput' | 'stopWorkflow' - Error handling strategy 1232 | - `retryOnFail`: boolean - Whether to retry on failure 1233 | - `maxTries`: number - Maximum retry attempts 1234 | - `waitBetweenTries`: number - Milliseconds to wait between retries 1235 | - `alwaysOutputData`: boolean - Always output data even on error 1236 | - Added test script demonstrating error handling property updates 1237 | - Updated WorkflowNode type to include `onError` property in n8n-api types 1238 | - Workflow diff engine now properly handles all error handling properties 1239 | 1240 | ## [2.7.10] - 2025-07-07 1241 | 1242 | ### Added 1243 | - Enhanced authentication logging for better debugging of client authentication issues 1244 | - Specific error reasons for authentication failures: `no_auth_header`, `invalid_auth_format`, `invalid_token` 1245 | - AUTH_TOKEN_FILE support in single-session HTTP server for consistency 1246 | - Empty token validation to prevent security issues 1247 | - Whitespace trimming for authentication tokens 1248 | 1249 | ### Fixed 1250 | - Issue #22: Improved authentication failure diagnostics for mcp-remote client debugging 1251 | - Issue #16: Fixed AUTH_TOKEN_FILE validation for HTTP mode in Docker production stacks - Docker entrypoint now properly validates and supports AUTH_TOKEN_FILE environment variable 1252 | - Security: Removed token length from logs to prevent information disclosure 1253 | 1254 | ### Security 1255 | - Authentication tokens are now trimmed to handle whitespace edge cases 1256 | - Empty tokens are explicitly rejected with clear error messages 1257 | - Removed sensitive information (token lengths) from authentication logs 1258 | 1259 | ## [2.7.8] - 2025-07-06 1260 | 1261 | ### Added 1262 | - npx support for zero-installation usage - users can now run `npx n8n-mcp` without installing 1263 | - npm package distribution with runtime-only dependencies (8 deps vs 50+ dev deps) 1264 | - Dedicated publish script for npm releases with OTP support 1265 | - Database path resolution supporting npx, global, and local installations 1266 | 1267 | ### Fixed 1268 | - Issue #15: Added npx execution support as requested 1269 | - Removed development dependencies from npm package (reduced from 1GB+ to ~50MB) 1270 | - Node.js version conflicts by excluding n8n dependencies from runtime package 1271 | 1272 | ### Changed 1273 | - npm package now uses package.runtime.json for publishing (no n8n dependencies) 1274 | - Enhanced .gitignore to exclude npm publishing artifacts 1275 | - README now highlights npx as the primary installation method 1276 | 1277 | ## [2.7.5] - 2025-07-06 1278 | 1279 | ### Added 1280 | - AUTH_TOKEN_FILE support for reading authentication tokens from files (Docker secrets compatible) - partial implementation 1281 | - Known Issues section in README documenting Claude Desktop container duplication bug 1282 | - Enhanced authentication documentation in Docker README 1283 | 1284 | ### Fixed 1285 | - Issue #16: AUTH_TOKEN_FILE was documented but not implemented (partially fixed - see v2.7.10 for complete fix) 1286 | - HTTP server now properly supports both AUTH_TOKEN and AUTH_TOKEN_FILE environment variables 1287 | 1288 | ### Changed 1289 | - Authentication logic now checks AUTH_TOKEN first, then falls back to AUTH_TOKEN_FILE 1290 | - Updated Docker documentation to clarify authentication options 1291 | 1292 | ## [2.7.4] - 2025-07-03 1293 | 1294 | ### Changed 1295 | - Renamed `start_here_workflow_guide` tool to `tools_documentation` for better clarity 1296 | - Converted tool output from JSON to LLM-friendly plain text format 1297 | - Made documentation concise by default with "essentials" depth 1298 | 1299 | ### Added 1300 | - `depth` parameter to control documentation detail level ("essentials" or "full") 1301 | - Per-tool documentation - get help for any specific MCP tool 1302 | - Two-tier documentation system: 1303 | - Essentials: Brief description, key parameters, example, performance, tips 1304 | - Full: Complete documentation with all details, examples, best practices 1305 | - Quick reference mode when called without parameters 1306 | - Documentation for 8 commonly used tools 1307 | - Test script for tools documentation (`test:tools-documentation`) 1308 | 1309 | ### Removed 1310 | - Removed duplicate `tools_documentation` tool definition 1311 | - Removed unused `getWorkflowGuide` method (380+ lines) 1312 | - Removed old `handlers-documentation.ts` file 1313 | 1314 | ## [2.7.3] - 2025-07-02 1315 | 1316 | ### Added 1317 | - MCP Tools Documentation system (initial implementation) 1318 | - `tools_documentation` tool for comprehensive MCP tool documentation 1319 | - Documentation includes parameters, examples, best practices, and pitfalls 1320 | - Search tools by keyword functionality 1321 | - Browse tools by category 1322 | - Quick reference guide with workflow patterns 1323 | 1324 | ### Fixed 1325 | - Cleaned up redundant tool definitions 1326 | 1327 | ## [2.7.2] - 2025-07-01 1328 | 1329 | ### Fixed 1330 | - HTTP deployment documentation improvements 1331 | - Docker configuration updates with n8n API options 1332 | 1333 | ### Changed 1334 | - Updated version handling in multiple configuration files 1335 | 1336 | ## [2.7.1] - 2025-06-30 1337 | 1338 | ### Fixed 1339 | - Workflow diff engine edge cases 1340 | - Transactional update processing improvements 1341 | 1342 | ### Added 1343 | - Additional test coverage for diff operations 1344 | - Debug scripts for update operations 1345 | 1346 | ## [2.7.0] - 2025-06-29 1347 | 1348 | ### Added 1349 | - New `n8n_update_partial_workflow` tool for efficient diff-based workflow editing with transactional updates 1350 | - WorkflowDiffEngine for applying targeted edits without sending full workflow JSON (80-90% token savings) 1351 | - 13 diff operations: addNode, removeNode, updateNode, moveNode, enableNode, disableNode, addConnection, removeConnection, updateConnection, updateSettings, updateName, addTag, removeTag 1352 | - Smart node references supporting both node ID and name 1353 | - Transaction safety with validation before applying changes 1354 | - Validation-only mode for testing diff operations 1355 | - Comprehensive test coverage for all diff operations 1356 | - Example guide in `docs/workflow-diff-examples.md` 1357 | - Two-pass processing allowing operations in any order 1358 | - Operation limit of 5 operations per request for reliability 1359 | - `n8n_diagnostic` tool to troubleshoot management tools visibility issues 1360 | - Version utility (`src/utils/version.ts`) for centralized version management 1361 | - Script to sync package.runtime.json version 1362 | 1363 | ### Changed 1364 | - Renamed `n8n_update_workflow` to `n8n_update_full_workflow` to clarify it replaces entire workflow 1365 | - Renamed core MCP files for clarity: 1366 | - `tools-update.ts` → `tools.ts` 1367 | - `server-update.ts` → `server.ts` 1368 | - `http-server-fixed.ts` → `http-server.ts` 1369 | - Updated imports across 21+ files to use new file names 1370 | 1371 | ### Fixed 1372 | - Version mismatch issue where version was hardcoded instead of reading from package.json (GitHub issue #5) 1373 | - MCP validation error by simplifying schema to allow additional properties 1374 | - n8n API validation by removing all read-only fields in cleanWorkflowForUpdate 1375 | - Claude Desktop compatibility by adding additionalProperties: true 1376 | - Removed DEBUG console.log statements from MCP server 1377 | 1378 | ### Removed 1379 | - Legacy HTTP server implementation (`src/http-server.ts`) 1380 | - Unused legacy API client (`src/utils/n8n-client.ts`) 1381 | - Unnecessary file name suffixes (-update, -fixed) 1382 | 1383 | ## [2.6.3] - 2025-06-26 1384 | 1385 | ### Added 1386 | - `n8n_validate_workflow` tool to validate workflows directly from n8n instance by ID 1387 | - Fetches workflow from n8n API and runs comprehensive validation 1388 | - Supports all validation profiles and options 1389 | - Part of complete lifecycle: discover → build → validate → deploy → execute 1390 | 1391 | ## [2.6.2] - 2025-06-26 1392 | 1393 | ### Added 1394 | - Node type validation to verify node types exist in n8n 1395 | - Smart suggestions for common mistakes (e.g., `webhook` → `n8n-nodes-base.webhook`) 1396 | - Minimum viable workflow validation preventing single-node workflows (except webhooks) 1397 | - Empty connection detection for multi-node workflows 1398 | - Helper functions: `getWorkflowStructureExample()` and `getWorkflowFixSuggestions()` 1399 | 1400 | ### Fixed 1401 | - nodes-base prefix detection now catches errors before database lookup 1402 | - Enhanced error messages with clear guidance on proper workflow structure 1403 | 1404 | ## [2.6.1] - 2025-06-26 1405 | 1406 | ### Added 1407 | - typeVersion validation in workflow validator 1408 | - Enforces typeVersion on all versioned nodes 1409 | - Warns on outdated node versions 1410 | - Prevents invalid version numbers 1411 | 1412 | ### Fixed 1413 | - Missing typeVersion errors with correct version suggestions 1414 | - Invalid version detection exceeding maximum supported 1415 | 1416 | ## [2.6.0] - 2025-06-26 1417 | 1418 | ### Added 1419 | - 14 n8n management tools for complete workflow lifecycle management: 1420 | - `n8n_create_workflow` - Create workflows programmatically 1421 | - `n8n_update_workflow` - Update existing workflows 1422 | - `n8n_trigger_webhook_workflow` - Execute workflows via webhooks 1423 | - `n8n_list_executions` - Monitor workflow executions 1424 | - `n8n_health_check` - Check n8n instance connectivity 1425 | - And 9 more workflow and execution management tools 1426 | - Integration with n8n-manager-for-ai-agents functionality 1427 | - Conditional tool registration based on N8N_API_URL and N8N_API_KEY configuration 1428 | - Smart error handling for API limitations 1429 | 1430 | ## [2.5.1] - 2025-06-24 1431 | 1432 | ### Added 1433 | - `get_node_as_tool_info` tool for specific information about using ANY node as an AI tool 1434 | - Enhanced AI tool support with usage guidance 1435 | - Improved start_here_workflow_guide with Claude Project setup 1436 | 1437 | ### Changed 1438 | - Enhanced AI tool detection and documentation 1439 | - Updated documentation to match current state 1440 | 1441 | ## [2.5.0] - 2025-06-24 1442 | 1443 | ### Added 1444 | - Comprehensive workflow validation system: 1445 | - `validate_workflow` - Validate entire workflows before deployment 1446 | - `validate_workflow_connections` - Check workflow structure and connections 1447 | - `validate_workflow_expressions` - Validate all n8n expressions 1448 | - Expression validator for n8n syntax validation 1449 | - AI tool connection validation 1450 | - Phase 2 validation improvements 1451 | 1452 | ## [2.4.2] - 2025-06-24 1453 | 1454 | ### Added 1455 | - Enhanced operation-aware validation system 1456 | - `validate_node_operation` - Verify node configuration with operation awareness 1457 | - `validate_node_minimal` - Quick validation for required fields only 1458 | - Node-specific validation logic 1459 | - Validation profiles support 1460 | 1461 | ### Fixed 1462 | - Validation improvements based on AI agent feedback 1463 | 1464 | ## [2.4.1] - 2025-06-20 1465 | 1466 | ### Added 1467 | - n8n workflow templates integration: 1468 | - `list_node_templates` - Find workflow templates using specific nodes 1469 | - `get_template` - Get complete workflow JSON for import 1470 | - `search_templates` - Search templates by keywords 1471 | - `get_templates_for_task` - Get curated templates for common tasks 1472 | - Template fetching from n8n.io API 1473 | - Robust template fetching with retries 1474 | - Expanded template window from 6 months to 1 year 1475 | 1476 | ### Fixed 1477 | - Made templates available in Docker by removing axios from runtime 1478 | - Template service made optional in Docker environment 1479 | - Non-deterministic CHECK constraint removed from templates table 1480 | 1481 | ## [2.4.0] - 2025-06-18 1482 | 1483 | ### Added 1484 | - AI-optimized tools with 95% size reduction: 1485 | - `get_node_essentials` - Returns only essential properties (10-20) with examples 1486 | - `search_node_properties` - Find specific properties without downloading everything 1487 | - `get_node_for_task` - Get pre-configured node settings for common tasks 1488 | - `list_tasks` - List all available task templates 1489 | - `get_property_dependencies` - Analyze property dependencies and visibility conditions 1490 | - Property filter service with curated essential properties 1491 | - Example generator for common use cases 1492 | - Task templates with pre-configured settings 1493 | - Docker build optimization (82% smaller images, 10x faster builds) 1494 | 1495 | ### Changed 1496 | - Switched to MIT license for wider adoption 1497 | - Optimized Docker builds to exclude n8n dependencies at runtime 1498 | - Improved tool descriptions and added workflow guide tool 1499 | 1500 | ### Fixed 1501 | - Docker build failures in GitHub Actions 1502 | - Claude Desktop stdio communication issues 1503 | - Version array handling in node parser 1504 | 1505 | ### Removed 1506 | - Legacy MCP implementation files 1507 | - n8n dependencies from Docker runtime image 1508 | 1509 | ## [2.3.3] - 2025-06-16 1510 | 1511 | ### Added 1512 | - Smart dependency update system for n8n packages 1513 | - GitHub Actions workflow for automated n8n updates 1514 | - Alternative Renovate configuration 1515 | 1516 | ### Fixed 1517 | - n8n package interdependent version requirements 1518 | - Node type references in validation script 1519 | 1520 | ## [2.3.2] - 2025-06-14 1521 | 1522 | ### Added 1523 | - Single-session HTTP server architecture 1524 | - Direct JSON-RPC implementation for HTTP mode 1525 | - Console output isolation for clean JSON-RPC responses 1526 | 1527 | ### Fixed 1528 | - "stream is not readable" error in HTTP server 1529 | - "Server not initialized" error with StreamableHTTPServerTransport 1530 | - MCP HTTP server stream errors 1531 | 1532 | ## [2.3.1] - 2025-06-13 1533 | 1534 | ### Added 1535 | - HTTP server mode for remote deployment with token authentication 1536 | - MCP-compatible HTTP endpoints 1537 | - Security features: CORS, rate limiting, request size limits 1538 | - Comprehensive HTTP testing scripts 1539 | 1540 | ## [2.3.0] - 2025-06-12 1541 | 1542 | ### Added 1543 | - Universal Node.js compatibility with automatic database adapter fallback 1544 | - Database adapter pattern with BetterSQLiteAdapter and SQLJSAdapter 1545 | - Automatic adapter selection based on environment 1546 | - sql.js persistence layer with debounced saves 1547 | 1548 | ### Changed 1549 | - Database operations now use unified adapter interface 1550 | - Transparent adapter switching for different Node.js versions 1551 | 1552 | ## [2.2.0] - 2025-06-12 1553 | 1554 | ### Added 1555 | - Enhanced node parser with versioned node support 1556 | - Dedicated property extractor for complex node structures 1557 | - Full support for @n8n/n8n-nodes-langchain package 1558 | - AI tool detection (35 tools with usableAsTool property) 1559 | 1560 | ### Changed 1561 | - Major refactor based on IMPLEMENTATION_PLAN.md v2.2 1562 | - Improved property/operation extraction (452/458 nodes have properties) 1563 | - Enhanced documentation mapping 1564 | 1565 | ### Fixed 1566 | - VersionedNodeType handling 1567 | - Documentation mapping issues 1568 | - Property extraction for 98.7% of nodes 1569 | 1570 | ## [2.1.0] - 2025-06-09 1571 | 1572 | ### Added 1573 | - Node extraction scripts for n8n modules 1574 | - Docker setup for n8n module processing 1575 | - Enhanced documentation fetcher 1576 | - Node source extractor utility 1577 | 1578 | ## [2.0.0] - 2025-06-08 1579 | 1580 | ### Added 1581 | - Complete overhaul to enhanced documentation-only MCP server 1582 | - SQLite database with FTS5 for fast searching 1583 | - Comprehensive MCP tools for querying n8n nodes 1584 | - Node documentation service as core component 1585 | 1586 | ### Changed 1587 | - Architecture redesign focusing on documentation serving 1588 | - Removed workflow execution capabilities 1589 | - Simplified to documentation and knowledge serving 1590 | 1591 | ## [1.0.0] - 2025-06-08 1592 | 1593 | ### Added 1594 | - Initial release 1595 | - Basic n8n and MCP integration 1596 | - Core workflow automation features 1597 | 1598 | [2.12.0]: https://github.com/czlonkowski/n8n-mcp/compare/v2.11.3...v2.12.0 1599 | [2.11.3]: https://github.com/czlonkowski/n8n-mcp/compare/v2.11.2...v2.11.3 1600 | [2.11.2]: https://github.com/czlonkowski/n8n-mcp/compare/v2.11.1...v2.11.2 1601 | [2.11.1]: https://github.com/czlonkowski/n8n-mcp/compare/v2.11.0...v2.11.1 1602 | [2.11.0]: https://github.com/czlonkowski/n8n-mcp/compare/v2.10.9...v2.11.0 1603 | [2.10.9]: https://github.com/czlonkowski/n8n-mcp/compare/v2.10.8...v2.10.9 1604 | [2.10.8]: https://github.com/czlonkowski/n8n-mcp/compare/v2.10.5...v2.10.8 1605 | [2.10.5]: https://github.com/czlonkowski/n8n-mcp/compare/v2.10.4...v2.10.5 1606 | [2.10.4]: https://github.com/czlonkowski/n8n-mcp/compare/v2.10.3...v2.10.4 1607 | [2.10.3]: https://github.com/czlonkowski/n8n-mcp/compare/v2.10.2...v2.10.3 1608 | [2.10.2]: https://github.com/czlonkowski/n8n-mcp/compare/v2.10.1...v2.10.2 1609 | [2.10.1]: https://github.com/czlonkowski/n8n-mcp/compare/v2.10.0...v2.10.1 1610 | [2.10.0]: https://github.com/czlonkowski/n8n-mcp/compare/v2.9.1...v2.10.0 1611 | [2.9.1]: https://github.com/czlonkowski/n8n-mcp/compare/v2.9.0...v2.9.1 1612 | [2.9.0]: https://github.com/czlonkowski/n8n-mcp/compare/v2.8.3...v2.9.0 1613 | [2.8.3]: https://github.com/czlonkowski/n8n-mcp/compare/v2.8.2...v2.8.3 1614 | [2.8.2]: https://github.com/czlonkowski/n8n-mcp/compare/v2.8.0...v2.8.2 1615 | [2.8.0]: https://github.com/czlonkowski/n8n-mcp/compare/v2.7.23...v2.8.0 1616 | [2.7.23]: https://github.com/czlonkowski/n8n-mcp/compare/v2.7.22...v2.7.23 1617 | [2.7.22]: https://github.com/czlonkowski/n8n-mcp/compare/v2.7.21...v2.7.22 1618 | [2.7.21]: https://github.com/czlonkowski/n8n-mcp/compare/v2.7.20...v2.7.21 1619 | [2.7.20]: https://github.com/czlonkowski/n8n-mcp/compare/v2.7.19...v2.7.20 1620 | [2.7.19]: https://github.com/czlonkowski/n8n-mcp/compare/v2.7.18...v2.7.19 1621 | [2.7.18]: https://github.com/czlonkowski/n8n-mcp/compare/v2.7.17...v2.7.18 1622 | [2.7.17]: https://github.com/czlonkowski/n8n-mcp/compare/v2.7.16...v2.7.17 1623 | [2.7.16]: https://github.com/czlonkowski/n8n-mcp/compare/v2.7.15...v2.7.16 1624 | [2.7.15]: https://github.com/czlonkowski/n8n-mcp/compare/v2.7.13...v2.7.15 1625 | [2.7.13]: https://github.com/czlonkowski/n8n-mcp/compare/v2.7.12...v2.7.13 1626 | [2.7.12]: https://github.com/czlonkowski/n8n-mcp/compare/v2.7.11...v2.7.12 1627 | [2.7.11]: https://github.com/czlonkowski/n8n-mcp/compare/v2.7.10...v2.7.11 1628 | [2.7.10]: https://github.com/czlonkowski/n8n-mcp/compare/v2.7.8...v2.7.10 1629 | [2.7.8]: https://github.com/czlonkowski/n8n-mcp/compare/v2.7.5...v2.7.8 1630 | [2.7.5]: https://github.com/czlonkowski/n8n-mcp/compare/v2.7.4...v2.7.5 1631 | [2.7.4]: https://github.com/czlonkowski/n8n-mcp/compare/v2.7.3...v2.7.4 1632 | [2.7.3]: https://github.com/czlonkowski/n8n-mcp/compare/v2.7.2...v2.7.3 1633 | [2.7.2]: https://github.com/czlonkowski/n8n-mcp/compare/v2.7.1...v2.7.2 1634 | [2.7.1]: https://github.com/czlonkowski/n8n-mcp/compare/v2.7.0...v2.7.1 1635 | [2.7.0]: https://github.com/czlonkowski/n8n-mcp/compare/v2.6.3...v2.7.0 1636 | [2.6.3]: https://github.com/czlonkowski/n8n-mcp/compare/v2.6.2...v2.6.3 1637 | [2.6.2]: https://github.com/czlonkowski/n8n-mcp/compare/v2.6.1...v2.6.2 1638 | [2.6.1]: https://github.com/czlonkowski/n8n-mcp/compare/v2.6.0...v2.6.1 1639 | [2.6.0]: https://github.com/czlonkowski/n8n-mcp/compare/v2.5.1...v2.6.0 1640 | [2.5.1]: https://github.com/czlonkowski/n8n-mcp/compare/v2.5.0...v2.5.1 1641 | [2.5.0]: https://github.com/czlonkowski/n8n-mcp/compare/v2.4.2...v2.5.0 1642 | [2.4.2]: https://github.com/czlonkowski/n8n-mcp/compare/v2.4.1...v2.4.2 1643 | [2.4.1]: https://github.com/czlonkowski/n8n-mcp/compare/v2.4.0...v2.4.1 1644 | [2.4.0]: https://github.com/czlonkowski/n8n-mcp/compare/v2.3.3...v2.4.0 1645 | [2.3.3]: https://github.com/czlonkowski/n8n-mcp/compare/v2.3.2...v2.3.3 1646 | [2.3.2]: https://github.com/czlonkowski/n8n-mcp/compare/v2.3.1...v2.3.2 1647 | [2.3.1]: https://github.com/czlonkowski/n8n-mcp/compare/v2.3.0...v2.3.1 1648 | [2.3.0]: https://github.com/czlonkowski/n8n-mcp/compare/v2.2.0...v2.3.0 1649 | [2.2.0]: https://github.com/czlonkowski/n8n-mcp/compare/v2.1.0...v2.2.0 1650 | [2.1.0]: https://github.com/czlonkowski/n8n-mcp/compare/v2.0.0...v2.1.0 1651 | [2.0.0]: https://github.com/czlonkowski/n8n-mcp/compare/v1.0.0...v2.0.0 1652 | [1.0.0]: https://github.com/czlonkowski/n8n-mcp/releases/tag/v1.0.0 ```