41 Commits

Author SHA1 Message Date
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
kevinwatt
26b2137751 chore: release v0.7.0 - MCP Best Practices & Quality Improvements
Major release with comprehensive MCP best practices implementation:

 Added:
- Tool name prefixes (ytdlp_) for all 8 tools to avoid naming conflicts
- Zod schema validation with runtime input validation
- Tool annotations (readOnlyHint, destructiveHint, idempotentHint, openWorldHint)
- Response format options (JSON/Markdown) for search tools
- Pagination support with offset parameter
- Character limits (25K standard, 50K for transcripts) with smart truncation
- Actionable error messages with platform-specific guidance

🔧 Improved:
- Comprehensive tool descriptions with usage examples
- Enhanced configuration system with limits
- Better TypeScript type safety
- Professional README with badges and tables

🐛 Fixed:
- JSON parsing issue in metadata truncation
- Maintained valid JSON structure when truncated

🧪 Tested:
-  YouTube platform (Rick Astley video)
-  Bilibili platform (Chinese content)
-  Multi-language support verified
-  All 8 tools tested with real API calls

📖 Documentation:
- Created comprehensive CHANGELOG.md
- Redesigned README.md with professional formatting
- Added migration guide for v0.6.x users

🌍 Platform Support:
- Verified: YouTube, Bilibili
- Theory: 1000+ platforms via yt-dlp
2025-10-19 01:52:22 +08:00
kevinwatt
b19dbb67a5 feat(metadata): add get_video_metadata & get_video_metadata_summary; docs(api); tests(metadata) 2025-08-13 15:49:43 +08:00
kevinwatt
9d14f6bc01 remove unused test-utils.ts 2025-08-03 00:47:53 +08:00
kevinwatt
5aecaa3b20 feat: add video search functionality
- Add new search_videos tool for YouTube video search
- Support configurable search result count (1-50)
- Return formatted results with title, channel, duration, and URL
- Add comprehensive test coverage with real yt-dlp integration
- Update documentation with search examples
- Fix dependency security vulnerabilities
- Bump version to 0.6.27

Resolves: kevinwatt/yt-dlp-mcp#14
2025-07-28 04:45:37 +08:00
seszele64
cc2b9ec8b6 feat(video): add start and end time params for trimming 2025-07-22 19:13:13 +02:00
seszele64
7278b672f4 test(video): add tests for video download trimming 2025-07-22 19:12:49 +02:00
seszele64
83a2eb9bb8 feat(video): add support for trimming video downloads 2025-07-22 19:12:38 +02:00
Really Him
01709a778b fix: add ignore-config flag 2025-06-17 21:06:25 -04:00
Kevin Watt
f27d22eb81
Revert "Revert "feat: add transcript download functionality"" 2025-05-30 12:03:04 +08:00
Kevin Watt
c79766c241
Revert "feat: add transcript download functionality" 2025-05-30 11:57:52 +08:00
m
7900a9b4e1 feat: add transcript download functionality
- Add cleanSubtitleToTranscript utility to strip SRT formatting, timestamps, and HTML tags
- Implement downloadTranscript function using yt-dlp with subtitle cleaning
- Add download_transcript MCP tool with language support (defaults to English)
- Include comprehensive tests for both utility and download functionality
- Update README documentation with tool description and usage examples

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

Co-Authored-By: Claude <noreply@anthropic.com>
2025-05-27 12:00:31 +02:00
kevinwatt
944b0211c6 feat: add random filename fallback when filename cannot be retrieved - Add generateRandomFilename utility function - Modify downloadVideo to use random filename when yt-dlp fails to get filename - Update version to 0.6.26 2025-02-23 05:53:58 +08:00
kevinwatt
c39fd8785c update README.md 2025-02-22 03:24:44 +08:00
kevinwatt
e9a0e55762 feat: major improvements and version bump to 0.6.24 - Remove prompts functionality (prompts.ts and tests) - Improve error handling with VideoDownloadError class - Move configuration to dedicated file - Add URL validation and security checks - Reorganize code into modules - Add comprehensive unit tests - Enhance documentation with JSDoc and examples 2025-02-22 00:43:15 +08:00
kevinwatt
5152ad4d17 fix yt-dlp error handling for audio download 2025-02-21 17:40:35 +08:00
kevinwatt
c4dcc0eda2 v0.6.23 2025-02-21 17:22:47 +08:00
kevin
b3e8ed5f58 feat: improve audio download support
- Add support for various audio formats (m4a/mp3)
- Update audio download format selection logic
- Improve error handling and filename display
- Bump version to 0.6.22
2025-02-21 17:14:28 +08:00
kevin
58384bb1a2 fix: improve subtitle handling and tool names
- Rename list_video_subtitles to list_subtitle_languages for clarity
- Update tool descriptions to better reflect functionality
- Improve subtitle listing output format
- Simplify subtitle download parameters
- Add verbose logging for better debugging
- Bump version to 0.6.21
2025-02-21 16:42:12 +08:00
kevin
5523b1dedd fix: improve subtitle download reliability
- Use --write-sub --write-auto-sub combination for better subtitle support
- Simplify subtitle download logic to handle both regular and auto-generated subtitles
- Add debug logging for better troubleshooting
- Filter only .srt files as final output
- Bump version to 0.6.20
2025-02-21 15:54:11 +08:00
kevin
b0eeb5f831 fix: improve subtitle download reliability
- Use --write-sub --write-auto-sub combination for better subtitle support
- Simplify subtitle download logic to handle both regular and auto-generated subtitles
- Add debug logging for better troubleshooting
- Filter only .srt files as final output
- Bump version to 0.6.19
2025-02-21 15:52:13 +08:00
kevin
f9c93a0463 feat: improve auto-generated subtitles support
- Update downloadSubtitles to properly handle auto-generated subtitles
- Update listSubtitles to show all available subtitles including auto-generated ones
- Update tool descriptions to clearly indicate auto-generated subtitles support
- Simplify error handling to show direct yt-dlp messages
- Bump version to 0.6.17
2025-02-21 15:46:33 +08:00
kevin
e1d09fc3ca fix: improve subtitle listing
- Fix listSubtitles to properly show auto-generated subtitles
- Remove redundant error handling in subtitle listing
- Pass through yt-dlp messages directly
- Bump version to 0.6.16
2025-02-21 15:42:58 +08:00
kevin
7537cd3326 feat: simplify error handling
- Remove custom error types and error codes
- Pass through yt-dlp error messages directly
- Simplify subtitle file filtering
- Bump version to 0.6.15
2025-02-21 15:40:57 +08:00
kevin
614d865b05 feat: rename download_video_srt to download_video_subtitles
- Rename tool from download_video_srt to download_video_subtitles
- Update tool description to better reflect subtitle format support
- Bump version to 0.6.14
2025-02-21 15:36:47 +08:00
kevin
c8d2199486 fix: improve subtitle download functionality
- Fixed YouTube subtitle download functionality
- Added support for VTT subtitle format
- Improved subtitle download error handling
- Enhanced auto-generated subtitle detection
2025-02-21 15:12:19 +08:00
kevin
cbf82eee32 chore: bump version to 0.6.12 2025-02-21 14:55:30 +08:00
kevin
fecc2d6596 chore: bump version to 0.6.11 2025-02-21 14:51:51 +08:00
kevinwatt
8b1a44d7b4 feat: improve error handling and add initialization checks
- Add custom error types and error codes
- Add configuration validation
- Add dependency checks
- Add safe cleanup handling
- Improve code organization
2025-02-21 00:34:18 +08:00
Ted Carnahan
c19e3cb611 Make this tool generic for all videos that yt-dlp handles. 2025-02-19 11:27:15 -06:00
kevinwatt
5d36ffb45a feat: add list subtitles and resolution control 2025-02-15 13:57:28 +08:00
kevinwatt
891654dc08 docs: remove Dive link from README 2025-02-13 22:55:04 +08:00
kevinwatt
a4ea1a85cf docs: update README style to match other MCP projects 2025-02-13 22:52:56 +08:00
kevinwatt
7d6c7eb862 version 0.6.6 2025-02-13 22:45:56 +08:00
kevinwatt
87ad925d48 docs: add MIT License 2025-02-11 03:24:39 +08:00
kevinwatt
01a139ed5c docs: update README with Dive integration details 2025-02-11 03:21:49 +08:00
kevinwatt
a44d758ca6 fix: limit filename length to avoid system errors 2025-02-11 03:19:33 +08:00
kevinwatt
d9ad402a3d fix: use --no-mtime for correct file timestamp 2025-02-11 03:14:27 +08:00
kevinwatt
b3c8fc8b8f set file timestamps to now 2025-02-11 03:07:00 +08:00
kevinwatt
2e879df47d add .npmignore and update package.json
downloadVideo shows progress and downloads to Downloads folder
2025-02-11 02:58:07 +08:00
kevinwatt
47e67ae25a first commit 2025-02-11 02:40:43 +08:00