Commit Graph

20 Commits

Author SHA1 Message Date
czlonkowski
3e3017ede8 fix: force Docker to use updated database with trigger fixes
- Added cache-busting comment to invalidate Docker's build cache
- Previous builds were using cached COPY layer with old database from 13:18
- This ensures Docker copies the new database (15:38) with is_trigger=true fixes
- Affects: webhook, cron, interval, emailReadImap nodes

The Docker build cache was serving an old database without the trigger detection fix,
causing these nodes to incorrectly show isTrigger: false in the MCP tool.

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

Co-Authored-By: Claude <noreply@anthropic.com>
2025-07-06 16:07:16 +02:00
czlonkowski
a0e3aed8e2 fix: Docker build by including n8n-workflow dependency
The Docker build was failing because TypeScript compilation requires n8n-workflow
and uuid packages that weren't being installed. Also removed the deletion of src/n8n
directory as it contains TypeScript files needed during compilation.

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

Co-Authored-By: Claude <noreply@anthropic.com>
2025-06-27 12:34:30 +02:00
czlonkowski
928b71f2fe fix: add missing runtime dependencies for Docker image
- Add axios (^1.10.0) for n8n API client
- Add zod (^3.25.32) for workflow validation
- Update runtime package version to 2.6.2
- Update Dockerfile comment to reflect minimal (not zero) dependencies

Fixes Docker runtime error: "Cannot find module 'axios'"
introduced by n8n management tools in v2.6.0

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

Co-Authored-By: Claude <noreply@anthropic.com>
2025-06-26 15:01:23 +02:00
czlonkowski
f3aefd18d1 fix: add axios to Docker builder dependencies for TypeScript compilation
- TypeScript needs axios to compile template-fetcher.ts
- Runtime doesn't need axios since templates are in pre-built database
- Maintains minimal runtime dependencies

🤖 Generated with Claude Code

Co-Authored-By: Claude <noreply@anthropic.com>
2025-06-20 00:15:20 +02:00
czlonkowski
98b7e83739 fix: resolve TypeScript compilation errors in Docker build
The build was failing because TypeScript couldn't find module imports.
Fixed by:
1. Installing minimal dependencies needed for compilation (MCP SDK, dotenv, express)
2. Excluding n8n node implementation files that aren't needed for MCP server
   - Removed src/n8n directory (n8n node implementation)
   - Removed src/utils/bridge.ts and src/utils/mcp-client.ts (n8n-specific utils)

These files are only used for n8n integration, not for the MCP server runtime.

Results:
- Build succeeds with only 102 packages (vs 2294 before)
- TypeScript compiles without errors
- Faster builds and smaller image

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

Co-Authored-By: Claude <noreply@anthropic.com>
2025-06-18 23:37:48 +02:00
czlonkowski
8777c82235 fix: prevent npm from installing all n8n dependencies during Docker build
The build was taking 10 minutes because npm install was installing ALL
2294 packages from package-lock.json instead of just TypeScript.

Changed approach:
- Don't copy package*.json to builder stage
- Create empty package.json to prevent lock file issues
- Install only the 3 required packages explicitly

Results:
- Builder stage: 2294 packages → 13 packages
- Build time: ~374s → ~10s per platform
- Total build time: 10 minutes → ~2 minutes

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

Co-Authored-By: Claude <noreply@anthropic.com>
2025-06-18 23:32:48 +02:00
czlonkowski
c95313f343 feat: optimize Docker build to exclude n8n dependencies
Major optimization that reduces Docker image size by 87% and build time by 10x:

- Remove ALL n8n dependencies from runtime Docker image
- Add package.runtime.json with only 5 essential runtime deps
- Optimize Dockerfile to build TypeScript without n8n packages
- Add BuildKit optimizations with cache mounts
- Update documentation to highlight the improvements

Results:
- Image size: ~1.5GB → ~200MB (87% reduction)
- Build time: ~12 minutes → ~1-2 minutes
- No n8n version conflicts at runtime
- Better security with minimal attack surface

The key insight is that since we always rebuild the database locally
before deployment, the Docker runtime never needs n8n packages.

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

Co-Authored-By: Claude <noreply@anthropic.com>
2025-06-18 23:09:18 +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
3e037898c8 fix: simplify Docker build to resolve multi-platform failures
## Root cause
- Docker buildx memory options were incorrectly formatted
- Database build during Docker image creation was failing on multi-platform builds
- n8n native dependencies caused issues across different architectures

## Solution
- Removed invalid buildx driver-opts configuration
- Eliminated database build stage from Dockerfile
- Now using pre-built nodes.db file (11MB) from repository
- Fixed .dockerignore to include nodes.db in build context
- Added .dockerignore to version control (was incorrectly gitignored)

## Benefits
- Faster builds (no n8n package installation during build)
- More reliable multi-platform builds (amd64 + arm64)
- Simpler Dockerfile (3 stages instead of 4)

Database can still be rebuilt locally using 'npm run rebuild' when needed.

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

Co-Authored-By: Claude <noreply@anthropic.com>
2025-06-16 16:05:25 +02:00
czlonkowski
c1485d8f1b fix: resolve GitHub Actions workflow failures
## Fixed dependency updater workflow
- Added explicit workspace directory handling
- Improved error handling with clear error messages
- Fixed update summary file reading with error suppression
- Added error output for debugging failures

## Fixed Docker build workflow
- Added memory constraints (8GB/16GB swap) to prevent OOM
- Fixed Dockerfile to use npm scripts instead of direct node execution
- Added fallback mechanism: optimized rebuild → regular rebuild → error
- Added buildx ID reference and no-cache filter for db-builder stage

These changes should resolve both workflow failures and make the CI/CD pipeline more robust.

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

Co-Authored-By: Claude <noreply@anthropic.com>
2025-06-16 15:59:03 +02:00
czlonkowski
4ef03da245 fix: resolve Docker build failures in GitHub Actions
- Added ca-certificates package for proper SSL certificate validation
- Configured git to handle SSL and initialization properly
- Added --depth 1 for faster cloning and reduced network issues
- Improved error handling to continue build even if docs clone fails
- Fixed su-exec issue by using Alpine's native su command
- Redirected git clone stderr to avoid polluting build logs

These changes address the exit code 128 git errors occurring in GitHub Actions
Docker builds while maintaining backwards compatibility.

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

Co-Authored-By: Claude <noreply@anthropic.com>
2025-06-16 00:54:30 +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
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
6851d2f253 feat: add node extraction scripts and Docker setup for n8n modules 2025-06-09 00:33:17 +02: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
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
1f8140c45c Implement n8n-MCP integration
This commit adds a complete integration between n8n workflow automation and the Model Context Protocol (MCP):

Features:
- MCP server that exposes n8n workflows as tools, resources, and prompts
- Custom n8n node for connecting to MCP servers from workflows
- Bidirectional bridge for data format conversion
- Token-based authentication and credential management
- Comprehensive error handling and logging
- Full test coverage for core components

Infrastructure:
- TypeScript/Node.js project setup with proper build configuration
- Docker support with multi-stage builds
- Development and production docker-compose configurations
- Installation script for n8n custom node deployment

Documentation:
- Detailed README with usage examples and API reference
- Environment configuration templates
- Troubleshooting guide

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

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