mirror of
https://github.com/czlonkowski/n8n-mcp.git
synced 2026-03-19 00:43:07 +00:00
fix: Implement warm start pattern for session restoration (v2.19.5)
Fixes critical bug where synthetic MCP initialization had no HTTP context to respond through, causing timeouts. Implements warm start pattern that handles the current request immediately. Breaking Changes: - Deleted broken initializeMCPServerForSession() method (85 lines) - Removed unused InitializeRequestSchema import Implementation: - Warm start: restore session → handle request immediately - Client receives -32000 error → auto-retries with initialize - Idempotency guards prevent concurrent restoration duplicates - Cleanup on failure removes failed sessions - Early return prevents double processing Changes: - src/http-server-single-session.ts: Simplified restoration (lines 1118-1247) - tests/integration/session-restoration-warmstart.test.ts: 9 new tests - docs/MULTI_APP_INTEGRATION.md: Warm start documentation - CHANGELOG.md: v2.19.5 entry - package.json: Version bump to 2.19.5 - package.runtime.json: Version bump to 2.19.5 Testing: - 9/9 new integration tests passing - 13/13 existing session tests passing - No regressions in MCP tools (12 tools verified) - Build and lint successful 🤖 Generated with [Claude Code](https://claude.com/claude-code) Co-Authored-By: Claude <noreply@anthropic.com>
This commit is contained in: