mirror of
https://github.com/czlonkowski/n8n-mcp.git
synced 2026-04-04 00:23:08 +00:00
Production-ready improvements based on comprehensive code review: Critical Fixes: - Robust container detection: Checks multiple env vars (IS_DOCKER, IS_CONTAINER) with flexible formats (true/1/yes) and filesystem markers (/.dockerenv, /run/.containerenv) for Docker, Kubernetes, Podman, containerd support - Fixed redundant exit calls: Removed immediate exit, use 1000ms timeout for graceful shutdown allowing cleanup to complete - Added error handling for stdin registration with try-catch - Added shutdown trigger logging (SIGTERM/SIGINT/SIGHUP/STDIN_END/STDIN_CLOSE) Improvements: - Increased timeout from 500ms to 1000ms for slower systems - Added null safety for stdin operations - Enhanced documentation explaining behavior in different environments - More descriptive variable names (isDocker → isContainer) Testing: - Supports Docker, Kubernetes, Podman, and other container runtimes - Graceful fallback if container detection fails - Works in Claude Desktop, containers, and manual execution Code Review: Approved by code-reviewer agent All critical and warning issues addressed Reported by: @Eddy-Chahed Issue: #277 🤖 Generated with [Claude Code](https://claude.com/claude-code) Co-Authored-By: Claude <noreply@anthropic.com>