UNPKG

@kevinwatt/yt-dlp-mcp

Version:

An MCP server implementation that integrates with yt-dlp, providing video and audio content download capabilities (e.g. YouTube, Facebook, Tiktok, etc.) for LLMs.

54 lines (53 loc) 1.5 kB
/** * Valid browser names for cookie extraction */ export declare const VALID_BROWSERS: readonly ["brave", "chrome", "chromium", "edge", "firefox", "opera", "safari", "vivaldi", "whale"]; export type ValidBrowser = typeof VALID_BROWSERS[number]; /** * Configuration type definitions */ export interface Config { file: { maxFilenameLength: number; downloadsDir: string; tempDirPrefix: string; sanitize: { replaceChar: string; truncateSuffix: string; illegalChars: RegExp; reservedNames: readonly string[]; }; }; tools: { required: readonly string[]; }; download: { defaultResolution: "480p" | "720p" | "1080p" | "best"; defaultAudioFormat: "m4a" | "mp3"; defaultSubtitleLanguage: string; }; limits: { characterLimit: number; maxTranscriptLength: number; }; cookies: { file?: string; fromBrowser?: string; }; } /** * Load configuration */ export declare function loadConfig(): Config; /** * Safe filename processing function */ export declare function sanitizeFilename(filename: string, config: Config['file']): string; /** * Get cookie-related yt-dlp arguments * Priority: file > fromBrowser * @param config Configuration object * @returns Array of yt-dlp arguments for cookie handling */ export declare function getCookieArgs(config: Config): string[]; export declare const CONFIG: Config;