Commit Graph

11 Commits

Author SHA1 Message Date
czlonkowski
533b1acc20 feat: implement comprehensive workflow validation (v2.5.0)
Major Features:
- Add ExpressionValidator for n8n expression syntax validation
- Add WorkflowValidator for complete workflow structure validation
- Add three new MCP tools: validate_workflow, validate_workflow_connections, validate_workflow_expressions

Validation Capabilities:
-  Detects workflow cycles (infinite loops)
-  Validates n8n expressions with syntax checking
-  Checks node references in expressions
-  Identifies orphaned nodes and missing connections
-  Supports multiple node type formats (n8n-nodes-base, @n8n/n8n-nodes-langchain)
-  Provides actionable error messages and suggestions

Testing & Analysis:
- Add test scripts for workflow validation
- Add template validation testing
- Add validation summary analysis tool
- Fixed expression validation false positives
- Handle node type normalization correctly

Results from testing 50 real n8n templates:
- 70.9% of errors are from informal sticky notes
- Expression validation catches real syntax issues
- Cycle detection prevents runtime infinite loops
- Successfully validates both core and LangChain nodes

🤖 Generated with [Claude Code](https://claude.ai/code)

Co-Authored-By: Claude <noreply@anthropic.com>
2025-06-24 14:45:36 +02:00
czlonkowski
42a24278db feat: implement Phase 2 validation improvements
Phase 2 Professional Validation Features:

1. Validation Profiles:
   - minimal: Only required fields
   - runtime: Critical errors + security warnings
   - ai-friendly: Balanced (default)
   - strict: All checks + best practices

2. New Node Validators:
   - Webhook: Path validation, response modes, auth warnings
   - PostgreSQL: SQL injection detection, query safety
   - MySQL: Similar to Postgres with MySQL-specific checks

3. New Tools:
   - validate_node_minimal: Lightning-fast required field checking
   - Updated validate_node_operation with profile support

4. SQL Safety Features:
   - Detects template expressions vulnerable to injection
   - Warns about DELETE/UPDATE without WHERE
   - Catches dangerous operations (DROP, TRUNCATE)
   - Suggests parameterized queries

5. Enhanced Coverage:
   - Now supports 7+ major nodes with specific validators
   - Flexible validation based on use case
   - Professional-grade safety checks

This completes the major validation system overhaul from the original plan.

🤖 Generated with Claude Code
Co-Authored-By: Claude <noreply@anthropic.com>
2025-06-24 10:56:59 +02:00
czlonkowski
e7b6eace85 feat: add enhanced operation-aware validation (v2.4.2)
- Add validate_node_operation tool with 80%+ fewer false positives
- Remove deprecated validate_node_config tool
- Add EnhancedConfigValidator with operation context filtering
- Add node-specific validators for Slack, Google Sheets, OpenAI, MongoDB
- Integrate working examples in validation responses
- Add actionable next steps and auto-fix suggestions
- Test shows Slack validation reduced from 45 errors to 1 error\!

BREAKING CHANGE: validate_node_config removed in favor of validate_node_operation

🤖 Generated with Claude Code
Co-Authored-By: Claude <noreply@anthropic.com>
2025-06-24 09:28:59 +02:00
czlonkowski
197fc3303b mcp: update validate_node_config tool description to clarify limitations and use cases 2025-06-24 07:16:03 +02:00
czlonkowski
796dc03ac8 docs: clarify search_templates tool usage and update template timeframes
- Updated search_templates description to clarify it searches template names/descriptions, NOT node types
- Added clear examples showing the correct way to find templates by node type
- Updated template timeframe references from 6 months to 1 year (399 templates)
- Added TEMPLATE SEARCHING section to quick reference guide
- Made it clear that for node-based search, use list_node_templates instead

🤖 Generated with [Claude Code](https://claude.ai/code)

Co-Authored-By: Claude <noreply@anthropic.com>
2025-06-20 01:19:15 +02:00
czlonkowski
08f9d1ad30 feat: add n8n workflow templates as MCP tools
- Add 4 new MCP tools for workflow templates
- Integrate with n8n.io API to fetch community templates
- Filter templates to last 6 months only
- Store templates in SQLite with full workflow JSON
- Manual fetch system (not part of regular rebuild)
- Support search by nodes, keywords, and task categories
- Add fetch:templates and test:templates npm scripts
- Update to v2.4.1

🤖 Generated with Claude Code

Co-Authored-By: Claude <noreply@anthropic.com>
2025-06-20 00:02:09 +02:00
czlonkowski
5106e64cb9 feat: improve MCP tool descriptions and add workflow guide tool
- Added new 'start_here_workflow_guide' tool for AI agents to get started
- Clarified search_nodes behavior (OR logic for multiple words)
- Simplified list_nodes description with package name clarification
- Updated get_node_info to recommend essentials first
- Made get_property_dependencies description more concise with example
- Removed confusing quick reference comment (now in dedicated tool)

The workflow guide tool provides:
- Recommended workflow patterns
- Search tips and best practices
- Common node references
- Known issues and workarounds
- Performance guidance

🤖 Generated with Claude Code

Co-Authored-By: Claude <noreply@anthropic.com>
2025-06-16 16:39:09 +02:00
czlonkowski
1884d5babf feat: implement AI-optimized MCP tools with 95% size reduction
- Add get_node_essentials tool for 10-20 essential properties only
- Add search_node_properties for targeted property search
- Add get_node_for_task with 14 pre-configured templates
- Add validate_node_config for comprehensive validation
- Add get_property_dependencies for visibility analysis
- Implement PropertyFilter service with curated essentials
- Implement ExampleGenerator with working examples
- Implement TaskTemplates for common workflows
- Implement ConfigValidator with security checks
- Implement PropertyDependencies for dependency analysis
- Enhance property descriptions to 100% coverage
- Add version information to essentials response
- Update documentation with new tools

Response sizes reduced from 100KB+ to <5KB for better AI agent usability.

🤖 Generated with [Claude Code](https://claude.ai/code)

Co-Authored-By: Claude <noreply@anthropic.com>
2025-06-16 12:37:45 +02:00
czlonkowski
c4d8c7376d docs: update n8n tools with optimized descriptions and usage tips 2025-06-16 08:10:22 +02:00
czlonkowski
7d6691cd42 refactor: remove legacy MCP implementation files and update tool descriptions
- Removed unused legacy files:
  - server.ts (legacy server with workflow management)
  - tools.ts (legacy tool definitions)
  - prompts.ts (unused prompt definitions)
  - resources.ts (unused resource definitions)
  - server-optimized.ts (unused alternative implementation)

- Updated tools-update.ts with improved MCP tool descriptions:
  - Clear, action-oriented descriptions following MCP best practices
  - Better parameter documentation with examples
  - Emphasized documentation-only nature of the server
  - Added technical details (e.g., SQLite FTS5 for search)

The active implementation now only uses server-update.ts and tools-update.ts

🤖 Generated with [Claude Code](https://claude.ai/code)

Co-Authored-By: Claude <noreply@anthropic.com>
2025-06-16 00:31:04 +02:00
czlonkowski
8bf670c31e feat: Implement n8n-MCP Enhancement Plan v2.1 Final
- Implement simple node loader supporting n8n-nodes-base and langchain packages
- Create parser handling declarative, programmatic, and versioned nodes
- Build documentation mapper with 89% coverage (405/457 nodes)
- Setup SQLite database with minimal schema
- Create rebuild script for one-command database updates
- Implement validation script for critical nodes
- Update MCP server with documentation-focused tools
- Add npm scripts for streamlined workflow

Successfully loads 457/458 nodes with accurate documentation mapping.
Versioned node detection working (46 nodes detected).
3/4 critical nodes pass validation tests.

Known limitations:
- Slack operations extraction incomplete for some versioned nodes
- One langchain node fails due to missing dependency
- No AI tools detected (none have usableAsTool flag)

🤖 Generated with [Claude Code](https://claude.ai/code)

Co-Authored-By: Claude <noreply@anthropic.com>
2025-06-12 14:18:19 +02:00