Skip to main content
Glama
xyj2570
by xyj2570

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.

Related MCP server: xiaohongshu-skill

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

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.

  • 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.

Available Tools

5 tools
xhs_exploreA

Get the current trending/explore feed from Xiaohongshu homepage. Shows what content is currently popular on the platform. Great for trend spotting and understanding what resonates with Chinese consumers.

ParametersJSON Schema
NameRequiredDescriptionDefault
categoryNoFeed category (leave empty for recommended). Examples: homefeed_recommend, homefeed.fashion_v3, homefeed.food_v3

TDQS

A4/5.0
Behavior3/5

Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?

With no annotations, the description carries the behavioral disclosure burden. It does communicate that the tool returns a real-time, platform-level feed, which is useful. But it does not mention any behavioral details such as authentication requirements, rate limits, pagination, or output format. For a read-only feed tool, this is acceptable but not exemplary.

Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.

Conciseness5/5

Is the description appropriately sized, front-loaded, and free of redundancy?

The description is concise: two sentences that lead with the action, then describe the benefit. Every sentence earns its place, with no redundancy or filler.

Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.

Completeness4/5

Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?

Given the tool's simplicity (single optional parameter, no output schema), the description covers the essential purpose and usage context. It could be improved by mentioning the return format or pagination behavior, but it is largely complete for a trending-feed retrieval tool.

Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.

Parameters3/5

Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?

The schema fully describes the single parameter 'category' with examples, giving 100% coverage. The description does not add extra meaning about the parameter's effect beyond the schema, so the baseline of 3 applies.

Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.

Purpose5/5

Does the description clearly state what the tool does and how it differs from similar tools?

The description clearly states the tool fetches the current trending/explore feed from the Xiaohongshu homepage, using a specific verb ('Get') and resource ('trending/explore feed'). It distinguishes itself from sibling tools like search, note detail, and user profiles by focusing on platform-wide trends rather than specific user or search-driven content.

Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.

Usage Guidelines4/5

Does the description explain when to use this tool, when not to, or what alternatives exist?

The description provides clear context for when to use the tool: 'Great for trend spotting and understanding what resonates with Chinese consumers.' This implies usage for high-level market/trend analysis. However, it does not explicitly mention alternatives or when not to use it, so it falls short of a full 5.

Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.

xhs_note_detailA

Get full detail of a specific Xiaohongshu note by ID. Returns the complete content, all images, engagement metrics, author info, and tags. Use note IDs from xhs_search results.

ParametersJSON Schema
NameRequiredDescriptionDefault
note_idYesXiaohongshu note ID (from search results or URL)

TDQS

A3.8/5.0
Behavior2/5

Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?

No annotations are provided, so the description must disclose behavioral traits. It lists return content and ID source but does not mention whether the operation is read-only, requires authentication, has rate limits, or how errors are handled. This is a significant gap for a data-fetching tool.

Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.

Conciseness5/5

Is the description appropriately sized, front-loaded, and free of redundancy?

Two succinct sentences: the first defines the tool's purpose, the second provides a usage tip. No redundant wording or unnecessary detail; every sentence earns its place.

Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.

Completeness4/5

Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?

Despite lacking annotations or an output schema, the description enumerates the return contents (content, images, engagement metrics, author info, tags) and specifies the input source. For a simple one-parameter tool, this provides sufficient operational context, though edge cases and error handling are not covered.

Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.

Parameters3/5

Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?

Schema already describes note_id fully ('Xiaohongshu note ID (from search results or URL)') with 100% coverage. The description only repeats this, adding no new semantic meaning. Baseline of 3 is appropriate since the schema carries the burden.

Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.

Purpose5/5

Does the description clearly state what the tool does and how it differs from similar tools?

Description clearly states the action ('Get full detail') and resource ('specific Xiaohongshu note by ID'), distinguishing it from sibling tools like xhs_search or xhs_user_profile. The verb+resource combination is specific and unambiguous.

Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.

Usage Guidelines4/5

Does the description explain when to use this tool, when not to, or what alternatives exist?

Provides explicit guidance on where to obtain the note_id ('Use note IDs from xhs_search results'), giving practical usage context. Does not formally enumerate alternatives or exclusions, but sibling tools have distinct purposes, making the intended use clear.

Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.

xhs_user_notesA

Get all published notes from a specific Xiaohongshu user. Returns their content portfolio with engagement metrics. Useful for analyzing a creator's content strategy.

ParametersJSON Schema
NameRequiredDescriptionDefault
cursorNoPagination cursor from previous request (empty for first page)
user_idYesXiaohongshu user ID

TDQS

A4/5.0
Behavior3/5

Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?

No annotations are provided, so the description must carry the full burden of behavioral disclosure. It states the return includes 'content portfolio with engagement metrics', which is useful, but it does not mention pagination behavior or that 'all' notes may require multiple calls via the cursor parameter. This is a minor transparency gap.

Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.

Conciseness5/5

Is the description appropriately sized, front-loaded, and free of redundancy?

The description is two sentences, front-loaded with the core purpose, followed by a use case. There is no unnecessary verbiage or repetition; every word adds value.

Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.

Completeness4/5

Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?

For a simple list tool with two parameters and no output schema, the description is reasonably complete. It describes the return content (notes with metrics) and mentions a use case. The lack of explicit pagination instructions is a minor gap, but the schema covers it, and the tool is not highly complex.

Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.

Parameters3/5

Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?

The schema provides 100% coverage for both parameters (user_id and cursor) with clear descriptions. The tool description adds minimal value beyond what the schema already says, just confirming the resource is a specific user. Since schema coverage is high, a baseline of 3 is appropriate.

Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.

Purpose5/5

Does the description clearly state what the tool does and how it differs from similar tools?

The description clearly states the action ('Get all published notes') and the target resource ('a specific Xiaohongshu user'), which is precise and unambiguous. It also distinguishes itself from sibling tools like xhs_user_profile (profile info) and xhs_note_detail (single note), making its purpose unique.

Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.

Usage Guidelines4/5

Does the description explain when to use this tool, when not to, or what alternatives exist?

The description provides a clear use case ('analyzing a creator's content strategy') but does not explicitly state when not to use it or mention alternatives. It offers implied guidance for when this tool is appropriate, but lacks explicit exclusions.

Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.

xhs_user_profileA

Get a Xiaohongshu user's profile including follower count, total likes, number of notes, and bio. Useful for influencer research and competitive analysis.

ParametersJSON Schema
NameRequiredDescriptionDefault
user_idYesXiaohongshu user ID (from note details or search results)

TDQS

A4/5.0
Behavior3/5

Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?

With no annotations provided, the description carries the behavioral disclosure burden. It makes the read-only nature apparent through 'Get' and lists returned fields, but does not mention authorization requirements, rate limits, or data freshness. For a simple profile lookup this is acceptable, though not exhaustive.

Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.

Conciseness5/5

Is the description appropriately sized, front-loaded, and free of redundancy?

Two concise sentences: the first states the core purpose and return fields, the second provides practical use cases. There is no filler or redundancy, and important information is front-loaded.

Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.

Completeness4/5

Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?

With only one required parameter and no output schema, the description compensates well by naming key profile fields and a use case. It does not cover error cases or edge conditions, but for a straightforward profile retrieval it is sufficiently complete.

Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.

Parameters3/5

Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?

The single parameter user_id is fully described in the schema, including its source ('from note details or search results'), so schema coverage is 100%. The description adds no further parameter-specific detail, which is unnecessary given the schema already handles it.

Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.

Purpose5/5

Does the description clearly state what the tool does and how it differs from similar tools?

The description clearly identifies the resource (Xiaohongshu user profile) and specific data points (follower count, total likes, number of notes, bio). It naturally distinguishes from siblings like xhs_note_detail and xhs_user_notes by focusing on the profile-level resource.

Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.

Usage Guidelines4/5

Does the description explain when to use this tool, when not to, or what alternatives exist?

The description explicitly states usefulness for influencer research and competitive analysis, providing clear context for when to use this tool. It does not explicitly rule out alternatives or provide when-not-to-use guidance, but the use cases are informative enough.

Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.

Tool Schema Changelog

Recent tool additions, removals, and schema changes observed during successful MCP inspections. Dates show when Glama detected each change.

  1. 5 tool updatesv0.1.0
    • First observedxhs_explore
    • First observedxhs_note_detail
    • First observedxhs_search
    • First observedxhs_user_notes
    • First observedxhs_user_profile

TDQS

A4.1/5.0
Disambiguation5/5

Each tool targets a distinct resource and action: search notes, get note details, get user profile, get user notes, and explore trending feed. There is no overlap in their purposes, so an agent can easily choose the right tool.

Naming Consistency4/5

All tool names use a consistent 'xhs_' prefix and snake_case. However, there is a slight mix between verb-based names (xhs_search, xhs_explore) and noun-based names (xhs_note_detail, xhs_user_profile, xhs_user_notes), deviating from a uniform verb_noun pattern.

Tool Count5/5

Five tools is well within the ideal range for a focused server. Each tool meaningfully contributes to the apparent purpose of Xiaohongshu research and trend analysis without being padded or insufficient.

Completeness4/5

The server covers the core read-only workflows (search, detail, user portfolio, trends) for market research. Minor gaps exist, such as no user search or comment-level detail, but they do not severely hinder typical use cases.

Maintenance

ActivityInactive
ResponsivenessNo issues

Resources

Unclaimed servers have limited discoverability.

Looking for Admin?

If you are the server author, to access and configure the admin panel.

Related MCP Connectors

Related MCP Servers

  • A
    license
    Not graded
    quality
    D
    maintenance
    A locally-run MCP server that enables downloading images, videos, and LivePhotos from Xiaohongshu (RedNote) and retrieving detailed work information through URL-based queries.
    8
    GPL 3.0
  • A
    license
    Not graded
    quality
    C
    maintenance
    MCP server for automating Xiaohongshu (RED Note). Publish posts, search content, comment, like, and analyze creator data on China's largest lifestyle social platform.
    24
    MIT
  • F
    license
    A
    quality
    D
    maintenance
    A lightweight MCP server that lets AI assistants publish notes to Xiaohongshu (Little Red Book) via browser automation. Supports login, image-text note publishing with up to 9 images, and search.
    4
    1
    -

Latest Blog Posts

MCP directory API

We provide all the information about MCP servers via our MCP API.

curl -X GET 'https://glama.ai/api/mcp/v1/servers/xyj2570/xhs-mcp'

If you have feedback or need assistance with the MCP directory API, please join our Discord server