
RedNote Xiaohongshu
STDIOMCP server for searching and retrieving content from Xiaohongshu (Red Book) platform.
MCP server for searching and retrieving content from Xiaohongshu (Red Book) platform.
RedNote MCP is a Model Context Protocol (MCP) server for searching and retrieving content from Xiaohongshu (Red Book) platform. It provides intelligent content extraction with automatic login management and parallel processing capabilities.
interface RedBookNote { title: string; // Note title content: string; // Note content author: string; // Author name authorDesc?: string; // Author description link: string; // Note URL likes?: number; // Like count collects?: number; // Favorite count comments?: number; // Comment count tags?: string[]; // Hashtag list images?: string[]; // Image URLs (WebP format) }
git clone <repository-url> cd rednote-mcp
pnpm install
pnpm exec playwright install
pnpm build
pnpm start
pnpm dev
pnpm test
Add the following configuration to your Claude Desktop config file:
Windows: %APPDATA%\Claude\claude_desktop_config.json
macOS: ~/Library/Application Support/Claude/claude_desktop_config.json
{ "mcpServers": { "rednote-mcp": { "command": "node", "args": [ "C:\\ABSOLUTE\\PATH\\TO\\rednote-mcp\\build\\index.js" ] } } }
For macOS/Linux users:
{ "mcpServers": { "rednote-mcp": { "command": "node", "args": [ "/absolute/path/to/rednote-mcp/build/index.js" ] } } }
Replace the path with your actual project directory.
For other MCP-compatible clients, use the built server file:
node build/index.js
Once configured, you can use the search tool in your MCP client:
Search for "food recommendation" on Xiaohongshu
The tool will return structured data including titles, content, author information, and images.
rednote-mcp/
├── src/
│ ├── index.ts # MCP server entry point
│ └── xiaohongshu.ts # Core scraping logic
├── cookies/ # Auto-generated cookie storage
├── results/ # Optional: saved search results
├── build/ # Compiled JavaScript output
├── package.json
├── tsconfig.json
└── README.md
pnpm build
- Build TypeScript to JavaScriptpnpm start
- Run the built MCP serverpnpm dev
- Development mode with auto-reloadpnpm test
- Run tests (if available)pnpm clean
- Clean build directorycookies/
directory and restartpnpm exec playwright install
to install browsersThis project is licensed under the MIT License - see the LICENSE file for details.
This tool is for educational and research purposes. Please respect Xiaohongshu's terms of service and rate limits when using this tool.