diff --git a/Dockerfile b/Dockerfile new file mode 100644 index 0000000..f42d21d --- /dev/null +++ b/Dockerfile @@ -0,0 +1,24 @@ +# Generated by https://smithery.ai. See: https://smithery.ai/docs/build/project-config +FROM node:20-bullseye-slim + +# Install yt-dlp +RUN apt-get update \ + && apt-get install -y python3-pip python3 \ + && pip3 install yt-dlp \ + && rm -rf /var/lib/apt/lists/* + +# Create app directory and downloads dir +WORKDIR /app +RUN mkdir -p /root/Downloads + +# Copy package and source +COPY package.json package-lock.json tsconfig.json ./ +COPY src ./src + +# Install dependencies and build +RUN npm ci --ignore-scripts \ + && npm run prepare \ + && npm prune --production + +# Default command +ENTRYPOINT ["node", "lib/index.mjs"] diff --git a/README.md b/README.md index a465b20..d85a15b 100644 --- a/README.md +++ b/README.md @@ -1,4 +1,5 @@ # yt-dlp-mcp +[![smithery badge](https://smithery.ai/badge/@daniellopez-2/youtube-download)](https://smithery.ai/server/@daniellopez-2/youtube-download) An MCP server implementation that integrates with yt-dlp, providing video and audio content download capabilities (e.g. YouTube, Facebook, Tiktok, etc.) for LLMs. @@ -12,6 +13,14 @@ An MCP server implementation that integrates with yt-dlp, providing video and au ## Installation +### Installing via Smithery + +To install youtube-download for Claude Desktop automatically via [Smithery](https://smithery.ai/server/@daniellopez-2/youtube-download): + +```bash +npx -y @smithery/cli install @daniellopez-2/youtube-download --client claude +``` + ### Prerequisites Install `yt-dlp` based on your operating system: @@ -120,4 +129,3 @@ MIT Dewei Yen - diff --git a/smithery.yaml b/smithery.yaml new file mode 100644 index 0000000..35b1990 --- /dev/null +++ b/smithery.yaml @@ -0,0 +1,12 @@ +# Smithery configuration file: https://smithery.ai/docs/build/project-config + +startCommand: + type: stdio + commandFunction: + # A JS function that produces the CLI command based on the given config to start the MCP on stdio. + |- + (config) => ({ command: 'node', args: ['lib/index.mjs'], env: {} }) + configSchema: + # JSON Schema defining the configuration options for the MCP. + type: object + exampleConfig: {}