38 Commits

Author SHA1 Message Date
kevinwatt
0e5a30d10c fix: prevent server hang and output corruption in spawn handling (#23)
- Add process 'error' event handler to catch spawn failures (e.g., yt-dlp not installed)
- Separate stdout/stderr to prevent yt-dlp warnings from corrupting parsed output
- Add try-catch for RegExp construction from YTDLP_SANITIZE_ILLEGAL_CHARS env var
- Add NaN validation for YTDLP_MAX_FILENAME_LENGTH env var
- Sync VERSION constant with package.json (0.8.4)
- Update tests for new output format and null handling
- Add version sync guidance to CLAUDE.md
2026-01-05 01:47:59 +08:00
kevinwatt
910133f382 chore(release): v0.8.3 2025-12-25 04:10:12 +08:00
kevinwatt
748255fe01 docs(readme): add MCP client configuration section
Add comprehensive setup instructions for multiple MCP clients:
- Dive (featured at top)
- Claude Code, Claude Desktop
- Cursor, VS Code/Copilot, Windsurf
- Cline, Warp, JetBrains AI Assistant

Use @latest tag for consistent auto-updates.
2025-12-16 03:29:29 +08:00
kevinwatt
11464c6c24 fix(schema): use z.coerce.number() for MCP string serialization
MCP protocol serializes numeric parameters as strings during transport.
Using z.coerce.number() instead of z.number() to handle this gracefully.

Fixes #20
2025-12-08 04:32:35 +08:00
kevinwatt
87ba2f8494 feat(cookies): add cookie support for authenticated access
- Add YTDLP_COOKIES_FILE and YTDLP_COOKIES_FROM_BROWSER env vars
- Support all yt-dlp cookie methods (file, browser extraction)
- Validate browser names (brave, chrome, chromium, edge, firefox, opera, safari, vivaldi, whale)
- Cookie file takes precedence over browser extraction
- Add getCookieArgs() helper function
- Integrate cookie args into all modules (video, audio, subtitle, search, metadata)
- Add comprehensive cookie documentation (docs/cookies.md)
- Add 12 unit tests for cookie configuration
- Fix search.test.ts function signature issue

Closes #19
2025-12-06 18:42:25 +08: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
c5e84c326e chore: release v0.6.28 2025-08-13 15:49:49 +08:00
kevinwatt
fa879ab9ab fix: update prepare script to skip lib check
- Replace shx with standard chmod command
- Add --skipLibCheck flag to resolve type dependencies issue
- Ensure smooth npm publish process
2025-07-28 04:46:20 +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
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
c4dcc0eda2 v0.6.23 2025-02-21 17:22:47 +08:00
kevin
12fa5dbffe v0.6.22 2025-02-21 17:19:13 +08:00
kevin
9c25179fab more descriptive description 2025-02-21 16:55:31 +08:00
kevin
7710184faf fix: update description 2025-02-21 16:54:25 +08:00
kevin
adf1b7178c new description for package.json 2025-02-21 16:52:56 +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
5b96dff785 fix: update version 2025-02-21 15:52:42 +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
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
13dde88d21 update package.json 2025-02-11 03:08:10 +08:00
kevinwatt
3dd7d10dc7 0.6.0 2025-02-11 02:59:20 +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