xhs-mcp

xhs-mcp

A lightweight MCP server that provides read-only access to Xiaohongshu (Little Red Book) data, enabling search, note details, user profiles, and trending feeds via direct HTTP APIs.

Category
Visit Server

README

xhs-mcp

Lightweight MCP server for Xiaohongshu (Little Red Book / RED) — China's #1 lifestyle platform with 300M+ monthly active users.

No Docker. No Chromium. Just npx.

npx xhs-mcp-server

Why this exists

Xiaohongshu (小红书) is where Chinese consumers discover products, share reviews, and follow trends. If you're building for the Chinese market — or just want to understand what's trending there — you need data from this platform.

Existing solutions require Docker + Chromium (heavy, fragile). This server uses direct HTTP APIs, so it starts in <1 second and works anywhere Node.js runs.

What you can do

Tool Description
xhs_search Search notes by keyword with sorting and filtering
xhs_note_detail Get full content, images, and metrics for any note
xhs_user_profile Get creator profiles with follower/engagement stats
xhs_user_notes List all notes from a specific creator
xhs_explore Get the current trending/recommended feed

Quick start

1. Get your cookie

Log in to xiaohongshu.com in Chrome, then:

  1. Open DevTools (F12)
  2. Go to Application tab → Cookieshttps://www.xiaohongshu.com
  3. Copy the entire cookie string (or use a browser extension like "EditThisCookie" to export)

2. Add to your AI tool

Claude Desktop (~/Library/Application Support/Claude/claude_desktop_config.json):

{
  "mcpServers": {
    "xhs": {
      "command": "npx",
      "args": ["-y", "xhs-mcp-server"],
      "env": {
        "XHS_COOKIE": "your_cookie_string_here"
      }
    }
  }
}

Cursor (.cursor/mcp.json):

{
  "mcpServers": {
    "xhs": {
      "command": "npx",
      "args": ["-y", "xhs-mcp-server"],
      "env": {
        "XHS_COOKIE": "your_cookie_string_here"
      }
    }
  }
}

Claude Code:

claude mcp add xhs -- npx -y xhs-mcp-server
# Then set XHS_COOKIE in your environment

3. Use it

Ask your AI assistant:

  • "Search Xiaohongshu for skincare trends"
  • "Find the top creators posting about coffee in Shanghai"
  • "What's trending on Xiaohongshu right now?"
  • "Analyze this Xiaohongshu creator's content strategy"

Use cases

For cross-border brands:

  • Monitor brand mentions and competitor activity on China's top discovery platform
  • Understand what products Chinese consumers are excited about
  • Find potential KOL/KOC partners by analyzing creator profiles and engagement

For market researchers:

  • Track trending topics and consumer sentiment in China
  • Analyze content strategies that work on Xiaohongshu
  • Discover emerging product categories before they hit Western markets

For developers:

  • Build Chinese market intelligence into your AI agents
  • Create automated competitor monitoring dashboards
  • Integrate Xiaohongshu data into your workflow

How it compares

Feature xhs-mcp (this) xpzouying/xiaohongshu-mcp
Language TypeScript/Node Go
Install npx (1 second) Docker + Chromium (minutes)
Dependencies None Docker, Chromium, ~500MB
Search Yes Yes
Read notes Yes Yes
User profiles Yes Yes
Publish content Not yet Yes
Login (QR code) Not yet Yes
Auth method Cookie (manual) Browser automation

This server is read-only by design. It focuses on research and analysis. If you need to publish content, use xpzouying/xiaohongshu-mcp — it's excellent for that.

Cookie notes

  • Cookies typically last 7-30 days before expiring
  • If you get 401 or not_logged_in errors, refresh your cookie
  • The server will warn you at startup if XHS_COOKIE is not set
  • Never commit your cookie to version control

Roadmap

  • [ ] Creator analytics (engagement rate calculation, posting frequency)
  • [ ] Comment analysis (sentiment, themes)
  • [ ] Trend detection (rising keywords over time)
  • [ ] Content translation (Chinese → English summaries)
  • [ ] Cookie refresh helper
  • [ ] Publish support (opt-in, with rate limiting)

Contributing

PRs welcome. This project is MIT licensed.

About

Built by Tristin — building AI tools for cross-border commerce, in public.


Xiaohongshu is a trademark of Xingyin Information Technology Co., Ltd. This project is not affiliated with or endorsed by Xiaohongshu.

Recommended Servers

playwright-mcp

playwright-mcp

A Model Context Protocol server that enables LLMs to interact with web pages through structured accessibility snapshots without requiring vision models or screenshots.

Official
Featured
TypeScript
Magic Component Platform (MCP)

Magic Component Platform (MCP)

An AI-powered tool that generates modern UI components from natural language descriptions, integrating with popular IDEs to streamline UI development workflow.

Official
Featured
Local
TypeScript
Audiense Insights MCP Server

Audiense Insights MCP Server

Enables interaction with Audiense Insights accounts via the Model Context Protocol, facilitating the extraction and analysis of marketing insights and audience data including demographics, behavior, and influencer engagement.

Official
Featured
Local
TypeScript
VeyraX MCP

VeyraX MCP

Single MCP tool to connect all your favorite tools: Gmail, Calendar and 40 more.

Official
Featured
Local
graphlit-mcp-server

graphlit-mcp-server

The Model Context Protocol (MCP) Server enables integration between MCP clients and the Graphlit service. Ingest anything from Slack to Gmail to podcast feeds, in addition to web crawling, into a Graphlit project - and then retrieve relevant contents from the MCP client.

Official
Featured
TypeScript
Kagi MCP Server

Kagi MCP Server

An MCP server that integrates Kagi search capabilities with Claude AI, enabling Claude to perform real-time web searches when answering questions that require up-to-date information.

Official
Featured
Python
E2B

E2B

Using MCP to run code via e2b.

Official
Featured
Neon Database

Neon Database

MCP server for interacting with Neon Management API and databases

Official
Featured
Exa Search

Exa Search

A Model Context Protocol (MCP) server lets AI assistants like Claude use the Exa AI Search API for web searches. This setup allows AI models to get real-time web information in a safe and controlled way.

Official
Featured
Qdrant Server

Qdrant Server

This repository is an example of how to create a MCP server for Qdrant, a vector search engine.

Official
Featured