Commit Graph

102 Commits

Author SHA1 Message Date
czlonkowski
a2be2b36d5 chore: release v2.9.1
- Bumped version from 2.9.0 to 2.9.1
- Updated version badge in README.md
- Added comprehensive changelog entry documenting fixedCollection validation fixes
- Increased test coverage from 79.95% to 80.16% to meet CI requirements
- Added 50 new tests for fixed-collection-validator and console-manager

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

Co-Authored-By: Claude <noreply@anthropic.com>
2025-08-02 10:16:03 +02:00
czlonkowski
6c7033bb45 feat: complete n8n integration with MCP Client Tool support and version badge automation
This major update adds comprehensive n8n integration, enabling n8n-mcp to run
as an MCP server within n8n workflows using the MCP Client Tool node.

## Key Features

### n8n Integration (NEW)
- Full MCP Client Tool compatibility with protocol version negotiation
- Dedicated n8n mode with optimized Docker deployment
- Workflow examples and n8n-friendly tool descriptions
- Quick deployment script for easy setup

### Protocol & Compatibility
- Intelligent protocol version selection (2024-11-05 for n8n, 2025-03-26 for others)
- Fixed schema validation issues with n8n's nested output format
- Enhanced parameter validation with clear error messages
- Comprehensive test suite for protocol negotiation

### Security Enhancements
- Dynamic UID/GID generation (10000-59999) for Docker containers
- Improved error sanitization for production environments
- Fixed information leakage in error responses
- Enhanced permission handling for mounted volumes

### Performance Optimizations
- Docker build time reduced from 13+ minutes to 1-2 minutes
- Image size reduced from ~1.5GB to ~280MB
- Fixed ARM64 build failures
- Optimized to use runtime-only dependencies

### Developer Experience
- Comprehensive parameter validation for all MCP tools
- Made README version badge dynamic from package.json
- Enhanced test coverage with session management tests
- Improved CI/CD with informational patch coverage

### Documentation
- Added comprehensive N8N_DEPLOYMENT.md guide
- Updated CHANGELOG.md for version 2.9.0
- Enhanced CLAUDE.md with n8n-specific instructions
- Added deployment scripts and examples

## Technical Details

Files Added:
- Dockerfile.n8n, docker-compose.n8n.yml for n8n deployment
- Protocol version negotiation utilities
- n8n integration test suite
- Session management tests
- Deployment and test scripts
- Version badge update scripts

Files Modified:
- Enhanced MCP server with n8n mode support
- Improved HTTP server with better error handling
- Updated Docker configurations for security
- Enhanced logging for n8n compatibility
- CHANGELOG.md with comprehensive update description

This update makes n8n-mcp a first-class citizen in the n8n ecosystem,
enabling powerful AI-assisted workflow automation.

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

Co-Authored-By: Claude <noreply@anthropic.com>
2025-08-02 00:01:01 +02:00
czlonkowski
3fec6813f3 feat: implement n8n integration improvements and protocol version negotiation
- Add intelligent protocol version negotiation (2024-11-05 for n8n, 2025-03-26 for standard clients)
- Fix memory leak potential with async cleanup and connection close handling
- Enhance error sanitization for production environments
- Add schema validation for n8n nested output workaround
- Improve Docker security with unpredictable UIDs/GIDs
- Create n8n-friendly tool descriptions to reduce schema validation errors
- Add comprehensive protocol negotiation test suite

Addresses code review feedback:
- Protocol version inconsistency resolved
- Memory management improved
- Error information leakage fixed
- Docker security enhanced

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

Co-Authored-By: Claude <noreply@anthropic.com>
2025-08-01 14:23:48 +02:00
czlonkowski
a597ef5a92 feat: add n8n integration with MCP Client Tool support
- Add N8N_MODE environment variable for n8n-specific behavior
- Implement HTTP Streamable transport with multiple session support
- Add protocol version endpoint (GET /mcp) for n8n compatibility
- Support multiple initialize requests for stateless n8n clients
- Add Docker configuration for n8n deployment
- Add test script with persistent volume support
- Add comprehensive unit tests for n8n mode
- Fix session management to handle per-request transport pattern

BREAKING CHANGE: Server now creates new transport for each initialize request
when running in n8n mode to support n8n's stateless client architecture

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

Co-Authored-By: Claude <noreply@anthropic.com>
2025-08-01 00:34:31 +02:00
czlonkowski
a4053de998 chore: bump version to 2.8.3 and update changelog
- Updated version in package.json and package.runtime.json
- Updated version badge in README.md
- Added comprehensive changelog entry for v2.8.3
- Fixed TypeScript lint errors in test files by making env vars optional
- Fixed edge-cases test to include required NODE_ENV

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

Co-Authored-By: Claude <noreply@anthropic.com>
2025-07-31 17:58:52 +02:00
czlonkowski
903a49d3b0 fix: add Docker configuration file support (fixes #105)
This commit adds comprehensive support for JSON configuration files in Docker containers,
addressing the issue where the Docker image fails to start in server mode and ignores
configuration files.

## Changes

### Docker Configuration Support
- Added parse-config.js to safely parse JSON configs and export as shell variables
- Implemented secure shell quoting to prevent command injection
- Added dangerous environment variable blocking for security
- Support for all JSON data types with proper edge case handling

### Docker Server Mode Fix
- Added support for "n8n-mcp serve" command in entrypoint
- Properly transforms serve command to HTTP mode
- Fixed missing n8n-mcp binary issue in Docker image

### Security Enhancements
- POSIX-compliant shell quoting without eval
- Blocked dangerous variables (PATH, LD_PRELOAD, etc.)
- Sanitized configuration keys to prevent invalid shell variables
- Protection against shell metacharacters in values

### Testing
- Added 53 comprehensive tests for Docker configuration
- Unit tests for parsing, security, and edge cases
- Integration tests for Docker entrypoint behavior
- Security-focused tests for injection prevention

### Documentation
- Updated Docker README with config file mounting examples
- Enhanced troubleshooting guide with config file issues
- Added version bump to 2.8.2

### Additional Files
- Included deployment-engineer and technical-researcher agent files

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

Co-Authored-By: Claude <noreply@anthropic.com>
2025-07-31 11:48:31 +02:00
czlonkowski
c36567875a chore: bump version to 2.8.0
- Update package.json version from 2.7.23 to 2.8.0
- Update README.md test count from 1,182 to 1,356 tests
- Add comprehensive CHANGELOG entry for v2.8.0
- Document all test improvements and fixes from PR #104

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

Co-Authored-By: Claude <noreply@anthropic.com>
2025-07-30 15:43:48 +02:00
czlonkowski
6699a1d34c test: implement comprehensive testing improvements from PR #104 review
Major improvements based on comprehensive test suite review:

Test Fixes:
- Fix all 78 failing tests across logger, MSW, and validator tests
- Fix console spy management in logger tests with proper DEBUG env handling
- Fix MSW test environment restoration in session-management.test.ts
- Fix workflow validator tests by adding proper node connections
- Fix mock setup issues in edge case tests

Test Organization:
- Split large config-validator.test.ts (1,075 lines) into 4 focused files
- Rename 63+ tests to follow "should X when Y" naming convention
- Add comprehensive edge case test files for all major validators
- Create tests/README.md with testing guidelines and best practices

New Features:
- Add ConfigValidator.validateBatch() method for bulk validation
- Add edge case coverage for null/undefined, boundaries, invalid data
- Add CI-aware performance test timeouts
- Add JSDoc comments to test utilities and factories
- Add workflow duplicate node name validation tests

Results:
- All tests passing: 1,356 passed, 19 skipped
- Test coverage: 85.34% statements, 85.3% branches
- From 78 failures to 0 failures

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

Co-Authored-By: Claude <noreply@anthropic.com>
2025-07-30 13:44:35 +02:00
czlonkowski
f2eb344476 chore: bump version to 2.7.23 and update documentation
- Bump version from 2.7.22 to 2.7.23 in package.json
- Update version badge in README.md
- Add tests badge showing 1,182 passing tests
- Add comprehensive CHANGELOG entry for v2.7.23 documenting:
  - Complete testing infrastructure implementation
  - 933 unit tests and 249 integration tests
  - All CI test failures fixed
  - Test architecture enhancements
  - Documentation updates
  - Development artifact cleanup

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

Co-Authored-By: Claude <noreply@anthropic.com>
2025-07-30 09:45:42 +02:00
czlonkowski
6d614267af docs: update testing documentation to reflect actual implementation
- Update testing-architecture.md with accurate test counts (1,182 tests)
- Document 933 unit tests and 249 integration tests
- Add real code examples and directory structure
- Include lessons learned and common issues/solutions
- Update README.md testing section with comprehensive test overview
- Include test distribution by component
- Add CI test results from run #41
- Update CLAUDE.md with latest development guidance
2025-07-30 09:42:17 +02:00
czlonkowski
07cda6e3ab chore: clean up development artifacts and update .gitignore
- Remove AI agent coordination files and progress tracking
- Remove temporary test results and generated artifacts
- Remove diagnostic test scripts from src/scripts/
- Remove development planning documents
- Update .gitignore to exclude test artifacts
- Clean up 53 temporary files total
2025-07-30 09:22:53 +02:00
czlonkowski
059723ff75 fix: resolve 99 integration test failures through comprehensive fixes
- Fixed MCP transport initialization (unblocked 111 tests)
- Fixed database isolation and FTS5 search syntax (9 tests)
- Fixed MSW mock server setup and handlers (6 tests)
- Fixed MCP error handling response structures (16 tests)
- Fixed performance test thresholds for CI environment (15 tests)
- Fixed session management timeouts and cleanup (5 tests)
- Fixed database connection management (3 tests)

Improvements:
- Added NODE_DB_PATH support for in-memory test databases
- Added test mode logger suppression
- Enhanced template sanitizer for security
- Implemented environment-aware performance thresholds

Results: 229/246 tests passing (93.5% success rate)
Remaining: 16 tests need additional work (protocol compliance, timeouts)

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

Co-Authored-By: Claude <noreply@anthropic.com>
2025-07-30 08:15:22 +02:00
czlonkowski
7f8a3de776 fix: resolve MCP protocol test failures by fixing response format expectations
- Fixed test-helpers.ts to correctly wrap executeTool responses in MCP format
- Updated all tests to expect correct response structures:
  - list_nodes returns {nodes: [...], totalCount}
  - search_nodes returns {query, results: [...], totalCount, mode?}
  - list_ai_tools returns {tools: [...]}
  - list_tasks returns {totalTasks, categories: {...}} or {category, tasks: [...]}
- Fixed property expectations (nodeType instead of name, etc.)
- Reduced failing tests from 67 to 7

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

Co-Authored-By: Claude <noreply@anthropic.com>
2025-07-29 18:55:20 +02:00
czlonkowski
1d464e29e5 test: add Phase 4 database integration tests (partial)
- Add comprehensive test utilities for database testing
- Implement connection management tests for in-memory and file databases
- Add transaction tests including nested transactions and savepoints
- Test database lifecycle, error handling, and performance
- Include tests for WAL mode, connection pooling, and constraints

Part of Phase 4: Integration Testing
2025-07-29 09:36:14 +02:00
czlonkowski
61de107c4b feat: complete Phase 3.8 - test infrastructure and CI/CD enhancements
- Add test result artifacts storage with multiple formats (JUnit, JSON, HTML)
- Configure GitHub Actions to upload and preserve test outputs
- Add PR comment integration with test summaries
- Create benchmark comparison workflow for PR performance tracking
- Add detailed test report generation scripts
- Configure artifact retention policies (30 days for tests, 90 for combined)
- Set up test metadata collection for better debugging

This completes all remaining test infrastructure tasks and provides
comprehensive visibility into test results across CI/CD pipeline.
2025-07-28 22:56:15 +02:00
czlonkowski
b5210e5963 feat: add comprehensive performance benchmark tracking system
- Create benchmark test suites for critical operations:
  - Node loading performance
  - Database query performance
  - Search operations performance
  - Validation performance
  - MCP tool execution performance

- Add GitHub Actions workflow for benchmark tracking:
  - Runs on push to main and PRs
  - Uses github-action-benchmark for historical tracking
  - Comments on PRs with performance results
  - Alerts on >10% performance regressions
  - Stores results in GitHub Pages

- Create benchmark infrastructure:
  - Custom Vitest benchmark configuration
  - JSON reporter for CI results
  - Result formatter for github-action-benchmark
  - Performance threshold documentation

- Add supporting utilities:
  - SQLiteStorageService for benchmark database setup
  - MCPEngine wrapper for testing MCP tools
  - Test factories for generating benchmark data
  - Enhanced NodeRepository with benchmark methods

- Document benchmark system:
  - Comprehensive benchmark guide in docs/BENCHMARKS.md
  - Performance thresholds in .github/BENCHMARK_THRESHOLDS.md
  - README for benchmarks directory
  - Integration with existing test suite

The benchmark system will help monitor performance over time and catch regressions before they reach production.

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

Co-Authored-By: Claude <noreply@anthropic.com>
2025-07-28 22:45:09 +02:00
czlonkowski
17013d8a25 test: Phase 2 - Create test infrastructure
- Create comprehensive test directory structure
- Implement better-sqlite3 mock for Vitest
- Add node factory using fishery for test data generation
- Create workflow builder with fluent API
- Add infrastructure validation tests
- Update testing checklist to reflect progress

All Phase 2 tasks completed successfully with 7 tests passing.

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

Co-Authored-By: Claude <noreply@anthropic.com>
2025-07-28 13:21:56 +02:00
czlonkowski
aa3b2a8460 test: migrate from Jest to Vitest (Phase 1 complete)
- Remove Jest and all related packages
- Install Vitest with coverage support
- Create vitest.config.ts with path aliases
- Set up global test configuration
- Migrate all 6 test files to Vitest syntax
- Update TypeScript configuration for better Vitest support
- Create separate tsconfig.build.json for clean builds
- Fix all import/module issues in tests
- All 68 tests passing successfully
- Current coverage baseline: 2.45%

Phase 1 of testing suite improvement complete.

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

Co-Authored-By: Claude <noreply@anthropic.com>
2025-07-28 13:05:38 +02:00
czlonkowski
d44ec49814 docs: mark Phase 0 as completed in testing documentation
- Updated checklist to show completed tasks
- Marked Phase 0 as completed in AI-optimized guide
- GitHub Actions workflow confirmed working
2025-07-28 12:11:35 +02:00
czlonkowski
cf960ed2ac test: phase 0 - fix failing tests and setup CI/CD
- Fixed 6 failing tests across http-server-auth.test.ts and single-session.test.ts
- All tests now pass (68 passing, 0 failing)
- Added GitHub Actions workflow for automated testing
- Added comprehensive testing documentation and strategy
- Tests fixed without changing application behavior
2025-07-28 12:04:38 +02:00
czlonkowski
5450bc35c3 Add agents to Claude Code 2025-07-28 10:21:03 +02:00
czlonkowski
23d12b4808 chore: upgrade Docker base images to Node.js 22 LTS Alpine (v2.7.22)
- Updated all Dockerfiles from node:20-alpine to node:22-alpine
- Addresses known vulnerabilities in older Alpine images
- Provides better long-term support with Node.js 22 LTS (until April 2027)
- Updated documentation to reflect new base image version
- Tested and verified compatibility with all dependencies

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

Co-Authored-By: Claude <noreply@anthropic.com>
2025-07-28 09:23:23 +02:00
czlonkowski
eeb73e1779 chore: update n8n to v1.103.2
- Updated n8n from 1.102.4 to 1.103.2
- Updated n8n-core from 1.101.2 to 1.102.1
- Updated n8n-workflow from 1.99.1 to 1.100.0
- Updated @n8n/n8n-nodes-langchain from 1.101.2 to 1.102.1
- Rebuilt node database with 532 nodes
- Bumped version to 2.7.21
- All validation tests passing

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

Co-Authored-By: Claude <noreply@anthropic.com>
2025-07-23 19:19:50 +02:00
czlonkowski
04e0739bbd docs: update Docker docs to use --init flag and fix container cleanup issues 2025-07-18 19:22:02 +02:00
czlonkowski
6e52afd5af fix: Docker container cleanup on session end (Issue #66)
- Added proper SIGTERM/SIGINT signal handlers to stdio-wrapper.ts
- Removed problematic trap commands from docker-entrypoint.sh
- Added STOPSIGNAL directive to Dockerfile for explicit signal handling
- Implemented graceful shutdown in MCP server with database cleanup
- Added stdin close detection for proper cleanup when Claude Desktop closes the pipe
- Containers now properly exit with the --rm flag, preventing accumulation
- Added --init flag to all Docker configuration examples
- Updated documentation with container lifecycle management best practices
- Bumped version to 2.7.20

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

Co-Authored-By: Claude <noreply@anthropic.com>
2025-07-18 18:51:24 +02:00
czlonkowski
f76e2247f9 fix: enhance node type format normalization for better AI agent compatibility (Issue #74)
- Added support for n8n-nodes-langchain.* → nodes-langchain.* normalization
- Implemented case-insensitive node name matching (e.g., chattrigger → chatTrigger)
- Added smart camelCase detection for common patterns (trigger, request, sheets, etc.)
- Fixed get_node_documentation tool to use same normalization logic as other tools
- Updated all 7 node lookup locations to use normalized types for alternatives
- Enhanced getNodeTypeAlternatives() to normalize all generated alternatives

All MCP tools now consistently handle various format variations:
- nodes-langchain.chatTrigger (correct format)
- n8n-nodes-langchain.chatTrigger (package format)
- n8n-nodes-langchain.chattrigger (package + wrong case)
- nodes-langchain.chattrigger (wrong case only)
- @n8n/n8n-nodes-langchain.chatTrigger (full npm format)

Bump version to 2.7.19

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

Co-Authored-By: Claude <noreply@anthropic.com>
2025-07-18 16:25:20 +02:00
czlonkowski
24cb9e49a0 fix: improve n8n_list_workflows pagination clarity and performance (Issue #54)
- Changed misleading 'total' field to 'returned' to clarify it's the count in current page
- Added 'hasMore' boolean flag for clear pagination indication
- Added '_note' guidance when more data is available
- Applied same improvements to n8n_list_executions for consistency

Performance improvements:
- Tool now returns only minimal metadata instead of full workflow structure
- Reduced response size by ~95% (from thousands to ~10 tokens per workflow)
- Eliminated token limit errors when listing workflows with many nodes
- Updated descriptions and documentation to clarify minimal response

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

Co-Authored-By: Claude <noreply@anthropic.com>
2025-07-18 14:34:08 +02:00
czlonkowski
a1992f9964 feat: add version info to health check and fix healthz endpoint
- Fixed health check to use correct /healthz endpoint instead of /health
- Added MCP version (mcpVersion) and supported n8n version (supportedN8nVersion) to health check response
- Added versionNote field with instructions for AI agents about manual version verification
- n8n API limitation: instance version cannot be determined automatically
- Updated axios usage for healthz endpoint access with proper error handling
2025-07-18 14:01:11 +02:00
czlonkowski
92d1b7b273 feat: add workflowNodeType field to MCP tool responses for proper n8n workflow creation
- Added workflowNodeType field to all node-returning MCP tools
- AI agents now receive both internal format (nodes-base.webhook) and workflow format (n8n-nodes-base.webhook)
- Created getWorkflowNodeType() utility to construct proper n8n format from package name
- Solves issue where AI agents would search nodes and use wrong format in workflows
- No database changes required - uses existing package_name field
- Updated: search_nodes, get_node_info, get_node_essentials, get_node_as_tool_info, validate_node_operation
- Updated CHANGELOG.md with comprehensive documentation of the changes

This completes the fix for issue #71, ensuring AI agents can seamlessly create workflows
with the correct node type format without manual intervention.
2025-07-18 13:37:05 +02:00
czlonkowski
f8fa782d7f fix: normalize node type prefixes for n8n workflow exports (#71)
- Add centralized normalizeNodeType utility to handle prefix conversion
  - n8n-nodes-base.* → nodes-base.*
  - @n8n/n8n-nodes-langchain.* → nodes-langchain.*
- Update all 9 affected MCP tools to use normalized node types
- AI agents can now use node types directly from n8n workflow exports
- Maintains backward compatibility with existing shortened prefixes
- Add comprehensive test coverage for all affected methods

Fixes #71

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

Co-Authored-By: Claude <noreply@anthropic.com>
2025-07-18 11:31:38 +02:00
czlonkowski
5dd932c19d docs: update HTTP deployment guide with comprehensive improvements
- Add security warnings for default AUTH_TOKEN
- Document AUTH_TOKEN_FILE support
- Add architecture diagram showing stdio → HTTP bridge
- Update configuration with all new env vars
- Improve troubleshooting section
- Add production-ready examples
- Reference Railway deployment guide
- Update to v2.7.17 features

Fixes #72
2025-07-18 09:37:01 +02:00
czlonkowski
690430577c docs: update CHANGELOG.md for version 2.7.17 2025-07-17 21:36:16 +02:00
Iván Velasteguí
3279283aaf Update CLAUDE_CODE_SETUP.md
fix .mcp.json file for Claude code setup Project configuration
2025-07-17 00:40:34 -05:00
czlonkowski
cd3233cabe docs: add Railway one-click deployment option with setup guide and images 2025-07-17 01:34:27 +02:00
czlonkowski
b111eb64d6 Merge branch 'main' into kimbo128/main - resolve conflicts 2025-07-17 00:55:50 +02:00
czlonkowski
8a15961995 feat: add Railway deployment support with CI/CD integration
- Add Railway-specific Docker image build to CI/CD workflow
  - Builds n8n-mcp-railway image alongside standard image
  - Railway image optimized for AMD64 architecture
  - Automatically published to ghcr.io on main branch pushes

- Create comprehensive Railway deployment documentation
  - Step-by-step deployment guide with security best practices
  - Claude Desktop connection instructions via mcp-remote
  - Troubleshooting guide for common issues
  - Architecture details and single-instance design explanation

- Update README with Railway documentation link
  - Removed inline Railway content to keep README focused
  - Added link to dedicated Railway deployment guide

This enables zero-configuration cloud deployment of n8n-mcp
with automatic HTTPS, global access, and built-in monitoring.

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

Co-Authored-By: Claude <noreply@anthropic.com>
2025-07-17 00:46:14 +02:00
czlonkowski
caf1e008d7 fix: respect NODE_DB_PATH environment variable in Docker (fixes #40)
- Fixed docker-entrypoint.sh to use NODE_DB_PATH instead of hardcoded paths
- Added log_message() helper to prevent stdio mode output corruption
- Fixed directory creation race condition with proper ownership
- Added path validation to ensure NODE_DB_PATH ends with .db
- Updated rebuild.ts to respect NODE_DB_PATH environment variable
- Added comprehensive documentation for custom database paths
- Bumped version to 2.7.16

The bug was caused by hardcoded /app/data/nodes.db paths in the Docker
entrypoint script that ignored the NODE_DB_PATH environment variable.

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

Co-Authored-By: Claude <noreply@anthropic.com>
2025-07-16 09:49:41 +02:00
czlonkowski
18e231efa5 docs: add comprehensive IDE setup guides for Claude Code, Cursor, and Windsurf
- Create dedicated setup documentation for each IDE
- Add Claude Code setup with proper CLI commands and screenshots
- Add Cursor setup with video tutorial and MCP configuration
- Add Windsurf setup with video tutorial and settings instructions
- Update README to consolidate IDE setup under "Connect your IDE" section
- Include visual guides with screenshots for better user experience
- Link all IDE guides to main Claude Project Setup instructions

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

Co-Authored-By: Claude <noreply@anthropic.com>
2025-07-16 00:43:26 +02:00
czlonkowski
a0f09fba28 fix: resolve HTTP server URL handling and security issues (#41, #42)
- Add intelligent URL detection supporting BASE_URL, PUBLIC_URL, and proxy headers
- Fix hardcoded localhost URLs in server console output
- Add hostname validation to prevent host header injection attacks
- Restrict URL schemes to http/https only (block javascript:, file://, etc.)
- Remove sensitive environment data from API responses
- Add GET endpoints (/, /mcp) for better API discovery
- Fix version inconsistency between server implementations
- Update HTTP bridge to use HOST/PORT environment variables
- Add comprehensive test scripts for URL configuration and security

This resolves issues #41 and #42 by making the HTTP server properly handle
deployment behind reverse proxies and adds critical security validations.

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

Co-Authored-By: Claude <noreply@anthropic.com>
2025-07-15 16:46:30 +02:00
czlonkowski
4c217088f5 fix: resolve partial update validation/execution discrepancy (issue #45)
- Remove default settings logic from cleanWorkflowForUpdate that was causing
  "settings must NOT have additional properties" error
- The function now only removes read-only fields without adding any properties
- Add comprehensive test coverage in test-issue-45-fix.ts
- Add documentation explaining the difference between create and update functions
- Bump version to 2.7.14

This fixes the issue where n8n_update_partial_workflow would pass validation
but fail during execution when workflows didn't have settings defined.

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

Co-Authored-By: Claude <noreply@anthropic.com>
2025-07-15 09:18:00 +02:00
czlonkowski
7939f87f8c docs: add Docker troubleshooting guide and link in README. Solves issue #32 2025-07-15 08:40:54 +02:00
Pavel
5247677232 docs: add Visual Studio Code setup instructions with screenshots 2025-07-14 14:34:24 +02:00
czlonkowski
1170ad27a6 fix: resolve WASM file loading issue for npx execution (closes #31)
- Enhanced database adapter to support multiple WASM file resolution strategies
- Added require.resolve() for reliable package location in npm environments
- Made better-sqlite3 an optional dependency
- Improved error handling with clear messages
- Updated version to 2.7.13
- Updated CHANGELOG and README badges
2025-07-11 08:48:37 +02:00
czlonkowski
f525303748 chore: update n8n to v1.101.1
- Updated n8n from 1.100.1 to 1.101.1
- Updated n8n-core from 1.99.0 to 1.100.0
- Updated n8n-workflow from 1.97.0 to 1.98.0
- Updated @n8n/n8n-nodes-langchain from 1.99.0 to 1.100.1
- Rebuilt node database with 528 nodes
- All validation tests passing
- Bumped version to 2.7.12

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

Co-Authored-By: Claude <noreply@anthropic.com>
2025-07-11 00:48:43 +02:00
czlonkowski
e8f6b684f0 fix: make FTS5 optional for template search (fixes Claude Desktop compatibility)
- Added runtime FTS5 detection in database adapters
- Removed FTS5 from required schema to prevent "no such module" errors
- FTS5 tables/triggers created conditionally only if supported
- Template search automatically falls back to LIKE when FTS5 unavailable
- Works in ALL SQLite environments (Claude Desktop, restricted envs, etc.)

This ensures search_templates() works correctly regardless of SQLite build,
while still providing optimal performance when FTS5 is available.

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

Co-Authored-By: Claude <noreply@anthropic.com>
2025-07-10 12:13:08 +02:00
czlonkowski
d8e84307e4 feat: optimize MCP tool descriptions for 65-70% token reduction
- Reduced average description length from 250-450 to 93-129 chars
- Documentation tools now average 129 chars per description
- Management tools average just 93 chars per description
- Moved detailed documentation to tools_documentation() system
- Only 2 tools exceed 200 chars (necessarily verbose)

Also includes search_nodes improvements:
- Fixed primary node ranking (webhook, HTTP Request now appear first)
- Fixed FUZZY mode threshold for better typo tolerance
- Removed unnecessary searchInfo messages
- Fixed HTTP node type case sensitivity issue

This significantly improves AI agent performance by reducing context usage
while preserving all essential information.

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

Co-Authored-By: Claude <noreply@anthropic.com>
2025-07-10 11:42:23 +02:00
czlonkowski
99e74cf22a fix: correct misleading Code node documentation based on real-world testing
Critical fixes based on Claude Desktop feedback:

1. Fixed crypto documentation: require('crypto') IS available despite editor warnings
   - Added clear examples of crypto usage
   - Updated validation to guide correct require() usage

2. Clarified $helpers vs standalone functions
   - $getWorkflowStaticData() is standalone, NOT $helpers.getWorkflowStaticData()
   - Added validation to catch incorrect usage (prevents '$helpers is not defined' errors)
   - Enhanced examples showing proper $helpers availability checks

3. Fixed JMESPath numeric literal documentation
   - n8n requires backticks around numbers in filters: [?age >= `18`]
   - Added multiple examples and validation to detect missing backticks
   - Prevents 'JMESPath syntax error' that Claude Desktop encountered

4. Fixed webhook data access gotcha
   - Webhook payload is at items[0].json.body, NOT items[0].json
   - Added dedicated 'Webhook Data Access' section with clear examples
   - Created process_webhook_data task template
   - Added validation to detect incorrect webhook data access patterns

All fixes based on production workflows TaNqYoZNNeHC4Hne and JZ9urD7PNClDZ1bm

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

Co-Authored-By: Claude <noreply@anthropic.com>
2025-07-10 09:22:34 +02:00
czlonkowski
eab3cc858e fix: comprehensive error handling and node-level properties validation (fixes #26)
Root cause: AI agents were placing error handling properties inside `parameters` instead of at node level

Major changes:
- Enhanced workflow validator to check for ALL node-level properties (expanded from 6 to 11)
- Added validation for onError property values and deprecation warnings for continueOnFail
- Updated all examples to use modern error handling (onError instead of continueOnFail)
- Added comprehensive node-level properties documentation in tools_documentation
- Enhanced MCP tool documentation for n8n_create_workflow and n8n_update_partial_workflow
- Added test script demonstrating correct node-level property usage

Node-level properties now validated:
- credentials, disabled, notes, notesInFlow, executeOnce
- onError, retryOnFail, maxTries, waitBetweenTries, alwaysOutputData
- continueOnFail (deprecated)

Validation improvements:
- Detects misplaced properties and provides clear fix examples
- Shows complete node structure when properties are incorrectly placed
- Type validation for all node-level boolean and string properties
- Smart error messages with correct placement guidance

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

Co-Authored-By: Claude <noreply@anthropic.com>
2025-07-09 20:39:24 +02:00
czlonkowski
87f0cfc4dc feat: enhanced authentication logging for better debugging (fixes #22, #16)
- Added specific error reasons for auth failures: no_auth_header, invalid_auth_format, invalid_token
- Fixed AUTH_TOKEN_FILE support in Docker production stacks (issue #16)
- Added AUTH_TOKEN_FILE support to single-session HTTP server for consistency
- Enhanced security by removing token lengths from logs
- Added token trimming and empty token validation
- Updated Docker entrypoint to properly support AUTH_TOKEN_FILE
- Bumped version to 2.7.10

This improves debugging for mcp-remote authentication issues and enables
proper Docker secrets usage in production environments.

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

Co-Authored-By: Claude <noreply@anthropic.com>
2025-07-07 23:19:35 +02:00
czlonkowski
1f12c4b690 feat: add npx support for zero-installation usage (closes #15)
- Add bin configuration to package.json for npx execution
- Implement smart database path resolution for npx/global/local installs
- Create dedicated npm publish script using runtime-only dependencies
- Add .npmignore to control published package contents
- Update README with npx as primary installation method
- Add n8n version badge to README
- Sync version between package.json and package.runtime.json
- Update CHANGELOG for v2.7.8 release

This allows users to run 'npx n8n-mcp' without installing the package,
reducing friction and making it easier to get started with n8n-MCP.

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

Co-Authored-By: Claude <noreply@anthropic.com>
2025-07-06 22:40:58 +02:00