Commit Graph

33 Commits

Author SHA1 Message Date
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
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
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
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
690430577c docs: update CHANGELOG.md for version 2.7.17 2025-07-17 21:36:16 +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
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
czlonkowski
2a5c4ec6eb feat: add AUTH_TOKEN_FILE support for Docker secrets (v2.7.5)
- Add AUTH_TOKEN_FILE environment variable support for reading auth tokens from files
- Support Docker secrets pattern for production deployments
- Add Known Issues section documenting Claude Desktop container duplication bug
- Update documentation with authentication options and best practices
- Fix issue #16: AUTH_TOKEN_FILE was documented but not implemented
- Add comprehensive tests for AUTH_TOKEN_FILE functionality

BREAKING CHANGE: None - AUTH_TOKEN continues to work as before

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

Co-Authored-By: Claude <noreply@anthropic.com>
2025-07-06 18:32:15 +02:00
czlonkowski
b73cffc27f feat(tools): rename start_here to tools_documentation with depth control (v2.7.4)
- Renamed start_here_workflow_guide to tools_documentation for clarity
- Added depth parameter to control documentation detail (essentials/full)
- Converted output from JSON to LLM-friendly plain text format
- Added per-tool documentation capability
- Created two-tier documentation system:
  - Essentials: brief info with key parameters and tips
  - Full: comprehensive docs with examples and best practices
- Documented 8 commonly used MCP tools
- Removed 380+ lines of unused getWorkflowGuide method
- Fixed duplicate tool definitions
- Updated all documentation references
- Added test script for tools documentation

BREAKING CHANGE: start_here_workflow_guide renamed to tools_documentation

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

Co-Authored-By: Claude <noreply@anthropic.com>
2025-07-03 23:22:26 +02:00
czlonkowski
8872ca2201 move changelog 2025-06-29 19:46:28 +02:00
czlonkowski
1907e5ce8e refactor: major cleanup of legacy and temporary files
- Removed ~965MB of temporary directories (temp/, extracted-nodes/, etc)
- Deleted outdated database files and backups (.bak files)
- Removed legacy shell scripts (mcp-server-v20.sh, rebuild-v20.sh)
- Cleaned up orphan test files and debugging scripts
- Removed duplicate schema file (src/db/schema.sql)
- Deleted old Dockerfile.old and empty database files
- Updated documentation structure in README.md
- Added n8n_diagnostic tool to documentation
- Condensed version history in CLAUDE.md
- Created release notes for v2.7.0

Total impact: Removed 34 files, saving ~965MB+ of disk space

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

Co-Authored-By: Claude <noreply@anthropic.com>
2025-06-29 19:06:31 +02:00
czlonkowski
c60ebde4d2 fix: add missing uuid dependency to Docker runtime
- Added uuid ^10.0.0 to package.json and package.runtime.json
- Fixed MODULE_NOT_FOUND error in Docker containers
- Updated package.runtime.json version to match main (2.7.0)
- Aligned @modelcontextprotocol/sdk version between packages
- Updated CHANGELOG.md with v2.7.0 release notes

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

Co-Authored-By: Claude <noreply@anthropic.com>
2025-06-28 20:36:01 +02:00
czlonkowski
481ec71625 docs: update README and CHANGELOG for v2.6.0-v2.6.2 releases
- Update version badge to v2.6.2
- Add comprehensive changelog entries for last 3 releases:
  - v2.6.2: Enhanced workflow creation validation
  - v2.6.1: Enhanced typeVersion validation
  - v2.6.0: n8n management tools integration
- Document critical fixes including nodes-base.webhook validation
- Update recent updates section with latest improvements

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

Co-Authored-By: Claude <noreply@anthropic.com>
2025-06-26 14:32:51 +02:00
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
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
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
d6f38dc1c4 docs: reorganize documentation files and update Docker build process 2025-06-13 17:20:31 +02:00