{"type":"mcp_server","name":"XHS-Downloader","description":"XiaoHongShu (RedNote) data extraction tool. Extracts user/post links, scrapes info, and downloads watermark-free content.","category":"System Tools","language":"Python","stars":11770,"forks":1254,"owner":"JoeanAmier","github_url":"https://github.com/JoeanAmier/XHS-Downloader","homepage":"https://discord.com/invite/ZYtmgKud9Y","setup":"## Setup\n\nThis section provides instructions for setting up and running XHS-Downloader using different methods: Program Execution, Docker, and Source Code Execution.\n\n### 1. Program Execution\n\nThis method is recommended for users of macOS and Windows 10 or later who want a simple way to download files.\n\n**Prerequisites:**\n\n*   macOS or Windows 10 or later operating system.\n\n**Installation Steps:**\n\n1.  Download the program package from the [Releases](https://github.com/JoeanAmier/XHS-Downloader/releases/latest) page or [Actions](https://github.com/JoeanAmier/XHS-Downloader/actions) page.\n2.  Extract the downloaded archive to a local directory.\n3.  Open the extracted directory.\n4.  Double-click the `main` executable to run the program.\n\n    **Note:** On macOS, the `main` executable might need to be launched from the terminal.  The macOS executable has not been thoroughly tested and its functionality is not guaranteed.\n\n**Configuration:**\n\n*   The default download path is `.\\_internal\\Volume\\Download`.\n*   The configuration file is located at `.\\_internal\\Volume\\settings.json`.\n\n**Updating the Program:**\n\n*   **Method 1:** Download and extract the new version. Copy the `_internal\\Volume` folder from the old version to the new version.\n*   **Method 2:** Download and extract the new version (without running it). Copy all files from the new version and overwrite the files in the old version.\n\n### 2. Docker Execution\n\nThis method is suitable for users familiar with Docker who want a containerized environment.\n\n**Prerequisites:**\n\n*   Docker installed on your system.\n\n**Installation Steps:**\n\n1.  **Obtain the Docker image:**\n    *   **Option 1:** Build the image using the provided `Dockerfile`.\n    *   **Option 2:** Pull the image from Docker Hub using the command: `docker pull joeanamier/xhs-downloader`\n    *   **Option 3:** Pull the image from GitHub Container Registry using the command: `docker pull ghcr.io/joeanamier/xhs-downloader`\n\n2.  **Create a container:**\n\n    *   **TUI Mode:** `docker run --name <container_name> -p <host_port>:5556 -v xhs_downloader_volume:/app/Volume -it <image_name>`\n    *   **API Mode:** `docker run --name <container_name> -p <host_port>:5556 -v xhs_downloader_volume:/app/Volume -it <image_name> python main.py api`\n    *   **MCP Mode:** `docker run --name <container_name> -p <host_port>:5556 -v xhs_downloader_volume:/app/Volume -it <image_name> python main.py mcp`\n\n        Replace `<container_name>` with a name for your container (optional), `<host_port>` with the port you want to expose on your host machine, and `<image_name>` with the name of the image you pulled (either `joeanamier/xhs-downloader` or `ghcr.io/joeanamier/xhs-downloader`).\n\n3.  **Run the container:**\n\n    *   Start the container: `docker start -i <container_name>/<container_id>`\n    *   Restart the container: `docker restart -i <container_name>/<container_id>`\n\n**Limitations:**\n\n*   Command-line mode is not supported in Docker.\n*   Clipboard reading and monitoring features are not available.\n\n### 3. Source Code Execution\n\nThis method is recommended for developers or users who want to customize the program or contribute to the project.\n\n**Prerequisites:**\n\n*   Python 3.12 installed.\n\n**Installation Steps:**\n\n1.  Download the latest source code from the GitHub repository or the [Releases](https://github.com/JoeanAmier/XHS-Downloader/releases/latest) page.\n2.  Extract the downloaded archive to a local directory.\n3.  Open a terminal and navigate to the project's root directory.\n4.  Install the required Python modules using the command: `pip install -i https://pypi.tuna.tsinghua.edu.cn/simple -r requirements.txt`\n5.  Run the program using the command: `python main.py`\n\n**Configuration:**\n\n*   Configuration is done through the `settings.json` file in the project root directory.  This file is automatically generated on the first run.\n\n**Environment Variables:**\n\n*   No specific environment variables are required.  Configuration is primarily handled through the `settings.json` file.\n\n**settings.json Configuration Options:**\n\n| Parameter       | Type    | Description","tools":"## Available Tools\n\n**Program Features:**\n\n*   **Collect Xiaohongshu post information:** Gathers details about Xiaohongshu posts, such as title, description, author, and other metadata.\n*   **Extract Xiaohongshu post download URLs:** Retrieves the direct download links for images and videos within a Xiaohongshu post.\n*   **Download Xiaohongshu watermark-free post files:** Downloads the actual image and video files from Xiaohongshu posts without watermarks.\n*   **Download Xiaohongshu livePhoto files (with watermark):** Downloads live photo files, which include watermarks.\n*   **Automatically skip downloaded post files:** Prevents re-downloading of files by checking against a record of already downloaded posts.\n*   **Post file integrity processing mechanism:** Ensures that downloaded files are complete and not corrupted.\n*   **Customizable image-text post file download format:** Allows users to define how image and text posts are downloaded and organized.\n*   **Persistently store post information to a file:** Saves post metadata to a file for later use or analysis.\n*   **Store post files in separate folders:** Organizes downloaded files into individual folders for each post.\n*   **Background monitoring of clipboard downloads:** Automatically detects Xiaohongshu links copied to the clipboard and initiates downloads.\n*   **Record downloaded post IDs:** Keeps track of downloaded post IDs to prevent duplicates.\n*   **Support command-line download of post files:** Enables users to download posts using command-line arguments.\n    *   Example: `python .\\main.py --browser_cookie Chrome --update_settings`\n*   **Read Cookie from browser:** Allows the program to automatically fetch cookies from your browser for authentication.\n    *   Example: `python .\\main.py --browser_cookie Chrome --update_settings`\n*   **Customizable file name format:** Lets users define the naming convention for downloaded files.\n*   **Support API call function:** Enables programmatic access to the downloader's features through an API.\n    *   Endpoint: `/xhs/detail`\n    *   Method: `POST`\n    *   Format: `JSON`\n*   **Support MCP call function:** Enables programmatic access to the downloader's features through an MCP (Message Control Protocol).\n    *   MCP URL: `http://127.0.0.1:5556/mcp/`\n*   **Support breakpoint resume download:** Allows interrupted downloads to be resumed from where they left off.\n*   **Intelligently identify post file types:** Automatically detects the type of files being downloaded (e.g., image, video).\n*   **Support setting author notes:** Allows users to add custom notes or tags to downloaded posts.\n*   **Automatically update author nicknames:** Keeps author nicknames up-to-date in downloaded file names and metadata.\n\n**User Script Features:**\n\n*   **Download Xiaohongshu watermark-free post files:** Downloads image and video files without watermarks directly from the Xiaohongshu website.\n*   **Extract recommended page post links:** Extracts links from the \"For You\" page.\n*   **Extract account published post links:** Extracts links from a user's profile page.\n*   **Extract account collection post links:** Extracts links from a user's \"Favorites\" page.\n*   **Extract account liked post links:** Extracts links from a user's \"Likes\" page.\n*   **Extract account album post links:** Extracts links from a user's album page.\n*   **Extract search results post links:** Extracts links from search result pages.\n*   **Extract search results user links:** Extracts links to user profiles from search results.","faq":null,"created_at":"2023-08-16T11:03:36+00:00","updated_at":"2025-08-08T10:05:59+00:00","source_url":"https://model-context-protocol.com/servers/xhs-downloader","related_articles":[{"title":"Mastering XHS-Downloader in 2025","url":"https://model-context-protocol.com/blog/xhs-downloader-guide"}]}