explaingit

usubamayoi/xhs-read-mcp

Analysis updated 2026-05-18

24JavaScriptAudience · developerComplexity · 2/5Setup · easy

TLDR

An MCP tool that fetches a Xiaohongshu post link and returns its title, text, author, engagement stats, comments, and images without needing login or a browser.

Mindmap

mindmap
  root((xhs-read-mcp))
    What it does
      Reads Xiaohongshu posts
      Returns title and text
      Returns comments and images
    Tech stack
      JavaScript
      MCP server
    Use cases
      Let Claude read RED posts
      Summarize social posts
      Pull post data without login
    Audience
      Developers
      MCP tool builders

Code map

Detail Auto

An interactive map of this repo's files and how they connect — its source is parsed live in your browser. Click Visualize to build it.

filefunction / class

What do people build with it?

USE CASE 1

Let an AI assistant read and summarize a Xiaohongshu post from a shared link.

USE CASE 2

Pull a post's title, text, author, and engagement stats without logging in.

USE CASE 3

Fetch a post's images alongside its text, or skip images to save tokens.

USE CASE 4

Integrate Xiaohongshu post reading into an MCP toolset.

What is it built with?

JavaScriptMCP

How does it compare?

usubamayoi/xhs-read-mcpaaaddress1/vibe-readingamirhosseinjpl/jpl-sub-processor
Stars242424
LanguageJavaScriptJavaScriptJavaScript
Setup difficultyeasymoderatemoderate
Complexity2/52/53/5
Audiencedeveloperresearcherops devops

Figures from each repo's GitHub metadata at analysis time.

How do you get it running?

Difficulty · easy Time to first run · 5min

No login or cookies needed, works by parsing JSON already embedded in the page HTML.

In plain English

xhs-read-mcp is a small tool that lets Claude read posts directly from Xiaohongshu, a Chinese social platform also known as RED or Little Red Book. You give it a Xiaohongshu link, and it returns the post's title, main text, author, engagement numbers like likes and comments, the first screen of comments, and any images attached to the post. The way it works is straightforward. Xiaohongshu's web pages embed a block of JSON data inside the page's HTML, under a variable called INITIAL_STATE, and all of the post's real content lives inside that JSON. The tool sends a request to fetch the raw HTML of the link, pulls out that embedded JSON block, and then parses out the specific fields it needs, such as the title and comments. Because everything it needs is already sitting in the page's HTML, it does not require logging into an account, does not need cookies, and does not need a full browser automation tool like Puppeteer to work. This is built as an MCP server tool, meaning it is meant to be used as part of an MCP toolset rather than run on its own as a standalone app. The README points to a file called xhs_read_snippet.js as the reference implementation to look at. It takes a required url parameter, which can be either a short xhslink.com link or a full xiaohongshu.com link, and an optional include_images parameter that defaults to true, setting it to false skips images and returns text only, which uses fewer tokens. The README also notes that if you are using Claude Code specifically, you do not need this MCP tool at all, since Claude Code can already read a pasted Xiaohongshu link using its own web fetching ability. The README lists a few limits: video posts only return their text and cover image rather than video content, only the first screen of comments is captured, and if Xiaohongshu changes its page structure the parsing logic inside this tool may need to be updated to keep working.

Copy-paste prompts

Prompt 1
Show me how to register xhs_read_snippet.js as an MCP tool so Claude can call it.
Prompt 2
Explain how xhs-read-mcp extracts the __INITIAL_STATE__ JSON from a Xiaohongshu page.
Prompt 3
Help me add a parameter to this tool that also returns the post's publish date.
Prompt 4
Write a fallback in this tool for when Xiaohongshu changes its page structure and parsing breaks.

Frequently asked questions

What is xhs-read-mcp?

An MCP tool that fetches a Xiaohongshu post link and returns its title, text, author, engagement stats, comments, and images without needing login or a browser.

What language is xhs-read-mcp written in?

Mainly JavaScript. The stack also includes JavaScript, MCP.

How hard is xhs-read-mcp to set up?

Setup difficulty is rated easy, with roughly 5min to a first successful run.

Who is xhs-read-mcp for?

Mainly developer.

Open on GitHub → Explain another repo

This repo across BitVibe Labs

Verify against the repo before relying on details.