Xiaohongshu Search & Comment

This tool acts as a friendly digital assistant for Xiaohongshu, one of the world's most popular social media and e-commerce platforms. In simple terms, it allows an AI assistant to browse the platform just like a human would—searching for specific topics, reading through posts, and keeping up with the latest trends. Instead of a user having to manually click through dozens of pages, this tool gathers all the information and presents it in a clear, easy-to-read format. On a more technical level, the tool is built using Playwright for robust browser automation and Python for seamless integration. It handles complex tasks like manual QR code login with session persistence, meaning it stays logged in for future sessions without constant re-authentication. It offers deep data extraction capabilities, pulling not just the text of a note, but also metadata like author details, timestamps, and full comment sections. This allows for a comprehensive analysis of the platform's content and community sentiment. For developers and AI enthusiasts, this MCP server is a powerful bridge between Large Language Models and real-world social data. It enables an AI to perform "Smart Commenting," where the model analyzes a post's context and chooses from different interaction styles—such as professional, inquisitive, or engagement-focused—to post natural-sounding responses. Because the latest version modularizes note analysis and comment generation, developers can leverage an AI's reasoning to create sophisticated, automated community management workflows that feel personal and context-aware rather than robotic.

Category: Browser & Web Automation

Tags: automation, playwright, social-media, web scraping, xiaohongshu

Visit Xiaohongshu Search & Comment

How to install and configure Xiaohongshu Search & Comment

1. Installation This MCP server is based on Python and Playwright. Follow these steps to install: 1. Python Environment: Ensure Python 3.8 or higher is installed. 2. Project Acquisition: Clone or download the RedBook-Search-Comment-MCP repository to your local machine. 3. Create Virtual Environment: bash # Create virtual environment python3 -m venv venv # Activate virtual environment # Windows venv\Scripts\activate # macOS/Linux source venv/bin/activate 4. Install Dependencies: bash pip install -r requirements.txt pip install fastmcp 5. Install Browser: bash playwright install ---

2. Configuration Add the following configuration to your MCP Client settings file (e.g., claude_desktop_config.json). You must use absolute paths for the Python executable and the script file. json { "mcpServers": { "xiaohongshu MCP": { "command": "/ABSOLUTE_PATH/TO/venv/bin/python3", "args": [ "/ABSOLUTE_PATH/TO/xiaohongshu_mcp.py", "--stdio" ] } } } ---

3. Available Tools The server provides the following functions: * mcp0_login(): Opens a browser window for manual QR code login to Xiaohongshu. Saves login state for future sessions. * mcp0_search_notes(keywords, limit): Searches for notes using keywords. * keywords (string): Search terms. * limit (number): Number of results to return (default: 5). * mcp0_get_note_content(url): Retrieves detailed content including title, author, time, and text. * url (string): The Xiaohongshu note URL. * mcp0_get_note_comments(url): Retrieves the comment section for a specific note. * url (string): The Xiaohongshu note URL. * mcp0_post_smart_comment(url, comment_type): Posts an AI-generated comment to a note. * url (string): The Xiaohongshu note URL. * comment_type (string): Options include "引流" (Traffic/Lead gen), "点赞" (Simple like/interact), "咨询" (Inquiry/Question), or "专业" (Professional/Authoritative). ---

4. Example Prompts You can use the following prompts in your MCP-enabled client: * Login: "帮我登录小红书账号" (Help me log in to my Xiaohongshu account) * Search: "帮我搜索小红书笔记,关键词为:美食" (Help me search Xiaohongshu notes for the keyword: Gourmet food) * Get Content: "请查看这个小红书笔记的内容:https://www.xiaohongshu.com/..." (Please check the content of this Xiaohongshu note: [URL]) * Comment: "请在这个小红书笔记下发布一条引流评论:[URL]" (Please post a traffic-leading comment under this Xiaohongshu note: [URL])

What you can do with Xiaohongshu Search & Comment

Use Case 1: Competitor Sentiment and Market Research Problem: Marketing teams often spend hours manually scrolling through Xiaohongshu to understand how users feel about a competitor's product or to identify common pain points in a specific niche. Solution: This MCP allows a user to automate the gathering of market intelligence. By searching for competitor brand names and extracting both the note content and user comments, an AI (like Claude) can analyze thousands of words of feedback in seconds to identify trends, complaints, or unmet needs. Example: A skincare brand manager asks Claude to: "Search for 'Brand X Moisturizer,' retrieve the content and comments of the top 10 notes, and summarize the top 3 reasons why users are dissatisfied with it."

Use Case 2: Automated Authority Building for Personal Brands Problem: To grow an account on Xiaohongshu, users need to interact with trending posts in their niche. Manually writing high-quality, professional comments on dozens of posts every day is exhausting. Solution: Using the mcp0_post_smart_comment tool with the "Professional" or "Inquiry" types, a creator can automate high-value engagement. The MCP reads the note content and uses the LLM to generate a relevant, insightful comment that establishes the creator as an expert in that field. Example: A fitness coach sets a workflow: "Search for 'weight loss tips' every morning, find the top 5 notes from the last 24 hours, and post a 'Professional' type comment sharing one additional scientific tip related to the note's content."

Use Case 3: Targeted Lead Generation and Customer Support Problem: Businesses often miss opportunities to help potential customers who are asking questions in the comment sections of viral posts (e.g., "Where can I buy this?" or "Does this work for beginners?"). Solution: This MCP can be used to scan comment sections of popular notes for specific "buying intent" keywords. Once a potential lead is identified, the user can use the "Lead Generation" (引流) comment type to provide an answer and direct the user to their own profile or services. Example: A travel agency uses the MCP to search for "Tokyo travel guide," retrieves comments for the top-ranking notes, and identifies users asking about private tours. The agency then posts a "Lead Gen" comment: "I just posted a detailed 7-day private itinerary on my profile that covers these spots, feel free to check it out!"

Use Case 4: Content Strategy and "Viral Gap" Analysis Problem:…

Key facts

  • Open Source
  • Browser & Web Automation, Communication & Messaging, CRM, ERP & E-commerce
  • automation, playwright, social-media, web scraping, xiaohongshu

Part of MCP Servers

Related MCP servers

  • MCP JSON — A collection of servers for file system operations, Google search, web automation, and executing terminal commands.
  • MCP NPX Fetch — Fetch and transform web content into various formats like HTML, JSON, Markdown, or Plain Text.
  • MCP Microsoft Office Bridge — A secure, multi-user server connecting LLMs to Microsoft 365 services.
  • MCP Naver News — Search for news articles using the Naver News API. Requires Naver News API credentials.
  • MCP NIF.PT — Query and analyze Portuguese companies using the NIF.PT public API. Supports search by NIF, company name, and city.
  • MCP Node Fetch — Fetch web content using the Node.js undici library.
  • AI Tools
  • Categories
  • Industries
  • CLI Coding Agents
  • MCP Servers
  • MCP Categories