Files
n8n-mcp/docs
czlonkowski baf5293cb8 fix: complete solution for MCP HTTP server stream errors (v2.3.2)
Root Cause Analysis:
- Express.json() middleware was consuming request stream before StreamableHTTPServerTransport
- StreamableHTTPServerTransport has initialization issues with stateless usage

Two-Phase Solution:
1. Removed all body parsing middleware to preserve raw streams
2. Created http-server-fixed.ts with direct JSON-RPC implementation

Key Changes:
- Remove express.json() from all HTTP server implementations
- Add http-server-fixed.ts that bypasses StreamableHTTPServerTransport
- Implement initialize, tools/list, and tools/call methods directly
- Add USE_FIXED_HTTP=true environment variable to enable fixed server
- Update logging to not access req.body

The fixed implementation:
- Handles JSON-RPC protocol directly without transport complications
- Maintains full MCP compatibility
- Works reliably without stream or initialization errors
- Provides better performance and debugging capabilities

Usage: MCP_MODE=http USE_FIXED_HTTP=true npm start

This provides a stable, production-ready HTTP server for n8n-MCP.

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

Co-Authored-By: Claude <noreply@anthropic.com>
2025-06-14 17:19:42 +02:00
..

n8n-MCP Documentation

Welcome to the n8n-MCP documentation. This directory contains comprehensive guides for installation, configuration, and troubleshooting.

📚 Documentation Index

Getting Started

Deployment

Development

Reference

For Users

  1. First Time Setup: Start with the Installation Guide
  2. Claude Desktop Users: Follow Claude Desktop Setup
  3. Remote Deployment: See HTTP Deployment Guide

For Developers

  1. Local Development: See Development Setup
  2. Docker Development: Check Docker README
  3. Contributing: Read the implementation plans and guides

🐳 Docker Quick Start

# Quick start with Docker
echo "AUTH_TOKEN=$(openssl rand -base64 32)" > .env
docker compose up -d

# Check health
curl http://localhost:3000/health

📖 Documentation Updates

This documentation is actively maintained. Recent updates include:

  • Docker deployment support (Phase 1 complete)
  • Simplified installation process
  • Enhanced troubleshooting guide
  • Multiple deployment options

🤝 Getting Help

📝 License

This project is licensed under the Sustainable Use License. See LICENSE for details.