yachi 8892f3df92
feat: Add Streamable HTTP remote server support (#4)
Add production-ready HTTP server for remote access to yt-dlp-mcp tools
using the official MCP Streamable HTTP transport protocol.

Features:
- MCP spec-compliant Streamable HTTP transport with SSE
- API key authentication with timing-safe comparison
- CORS configuration with credential handling
- Rate limiting per session (60 req/min default)
- Session management with automatic cleanup
- Request size limits (4MB) and input validation
- Health check endpoint
- Graceful shutdown handling
- Memory leak protection (1000 events/session max)

New binary:
- yt-dlp-mcp-http - HTTP server (separate from stdio server)

Configuration via environment variables:
- YTDLP_HTTP_PORT (default: 3000)
- YTDLP_HTTP_HOST (default: 0.0.0.0)
- YTDLP_API_KEY (recommended for production)
- YTDLP_CORS_ORIGIN (default: *)
- YTDLP_RATE_LIMIT (default: 60)
- YTDLP_SESSION_TIMEOUT (default: 1 hour)

Endpoints:
- POST/GET/DELETE /mcp - MCP protocol endpoint
- GET /health - Health check endpoint

Documentation:
- Comprehensive guide in docs/remote-server.md
- Quick start, deployment examples, security best practices
- Client configuration for Claude Desktop and Cline
2025-10-19 18:17:15 +01:00
..
2025-06-17 21:08:38 -04:00