Redbook-Search-Comment-MCP2.0  by chenningling

Automated social media engagement tool

Created 4 months ago
278 stars

Top 93.4% on SourcePulse

GitHubView on GitHub
Project Summary

This project provides an automated tool for interacting with Xiaohongshu (Little Red Book), a popular Chinese social media platform. It enables users to automate searching for posts, extracting content, and posting AI-generated comments, integrating with AI clients like Claude for enhanced comment quality. The primary benefit is streamlining content engagement and leveraging AI for more natural interactions on the platform.

How It Works

The tool operates as an MCP Server, designed to be integrated with an MCP Client. It utilizes Playwright for browser automation, handling tasks like logging in, searching for posts based on keywords, and extracting detailed post information (title, author, content, comments). A key feature is its two-step commenting process: first, it analyzes a post and returns structured data to the MCP Client, which then uses its AI capabilities to generate a relevant comment. Finally, the tool posts this AI-generated comment back to Xiaohongshu. This modular approach separates analysis, AI generation, and posting, enhancing maintainability and leveraging external AI for sophisticated comment creation.

Quick Start & Requirements

  • Installation: Clone the repository, create and activate a Python virtual environment, then install dependencies using pip install -r requirements.txt and pip install fastmcp. Playwright browsers must also be installed via playwright install.
  • Prerequisites: Python 3.8 or higher.
  • Configuration: Requires configuring the MCP Client (e.g., Claude for Desktop) with the absolute path to the virtual environment's Python interpreter and the main script (xiaohongshu_mcp.py).
  • Resources: Opens a real browser window during operation.

Highlighted Details

  • Leverages AI (via MCP Client) for generating natural and contextually relevant comments.
  • Supports four types of AI-generated comments: "lead generation," "like," "inquiry," and "professional."
  • Implements persistent login using browser contexts to avoid repeated logins.
  • Offers multiple methods for robust content extraction from posts.
  • Provides detailed error handling and debugging information.

Maintenance & Community

The project is based on JonaFly/RednoteMCP and has been optimized and expanded by windsurf. Further community interaction details, such as specific Discord/Slack channels or active maintainers beyond the initial contributors, are not explicitly detailed in the README.

Licensing & Compatibility

The README does not explicitly state a license. Users are cautioned to comply with Xiaohongshu's platform rules and to use the tool responsibly for learning and research purposes. The developers disclaim responsibility for any issues arising from misuse.

Limitations & Caveats

The tool runs in a non-hidden browser mode, meaning a browser window will be visible during operation. Users must manually scan a QR code for the initial login. There's a risk of account suspension due to excessive or rapid automated actions; users are advised to limit comments to around 30 per day. The tool may break if Xiaohongshu updates its website structure, requiring potential selector adjustments or project updates.

Health Check
Last Commit

2 months ago

Responsiveness

Inactive

Pull Requests (30d)
0
Issues (30d)
2
Star History
39 stars in the last 30 days

Explore Similar Projects

Feedback? Help us improve.