Add MCP HTTP/SSE server and complete n8n integration

Major Changes:
- Implemented MCP HTTP/SSE transport server for n8n and web clients
- Created mcp_server/http_server.py with FastAPI for JSON-RPC 2.0 over HTTP
- Added health check endpoint (/health) for container monitoring
- Refactored mcp-server/ to mcp_server/ (Python module structure)
- Updated Dockerfile.mcp to run HTTP server with health checks

MCP Server Features:
- 7 memory tools exposed via MCP (add, search, get, update, delete)
- HTTP/SSE transport on port 8765 for n8n integration
- stdio transport for Claude Code integration
- JSON-RPC 2.0 protocol implementation
- CORS support for web clients

n8n Integration:
- Successfully tested with AI Agent workflows
- MCP Client Tool configuration documented
- Working webhook endpoint tested and verified
- System prompt optimized for automatic user_id usage

Documentation:
- Created comprehensive Mintlify documentation site
- Added docs/mcp/introduction.mdx - MCP server overview
- Added docs/mcp/installation.mdx - Installation guide
- Added docs/mcp/tools.mdx - Complete tool reference
- Added docs/examples/n8n.mdx - n8n integration guide
- Added docs/examples/claude-code.mdx - Claude Code setup
- Updated README.md with MCP HTTP server info
- Updated roadmap to mark Phase 1 as complete

Bug Fixes:
- Fixed synchronized delete operations across Supabase and Neo4j
- Updated memory_service.py with proper error handling
- Fixed Neo4j connection issues in delete operations

Configuration:
- Added MCP_HOST and MCP_PORT environment variables
- Updated .env.example with MCP server configuration
- Updated docker-compose.yml with MCP container health checks

Testing:
- Added test scripts for MCP HTTP endpoint verification
- Created test workflows in n8n
- Verified all 7 memory tools working correctly
- Tested synchronized operations across both stores

Version: 1.0.0
Status: Phase 1 Complete - Production Ready

🤖 Generated with Claude Code

Co-Authored-By: Claude <noreply@anthropic.com>
This commit is contained in:
Claude Code
2025-10-15 13:56:41 +02:00
parent 9bca2f4f47
commit 1998bef6f4
36 changed files with 3443 additions and 71 deletions

55
docs/images/hero-dark.svg Normal file
View File

@@ -0,0 +1,55 @@
<svg width="800" height="400" xmlns="http://www.w3.org/2000/svg">
<defs>
<linearGradient id="grad2" x1="0%" y1="0%" x2="100%" y2="100%">
<stop offset="0%" style="stop-color:#07C983;stop-opacity:0.2" />
<stop offset="100%" style="stop-color:#0D9373;stop-opacity:0.3" />
</linearGradient>
</defs>
<!-- Background -->
<rect width="800" height="400" fill="#0f1117"/>
<rect width="800" height="400" fill="url(#grad2)"/>
<!-- Grid pattern -->
<g opacity="0.2">
<line x1="0" y1="100" x2="800" y2="100" stroke="#07C983" stroke-width="1"/>
<line x1="0" y1="200" x2="800" y2="200" stroke="#07C983" stroke-width="1"/>
<line x1="0" y1="300" x2="800" y2="300" stroke="#07C983" stroke-width="1"/>
<line x1="200" y1="0" x2="200" y2="400" stroke="#07C983" stroke-width="1"/>
<line x1="400" y1="0" x2="400" y2="400" stroke="#07C983" stroke-width="1"/>
<line x1="600" y1="0" x2="600" y2="400" stroke="#07C983" stroke-width="1"/>
</g>
<!-- Memory nodes -->
<circle cx="200" cy="150" r="40" fill="#07C983" opacity="0.4"/>
<circle cx="400" cy="200" r="50" fill="#0D9373" opacity="0.4"/>
<circle cx="600" cy="150" r="35" fill="#07C983" opacity="0.4"/>
<!-- Connection lines -->
<line x1="200" y1="150" x2="400" y2="200" stroke="#07C983" stroke-width="2" opacity="0.4"/>
<line x1="400" y1="200" x2="600" y2="150" stroke="#0D9373" stroke-width="2" opacity="0.4"/>
<!-- Main text -->
<text x="400" y="100" font-family="Arial, sans-serif" font-size="48" font-weight="bold" fill="#07C983" text-anchor="middle">
T6 Mem0 v2
</text>
<text x="400" y="140" font-family="Arial, sans-serif" font-size="24" fill="#ccc" text-anchor="middle">
Memory System for LLM Applications
</text>
<!-- Feature icons/text -->
<g transform="translate(150, 280)">
<circle cx="0" cy="0" r="30" fill="#07C983" opacity="0.3"/>
<text x="0" y="5" font-family="Arial, sans-serif" font-size="24" fill="#07C983" text-anchor="middle" font-weight="bold">MCP</text>
</g>
<g transform="translate(400, 280)">
<circle cx="0" cy="0" r="30" fill="#0D9373" opacity="0.3"/>
<text x="0" y="5" font-family="Arial, sans-serif" font-size="24" fill="#07C983" text-anchor="middle" font-weight="bold">API</text>
</g>
<g transform="translate(650, 280)">
<circle cx="0" cy="0" r="30" fill="#07C983" opacity="0.3"/>
<text x="0" y="8" font-family="Arial, sans-serif" font-size="20" fill="#07C983" text-anchor="middle" font-weight="bold">Graph</text>
</g>
</svg>

After

Width:  |  Height:  |  Size: 2.5 KiB

View File

@@ -0,0 +1,54 @@
<svg width="800" height="400" xmlns="http://www.w3.org/2000/svg">
<defs>
<linearGradient id="grad1" x1="0%" y1="0%" x2="100%" y2="100%">
<stop offset="0%" style="stop-color:#0D9373;stop-opacity:0.1" />
<stop offset="100%" style="stop-color:#07C983;stop-opacity:0.2" />
</linearGradient>
</defs>
<!-- Background -->
<rect width="800" height="400" fill="url(#grad1)"/>
<!-- Grid pattern -->
<g opacity="0.1">
<line x1="0" y1="100" x2="800" y2="100" stroke="#0D9373" stroke-width="1"/>
<line x1="0" y1="200" x2="800" y2="200" stroke="#0D9373" stroke-width="1"/>
<line x1="0" y1="300" x2="800" y2="300" stroke="#0D9373" stroke-width="1"/>
<line x1="200" y1="0" x2="200" y2="400" stroke="#0D9373" stroke-width="1"/>
<line x1="400" y1="0" x2="400" y2="400" stroke="#0D9373" stroke-width="1"/>
<line x1="600" y1="0" x2="600" y2="400" stroke="#0D9373" stroke-width="1"/>
</g>
<!-- Memory nodes -->
<circle cx="200" cy="150" r="40" fill="#0D9373" opacity="0.3"/>
<circle cx="400" cy="200" r="50" fill="#07C983" opacity="0.3"/>
<circle cx="600" cy="150" r="35" fill="#0D9373" opacity="0.3"/>
<!-- Connection lines -->
<line x1="200" y1="150" x2="400" y2="200" stroke="#0D9373" stroke-width="2" opacity="0.3"/>
<line x1="400" y1="200" x2="600" y2="150" stroke="#07C983" stroke-width="2" opacity="0.3"/>
<!-- Main text -->
<text x="400" y="100" font-family="Arial, sans-serif" font-size="48" font-weight="bold" fill="#0D9373" text-anchor="middle">
T6 Mem0 v2
</text>
<text x="400" y="140" font-family="Arial, sans-serif" font-size="24" fill="#666" text-anchor="middle">
Memory System for LLM Applications
</text>
<!-- Feature icons/text -->
<g transform="translate(150, 280)">
<circle cx="0" cy="0" r="30" fill="#0D9373" opacity="0.2"/>
<text x="0" y="5" font-family="Arial, sans-serif" font-size="24" fill="#0D9373" text-anchor="middle" font-weight="bold">MCP</text>
</g>
<g transform="translate(400, 280)">
<circle cx="0" cy="0" r="30" fill="#07C983" opacity="0.2"/>
<text x="0" y="5" font-family="Arial, sans-serif" font-size="24" fill="#0D9373" text-anchor="middle" font-weight="bold">API</text>
</g>
<g transform="translate(650, 280)">
<circle cx="0" cy="0" r="30" fill="#0D9373" opacity="0.2"/>
<text x="0" y="8" font-family="Arial, sans-serif" font-size="20" fill="#0D9373" text-anchor="middle" font-weight="bold">Graph</text>
</g>
</svg>

After

Width:  |  Height:  |  Size: 2.4 KiB