XHS Downloader

by JoeanAmier

Community Web Scraping & Data Collection 12k likes

XHS Downloader is an open-source tool that pulls note metadata and media files from XiaoHongShu (RedNote), with a built-in MCP server mode for AI clients.

Start MCP server

python main.py mcp

Source: https://github.com/JoeanAmier/XHS-Downloader

About

XHS Downloader started as a XiaoHongShu (小红书/RedNote) link extractor and file downloader, and it now ships a native MCP server mode alongside its TUI, API, and CLI modes. Running python main.py mcp starts a FastMCP-based server that exposes two tools: get_detail_data, which takes a note URL and returns its metadata (author, caption text, image and video links) without touching disk, and download_detail, which takes a note URL plus optional image-index and return-data flags and saves the underlying files to your configured Volume directory.

Under the hood it handles the parts that make RedNote scraping annoying to build yourself: watermark-free image and video URLs, automatic image-format conversion (PNG, WEBP, JPEG, HEIC), skip-if-already-downloaded detection with breakpoint resume, and per-note or per-author folder organization with 13-plus configurable filename fields. It also runs in Docker, which is the more practical route if you want the MCP endpoint reachable over HTTP instead of local stdio.

Key features

  • Two MCP tools: get_detail_data for metadata-only lookups and download_detail for fetching and saving files
  • Extracts links from an account's published, favorited, and liked notes, plus search results
  • Watermark-free image and video downloads with format conversion (PNG, WEBP, JPEG, HEIC)
  • Skip-already-downloaded detection with breakpoint resume for interrupted downloads
  • Runs as a TUI, REST API, CLI tool, or MCP server from the same codebase
  • Official Docker image for running the MCP endpoint as a standalone HTTP service

Use cases

  • Ask an agent to pull a RedNote post's caption and media links before deciding whether to download it
  • Bulk-archive an account's published or favorited notes into organized per-author folders
  • Fetch only specific images from a multi-image post by index instead of the whole set
  • Feed extracted note metadata into another workflow (translation, tagging, cataloguing) without downloading files first

Available tools

get_detail_data

Takes a XiaoHongShu note URL and returns its metadata (author, text, media links) without downloading anything.

download_detail

Takes a note URL, downloads its files to disk, and optionally returns the metadata alongside a completion message.

Frequently asked questions

Does the MCP server strip watermarks automatically?

Yes. download_detail resolves the same watermark-free media URLs the desktop app uses, so downloaded images and videos come out clean.

Can I download just some images from a post instead of all of them?

Yes. Pass an index list of the image positions you want to download_detail; omit it to fetch every file in the note.