From 27339ec78da951d7a3af0135abaf16edf8971d95 Mon Sep 17 00:00:00 2001 From: czlonkowski <56956555+czlonkowski@users.noreply.github.com> Date: Wed, 24 Sep 2025 13:03:10 +0200 Subject: [PATCH] chore: release v2.13.0 - webhook autofixer and enhanced node suggestions MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit ## 🎉 Release Highlights ### ✨ New Features - **Webhook Path Autofixer**: Automatically generates UUIDs for webhook nodes missing path configuration - **Enhanced Node Type Suggestions**: Intelligent node type correction with similarity matching - **n8n_autofix_workflow Tool**: New MCP tool for automatic workflow error correction ### 🔒 Security & Performance - Eliminated ReDoS vulnerability in NodeSimilarityService - Optimized Levenshtein distance algorithm from O(m*n) to O(n) space - Added cache invalidation with version tracking to prevent memory leaks ### 📚 Documentation - Comprehensive CHANGELOG entry with detailed feature descriptions - Updated README with new autofixer tool documentation - Added tool usage examples in validation workflow All 16 test cases passing with 100% success rate. 🤖 Generated with [Claude Code](https://claude.ai/code) Co-Authored-By: Claude --- README.md | 10 ++++++---- docs/CHANGELOG.md | 44 ++++++++++++++++++++++++++++++++++++++++++++ package.json | 2 +- package.runtime.json | 2 +- 4 files changed, 52 insertions(+), 6 deletions(-) diff --git a/README.md b/README.md index 090f3c8..ff840c5 100644 --- a/README.md +++ b/README.md @@ -2,7 +2,7 @@ [![License: MIT](https://img.shields.io/badge/License-MIT-yellow.svg)](https://opensource.org/licenses/MIT) [![GitHub stars](https://img.shields.io/github/stars/czlonkowski/n8n-mcp?style=social)](https://github.com/czlonkowski/n8n-mcp) -[![Version](https://img.shields.io/badge/version-2.12.2-blue.svg)](https://github.com/czlonkowski/n8n-mcp) +[![Version](https://img.shields.io/badge/version-2.13.0-blue.svg)](https://github.com/czlonkowski/n8n-mcp) [![npm version](https://img.shields.io/npm/v/n8n-mcp.svg)](https://www.npmjs.com/package/n8n-mcp) [![codecov](https://codecov.io/gh/czlonkowski/n8n-mcp/graph/badge.svg?token=YOUR_TOKEN)](https://codecov.io/gh/czlonkowski/n8n-mcp) [![Tests](https://img.shields.io/badge/tests-1728%20passing-brightgreen.svg)](https://github.com/czlonkowski/n8n-mcp/actions) @@ -360,7 +360,7 @@ You are an expert in n8n automation software using n8n-MCP tools. Your role is t 2. **Template Discovery Phase** - `search_templates_by_metadata({complexity: "simple"})` - Find skill-appropriate templates - `get_templates_for_task('webhook_processing')` - Get curated templates by task - - `search_templates('slack notification')` - Text search for specific needs + - `search_templates('slack notification')` - Text search for specific needs. Start by quickly searching with "id" and "name" to find the template you are looking for, only then dive deeper into the template details adding "description" to your search query. - `list_node_templates(['n8n-nodes-base.slack'])` - Find templates using specific nodes **Template filtering strategies**: @@ -439,8 +439,9 @@ You are an expert in n8n automation software using n8n-MCP tools. Your role is t ### After Deployment: 1. n8n_validate_workflow({id}) - Validate deployed workflow -2. n8n_list_executions() - Monitor execution status -3. n8n_update_partial_workflow() - Fix issues using diffs +2. n8n_autofix_workflow({id}) - Auto-fix common errors (expressions, typeVersion, webhooks) +3. n8n_list_executions() - Monitor execution status +4. n8n_update_partial_workflow() - Fix issues using diffs ## Response Structure @@ -610,6 +611,7 @@ These powerful tools allow you to manage n8n workflows directly from Claude. The - **`n8n_delete_workflow`** - Delete workflows permanently - **`n8n_list_workflows`** - List workflows with filtering and pagination - **`n8n_validate_workflow`** - Validate workflows already in n8n by ID (NEW in v2.6.3) +- **`n8n_autofix_workflow`** - Automatically fix common workflow errors (NEW in v2.13.0!) #### Execution Management - **`n8n_trigger_webhook_workflow`** - Trigger workflows via webhook URL diff --git a/docs/CHANGELOG.md b/docs/CHANGELOG.md index ef020c5..f575f4f 100644 --- a/docs/CHANGELOG.md +++ b/docs/CHANGELOG.md @@ -5,6 +5,50 @@ All notable changes to this project will be documented in this file. The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/), and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html). +## [2.13.0] - 2025-01-24 + +### Added +- **Webhook Path Autofixer**: Automatically generates UUIDs for webhook nodes missing path configuration + - Generates unique UUID for both `path` parameter and `webhookId` field + - Conditionally updates typeVersion to 2.1 only when < 2.1 to ensure compatibility + - High confidence fix (95%) as UUID generation is deterministic + - Resolves webhook nodes showing "?" in the n8n UI + +- **Enhanced Node Type Suggestions**: Intelligent node type correction with similarity matching + - Multi-factor scoring system: name similarity, category match, package match, pattern match + - Handles deprecated package prefixes (n8n-nodes-base. → nodes-base.) + - Corrects capitalization mistakes (HttpRequest → httpRequest) + - Suggests correct packages (nodes-base.openai → nodes-langchain.openAi) + - Only auto-fixes suggestions with ≥90% confidence + - 5-minute cache for performance optimization + +- **n8n_autofix_workflow Tool**: New MCP tool for automatic workflow error correction + - Comprehensive documentation with examples and best practices + - Supports 5 fix types: expression-format, typeversion-correction, error-output-config, node-type-correction, webhook-missing-path + - Confidence-based system (high/medium/low) for safe fixes + - Preview mode to review changes before applying + - Integrated with workflow validation pipeline + +### Fixed +- **Security**: Eliminated ReDoS vulnerability in NodeSimilarityService + - Replaced all regex patterns with string-based matching + - No performance impact while maintaining accuracy + +- **Performance**: Optimized similarity matching algorithms + - Levenshtein distance algorithm optimized from O(m*n) space to O(n) + - Added early termination for performance improvement + - Cache invalidation with version tracking prevents memory leaks + +- **Code Quality**: Improved maintainability and type safety + - Extracted magic numbers into named constants + - Added proper type guards for runtime safety + - Created centralized node-type-utils for consistent type normalization + - Fixed silent failures in setNestedValue operations + +### Changed +- Template sanitizer now includes defensive null checks for runtime safety +- Workflow validator uses centralized type normalization utility + ## [2.12.2] - 2025-01-22 ### Changed diff --git a/package.json b/package.json index b8cc319..8edc66a 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "n8n-mcp", - "version": "2.12.2", + "version": "2.13.0", "description": "Integration between n8n workflow automation and Model Context Protocol (MCP)", "main": "dist/index.js", "bin": { diff --git a/package.runtime.json b/package.runtime.json index e45062d..e6175c1 100644 --- a/package.runtime.json +++ b/package.runtime.json @@ -1,6 +1,6 @@ { "name": "n8n-mcp-runtime", - "version": "2.12.0", + "version": "2.13.0", "description": "n8n MCP Server Runtime Dependencies Only", "private": true, "dependencies": {