Commit Graph

40 Commits

Author SHA1 Message Date
czlonkowski
3b38a5c3f8 docs: update README and documentation to match current state (v2.5.1)
- Update n8n version from v1.97.1 to v1.99.1 in README
- Fix 7 broken documentation links to point to existing files
- Standardize Docker image size to ~280MB across all docs (was inconsistent: 150MB/200MB/283MB)
- Add missing npm scripts for test commands (test:essentials, test:enhanced-validation, etc.)
- Update CHANGELOG.md with missing versions 2.4.0 through 2.5.1
- Update README_CLAUDE_SETUP.md to list all 21+ MCP tools (was only showing 6)
- Document 5 additional npm scripts in CLAUDE.md
- Update AI-capable nodes count to 263 (was 35 in old docs)

All documentation now accurately reflects the current codebase state.

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

Co-Authored-By: Claude <noreply@anthropic.com>
2025-06-25 10:55:34 +02:00
czlonkowski
aad1b69fb1 feat: enhance AI tool support and clarify documentation (v2.5.1)
- Update tool descriptions to clarify ANY node can be used as AI tool
- Add get_node_as_tool_info to available tools in README
- Enhance workflow validation tool descriptions for AI connections
- Update README with v2.5.1 release notes
- Remove redundant _General__Scrape_with_HTTP_tool.json file
- Bump version to 2.5.1 in package.json

The key insight: ANY n8n node can be connected to an AI Agent's tool
port, not just those marked with usableAsTool=true. This update makes
that clear throughout the documentation and tool descriptions.

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

Co-Authored-By: Claude <noreply@anthropic.com>
2025-06-24 15:52:01 +02:00
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
46e00f0709 fix: address validation improvements from AI agent feedback
- Filter out @version and internal properties from warnings
- Deduplicate validation errors (keep most specific message)
- Add basic code syntax validation for JavaScript and Python
- Check for unbalanced braces/parentheses
- Validate Python indentation consistency
- Add n8n-specific pattern checks (return statements, input access)
- Bump version to 2.4.2

Based on comprehensive AI agent review showing 9.5/10 rating

🤖 Generated with Claude Code
Co-Authored-By: Claude <noreply@anthropic.com>
2025-06-24 09:55:09 +02:00
czlonkowski
ca936c7b0c chore: remove community post from repository
Community post content is not needed in the GitHub repository
2025-06-17 11:36:03 +02:00
czlonkowski
a688ad3d14 fix: resolve Docker stdio initialization timeout issue
- Add InitializeRequestSchema handler to MCP server
- Implement stdout flushing for Docker environments
- Create stdio-wrapper for clean JSON-RPC communication
- Update docker-entrypoint.sh to prevent stdout pollution
- Fix logger to check MCP_MODE before level check

These changes ensure the MCP server responds to initialization requests
within Claude Desktop's 60-second timeout when running in Docker.
2025-06-17 09:12:01 +02:00
czlonkowski
75952f94ca fix: Docker stdio communication for Claude Desktop compatibility
Fixed the initialization timeout issue with minimal changes:

1. Added stdout flush after server connection to combat Docker buffering
2. Fixed docker-entrypoint.sh to not output to stdout in stdio mode
3. Added process.stdin.resume() to keep server alive
4. Added IS_DOCKER environment variable for future use
5. Updated README to prioritize Docker with correct -i flag configuration

The core issue was Docker's block buffering preventing immediate JSON-RPC
responses. The -i flag maintains stdin connection, and explicit flushing
ensures responses reach Claude Desktop immediately.

Also fixed "Shutting down..." message that was breaking JSON-RPC protocol
by redirecting it to stderr in stdio mode.

Docker is now the recommended installation method as originally intended.

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

Co-Authored-By: Claude <noreply@anthropic.com>
2025-06-17 00:30:54 +02:00
czlonkowski
58df9a8d21 chore: remove outdated documentation and add diagnostic tools 2025-06-16 22:39:36 +02:00
czlonkowski
917d48451d docs: add Claude's testimonial and interview about n8n-MCP impact
- Added compelling testimonial section after Overview
- Created full interview document in docs/CLAUDE_INTERVIEW.md
- Added quick quote at the top: "Before MCP, I was translating. Now I'm composing."
- Highlights real-world impact: 45 minutes → 3 minutes workflow creation
- Shows concrete before/after examples with 6 errors → 0 errors
- Demonstrates value beyond just time savings (confidence, discovery, peace of mind)

The testimonial provides social proof and helps users understand the practical
benefits of n8n-MCP through a relatable first-person experience.

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

Co-Authored-By: Claude <noreply@anthropic.com>
2025-06-16 22:31:10 +02:00
czlonkowski
12a255ace1 docs: add simplified MCP V2 plan focused on MVP fixes
- Create 3-day plan to fix critical issues only
- Focus on deployment, search, and deduplication
- Remove overengineered 4-week plan versions
- Add rollback strategy and test endpoints
- Total new code: ~62 lines instead of enterprise architecture

Ship the fixes, not the framework.

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

Co-Authored-By: Claude <noreply@anthropic.com>
2025-06-16 14:27:18 +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
4d955a5b4b fix: resolve Claude Desktop stdio communication issues and update documentation
- Fixed console output interference with stdio JSON-RPC protocol:
  - Modified logger to suppress ALL output in stdio mode
  - Added DISABLE_CONSOLE_OUTPUT environment variable support
  - Updated error handlers to respect stdio mode

- Updated Claude Desktop configuration documentation:
  - Added required environment variables for clean stdio communication
  - Promoted local installation as recommended method
  - Fixed remote connection instructions (removed broken mcp-remote)
  - Added troubleshooting section for common issues
  - Updated both README.md and docs/README_CLAUDE_SETUP.md

- Environment variables now required for stdio mode:
  - MCP_MODE=stdio
  - LOG_LEVEL=error
  - DISABLE_CONSOLE_OUTPUT=true
  - NODE_ENV=production

This ensures clean JSON-RPC communication without console output corruption.

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

Co-Authored-By: Claude <noreply@anthropic.com>
2025-06-16 00:50:06 +02:00
czlonkowski
dbfc649c5d docs: update documentation for v2.3.3 release
- Updated CLAUDE.md with v2.3.3 achievements and metrics
- Updated README.md with new node counts and v2.3.3 features
- Added comprehensive CHANGELOG.md entry for v2.3.3
- Bumped version in package.json to 2.3.3

Key updates:
- Documented automated dependency update system
- Updated metrics: 525 nodes, 263 AI tools, 99% property coverage
- Noted successful update to n8n v1.97.1
- Documented validation script fixes
2025-06-16 00:08:57 +02:00
czlonkowski
3f165f6ab6 fix: update validation script to use correct node type format
- Fixed node type references to match database format (e.g., 'nodes-base.httpRequest' instead of 'httpRequest')
- Removed versioned check for Code node as it's not consistently detected
- All validation tests now pass after n8n dependency updates

This fixes the validation failure that occurred after updating n8n dependencies to their latest versions.
2025-06-16 00:03:20 +02:00
czlonkowski
149b59a541 docs: comprehensive documentation update for production deployment
- Updated README.md with clear setup instructions and recent updates
- Simplified Claude Desktop setup guide with troubleshooting
- Enhanced HTTP deployment guide for production use
- Streamlined troubleshooting guide with quick fixes
- Added mcp-http-client.js for Node.js 16 compatibility
- Fixed stdio mode console output corruption

Key improvements:
- Clear distinction between local and remote deployment
- Node.js 18+ requirement for mcp-remote clearly documented
- USE_FIXED_HTTP=true prominently featured for v2.3.2
- Production deployment best practices
- Multi-user service considerations

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

Co-Authored-By: Claude <noreply@anthropic.com>
2025-06-15 01:11:02 +02:00
czlonkowski
63ef011aec docs: update documentation for v2.3.2 and remove legacy files
Major documentation cleanup and updates:

Updates:
- Add USE_FIXED_HTTP=true to all Docker and HTTP deployment examples
- Update main README with v2.3.2 release notes and version badges
- Add HTTP server troubleshooting section for stream errors
- Update CHANGELOG with v2.3.1 and v2.3.2 entries
- Update all configuration examples (.env.example, docker-compose.yml)
- Add clear instructions for using the fixed HTTP implementation

Removed legacy documentation (11 files):
- Implementation plans that have been completed
- Architecture analysis documents
- Intermediate fix documentation
- Planning documents for features now implemented
- Duplicate SETUP.md (content merged into INSTALLATION.md)

The documentation now accurately reflects the current v2.3.2 state
with the complete HTTP server fix using USE_FIXED_HTTP=true.

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

Co-Authored-By: Claude <noreply@anthropic.com>
2025-06-14 18:52:25 +02:00
czlonkowski
baf5293cb8 fix: complete solution for MCP HTTP server stream errors (v2.3.2)
Root Cause Analysis:
- Express.json() middleware was consuming request stream before StreamableHTTPServerTransport
- StreamableHTTPServerTransport has initialization issues with stateless usage

Two-Phase Solution:
1. Removed all body parsing middleware to preserve raw streams
2. Created http-server-fixed.ts with direct JSON-RPC implementation

Key Changes:
- Remove express.json() from all HTTP server implementations
- Add http-server-fixed.ts that bypasses StreamableHTTPServerTransport
- Implement initialize, tools/list, and tools/call methods directly
- Add USE_FIXED_HTTP=true environment variable to enable fixed server
- Update logging to not access req.body

The fixed implementation:
- Handles JSON-RPC protocol directly without transport complications
- Maintains full MCP compatibility
- Works reliably without stream or initialization errors
- Provides better performance and debugging capabilities

Usage: MCP_MODE=http USE_FIXED_HTTP=true npm start

This provides a stable, production-ready HTTP server for n8n-MCP.

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

Co-Authored-By: Claude <noreply@anthropic.com>
2025-06-14 17:19:42 +02:00
czlonkowski
2cb264fd56 fix: implement Single-Session architecture to resolve MCP stream errors
- Add ConsoleManager to prevent console output interference with StreamableHTTPServerTransport
- Implement SingleSessionHTTPServer with persistent session reuse
- Create N8NMCPEngine for clean service integration
- Add automatic session expiry after 30 minutes of inactivity
- Update logger to be HTTP-aware during active requests
- Maintain backward compatibility with existing deployments

This fixes the "stream is not readable" error by implementing the Hybrid
Single-Session architecture as documented in MCP_ERROR_FIX_PLAN.md

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

Co-Authored-By: Claude <noreply@anthropic.com>
2025-06-14 15:02:49 +02:00
czlonkowski
88dd66bb7a refactor: make optimized Dockerfile the default - remove full variant
- Rename Dockerfile.optimized to Dockerfile (now the default)
- Keep old Dockerfile as Dockerfile.old for reference
- Update GitHub Actions to use default Dockerfile
- Remove build-full job - only one image variant now
- Remove docker-compose.optimized.yml and other variants
- Update all documentation to reflect single image approach

The optimized 283MB image is now the only n8n-MCP Docker image.
This simplifies the user experience and provides the best solution
for all use cases.

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

Co-Authored-By: Claude <noreply@anthropic.com>
2025-06-14 14:00:36 +02:00
czlonkowski
e90971b2d8 feat: switch GitHub Actions to build optimized Docker image by default
- Change main build to use Dockerfile.optimized (targets ~200MB image)
- Add separate 'full' build job for development variant (2.6GB)
- Update tagging strategy: 'latest' for optimized, 'full' suffix for full variant
- Update documentation to reflect dual image strategy
- Update docker-compose.yml with variant selection comment

This provides users with two options:
- Optimized (default): Pre-built database, minimal size, for production
- Full: Complete n8n packages, dynamic scanning, for development

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

Co-Authored-By: Claude <noreply@anthropic.com>
2025-06-14 11:27:24 +02:00
czlonkowski
3ab8fbd60b feat: implement Docker image optimization - reduces size from 2.6GB to ~200MB
- Add optimized database schema with embedded source code storage
- Create optimized rebuild script that extracts source at build time
- Implement optimized MCP server reading from pre-built database
- Add Dockerfile.optimized with multi-stage build process
- Create comprehensive documentation and testing scripts
- Demonstrate 92% size reduction by removing runtime n8n dependencies

The optimization works by:
1. Building complete database at Docker build time
2. Extracting all node source code into the database
3. Creating minimal runtime image without n8n packages
4. Serving everything from pre-built SQLite database

This makes n8n-MCP suitable for resource-constrained production deployments.

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

Co-Authored-By: Claude <noreply@anthropic.com>
2025-06-14 10:36:54 +02:00
czlonkowski
d67c04dd52 docs: add release guide and improve Docker documentation structure 2025-06-14 10:00:14 +02:00
czlonkowski
8878c99c3b feat: optimize Docker build with multi-stage deps and npm retry config 2025-06-13 23:47:09 +02:00
czlonkowski
b8b5e674dc fix: update npm ci flag from --only=production to --omit=dev and remove nginx build job 2025-06-13 21:11:43 +02:00
czlonkowski
d6f38dc1c4 docs: reorganize documentation files and update Docker build process 2025-06-13 17:20:31 +02:00
czlonkowski
12bef3d98e feat: add comprehensive Docker support with multi-stage builds and compose configurations 2025-06-13 16:12:40 +02:00
czlonkowski
edb9c51096 docs: add Docker deployment plan with phased implementation strategy 2025-06-13 15:07:02 +02:00
czlonkowski
00a6f700ed feat: enhance HTTP server with security, CORS, testing and error handling 2025-06-13 12:12:04 +02:00
czlonkowski
89e1df03de feat: add HTTP server mode for remote deployment with token auth 2025-06-13 11:54:42 +02:00
czlonkowski
66f5d74e42 feat: implement node parser and property extractor with versioned node support 2025-06-12 18:45:20 +02:00
czlonkowski
f831b02415 refactor: reorganize documentation and configuration files for improved clarity 2025-06-12 15:03:12 +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
czlonkowski
6851d2f253 feat: add node extraction scripts and Docker setup for n8n modules 2025-06-09 00:33:17 +02:00
czlonkowski
3d7fdeba02 feat: Complete overhaul to enhanced documentation-only MCP server
- Removed all workflow execution capabilities per user requirements
- Implemented enhanced documentation extraction with operations and API mappings
- Fixed credential code extraction for all nodes
- Fixed package info extraction (name and version)
- Enhanced operations parser to handle n8n markdown format
- Fixed documentation search to prioritize app nodes over trigger nodes
- Comprehensive test coverage for Slack node extraction
- All node information now includes:
  - Complete operations list (42 for Slack)
  - API method mappings with documentation URLs
  - Source code and credential definitions
  - Package metadata
  - Related resources and templates

🤖 Generated with Claude Code

Co-Authored-By: Claude <noreply@anthropic.com>
2025-06-08 11:07:51 +00:00
czlonkowski
887e98ca0b Add production deployment scripts and quickstart guide
- Add deploy-to-vm.sh script for easy VM deployment
- Add systemd service file template
- Add Nginx configuration with SSL and rate limiting
- Add DEPLOYMENT_QUICKSTART.md for n8ndocumentation.aiservices.pl
- Update REMOTE_DEPLOYMENT.md to reference quickstart

The deployment process is now streamlined:
1. Copy .env.example to .env
2. Configure for production (domain, auth token)
3. Run ./scripts/deploy-to-vm.sh

Tested locally with production configuration - all endpoints
working correctly with authentication.

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

Co-Authored-By: Claude <noreply@anthropic.com>
2025-06-08 08:21:38 +00:00
czlonkowski
1dd6b8e55f Clean up legacy documentation and scripts
- Remove all references to workflow execution/management features
- Delete legacy scripts for bidirectional n8n integration
- Update documentation to focus on node documentation serving only
- Remove old docker-compose files for workflow management
- Add simplified docker-compose.yml for documentation server
- Update CHANGELOG.md to reflect v2.0.0 and v2.1.0 changes
- Update Dockerfile to use v2 paths and database

The project is now clearly focused on serving n8n node documentation
to AI assistants, with no workflow execution capabilities.

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

Co-Authored-By: Claude <noreply@anthropic.com>
2025-06-08 07:54:53 +00:00
czlonkowski
ee8aa729c1 Implement remote MCP server deployment capabilities
- Add HTTP/JSON-RPC server for remote MCP access
- Configure domain and authentication via environment variables
- Create comprehensive remote deployment documentation
- Support both local (stdio) and remote (HTTP) deployment modes
- Add PM2 and Nginx configuration examples
- Update README with remote server instructions

The server can now be deployed on a VM (e.g., Hetzner) and accessed
from Claude Desktop over HTTPS using the configured domain.

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

Co-Authored-By: Claude <noreply@anthropic.com>
2025-06-08 07:31:12 +00:00
czlonkowski
078b67ff35 Implement SQLite database with full-text search for n8n node documentation
Major features implemented:
- SQLite storage service with FTS5 for fast node search
- Database rebuild mechanism for bulk node extraction
- MCP tools: search_nodes, extract_all_nodes, get_node_statistics
- Production Docker deployment with persistent storage
- Management scripts for database operations
- Comprehensive test suite for all functionality

Database capabilities:
- Stores node source code and metadata
- Full-text search by node name or content
- No versioning (stores latest only as per requirements)
- Supports complete database rebuilds
- ~4.5MB database with 500+ nodes indexed

Production features:
- Automated deployment script
- Docker Compose production configuration
- Database initialization on first run
- Volume persistence for data
- Management utilities for operations

Documentation:
- Updated README with complete instructions
- Production deployment guide
- Clear troubleshooting section
- API reference for all new tools

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

Co-Authored-By: Claude <noreply@anthropic.com>
2025-06-07 21:12:17 +00:00
czlonkowski
04627616d4 Add AI Agent node source code extraction capability
This commit implements the ability to extract n8n node source code through MCP:

Features:
- New MCP tools: get_node_source_code and list_available_nodes
- NodeSourceExtractor utility for file system access to n8n nodes
- Support for extracting any n8n node including AI Agent from @n8n/n8n-nodes-langchain
- Resource endpoint for accessing node source: nodes://source/{nodeType}

Testing:
- Docker test environment with mounted n8n node_modules
- Multiple test scripts for different scenarios
- Comprehensive test documentation
- Standalone MCP client test demonstrating full extraction flow

The implementation successfully demonstrates:
1. MCP server can access n8n's installed nodes
2. Source code can be extracted and returned to MCP clients
3. Full metadata including package info and file locations
4. Support for credential code extraction when available

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

Co-Authored-By: Claude <noreply@anthropic.com>
2025-06-07 15:57:49 +00:00