UNPKG

mcp-xiaohongshu

Version:

A friendly tool to help you access and interact with Xiaohongshu (RedNote) content through Model Context Protocol.

51 lines (50 loc) 1.29 kB
import { NoteDetail } from './noteDetail'; export interface Note { title: string; content: string; tags: string[]; url: string; author: string; likes?: number; collects?: number; comments?: number; } export interface Comment { author: string; content: string; likes: number; time: string; } export interface AddNoteParams { title: string; content: string; tags?: string[]; images?: string[]; videos?: string[]; isPrivate?: boolean; manualReview?: boolean; } export interface AddNoteResult { success: boolean; url?: string; message: string; } export declare class RedNoteTools { private authManager; private browser; private page; constructor(); initialize(): Promise<void>; cleanup(): Promise<void>; extractRedBookUrl(shareText: string): string; searchNotes(keywords: string, limit?: number): Promise<Note[]>; getNoteContent(url: string): Promise<NoteDetail>; getNoteComments(url: string): Promise<Comment[]>; addNote(params: AddNoteParams): Promise<AddNoteResult>; /** * Wait for a random duration between min and max seconds * @param min Minimum seconds to wait * @param max Maximum seconds to wait */ private randomDelay; }