Skip to content

Releases: ShunL12324/xhs-mcp

v2.7.0

Choose a tag to compare

@ShunL12324 ShunL12324 released this 02 Feb 12:28

What's New

🛑 New Tool: xhs_stop_explore

  • Gracefully stop running explore sessions
  • Can stop specific session by ID or all active sessions
  • Uses AbortController-based cancellation mechanism
  • Session completes current action before stopping

Usage

// Stop all explore sessions for an account
xhs_stop_explore({ account: "my-account" })

// Stop a specific session
xhs_stop_explore({ account: "my-account", sessionId: "session-id" })

Documentation

  • Added API documentation for xhs_stop_explore
  • Updated README with new tool

v2.6.0

Choose a tag to compare

@ShunL12324 ShunL12324 released this 01 Feb 23:24

What's New

🎨 Image Processor with LangGraph Workflow

  • New AI-powered image processing pipeline for creating Xiaohongshu-style content
  • xhs_create_draft now accepts screenshots parameter and auto-generates beautiful images
  • Multi-phase workflow: analyze → layout → process → beautify → quality check
  • Quality check with suggestedOrder for automatic image reordering

🤖 Explore AI Enhancements

  • New like-target prompt for smart liking decisions (post vs comment vs skip)
  • AI now chooses whether to like the post or a specific comment
  • Improved comment extraction from note details

📝 Documentation

  • Updated API docs for new image-processor workflow
  • Removed deprecated xhs_generate_image tool (replaced by integrated workflow)

Breaking Changes

  • xhs_create_draft parameter changed from images to screenshots
  • xhs_generate_image tool removed (use integrated xhs_create_draft instead)

v2.5.0

Choose a tag to compare

@ShunL12324 ShunL12324 released this 31 Jan 09:17

What's New

Prompt System for Explore AI Customization

Each account now has customizable prompt files that control AI behavior during explore:

  • persona.txt - Character definition (interests, comment style)
  • select.txt - Note selection prompt template
  • comment.txt - Comment generation prompt template

Prompts use LiquidJS templating with variables like {{ persona }}, {{ notes }}, {{ title }}.

New Tools

  • xhs_get_account_prompt - Get prompt file content (persona/select/comment)
  • xhs_set_account_prompt - Update prompt file content

Explore Enhancements

  • Cross-session deduplication - Previously interacted notes are excluded (configurable via deduplicate parameter)
  • Random behavior patterns - More human-like browsing:
    • 10% quick scroll mode
    • 5% scroll back to check earlier content
    • 15% quick close (pretend not interested)
    • 10% long pause / deep reading

Configuration Changes

  • Removed DEBUG environment variable
  • Use XHS_MCP_HEADLESS (default: true) to control browser visibility
  • Use XHS_MCP_KEEP_OPEN (default: false) to keep browser open after operation

Other Changes

  • Prompt files auto-initialize on first access
  • Prompt directory cleaned up on account deletion
  • Updated documentation

v2.4.0

Choose a tag to compare

@ShunL12324 ShunL12324 released this 30 Jan 19:28

New MCP Tools

xhs_explore

Automated browsing with AI-powered features:

  • AI note selection based on user interests (Gemini)
  • AI-generated comments in natural language
  • Human-like scrolling and browsing behavior
  • Probability-based liking and commenting
  • Session tracking and action logging to database

xhs_get_notifications

Get notifications (mentions, likes, connections) with info for replying.

Enhancements

  • DEBUG mode: Set DEBUG=true for non-headless browser that stays open after execution
  • EXPLORE_SELECTORS: Centralized selector constants for explore page
  • Code cleanup and documentation improvements

v2.3.0

Choose a tag to compare

@ShunL12324 ShunL12324 released this 30 Jan 12:13

What's New

Creator Center Tools

  • xhs_get_my_notes: Fetch published notes from creator center and cache to database
  • xhs_query_my_notes: Query cached notes with multi-field filter support (type, level, minLikes, titleContains, etc.)

Enhanced Profile Sync

  • xhs_check_auth_status now retrieves full user profile:
    • Followers (粉丝)
    • Following (关注)
    • Likes & Collects (获赞与收藏)
    • IP Location (IP属地)
    • Ban status (是否封禁)
  • xhs_add_account also syncs full profile on successful login

Developer Features

  • DEBUG environment variable: Set to true for non-headless browser debugging

Database

  • New my_published_notes table for caching creator center notes
  • New MyNotesRepository with upsert, batch operations, and statistics

v2.2.0

Choose a tag to compare

@ShunL12324 ShunL12324 released this 29 Jan 23:02

What's New in v2.2.0

New Features

  • Note Draft System - Create, manage, and publish drafts with xhs_create_draft, xhs_list_drafts, xhs_get_draft, xhs_update_draft, xhs_delete_draft, xhs_publish_draft
  • AI Image Generation - Generate images using Gemini AI with xhs_generate_image (supports style, mood, lighting, aspectRatio)
  • AI Image Understanding - describeImages option in xhs_get_note for AI-powered image analysis
  • Environment Variable Configuration - Support for GEMINI_* environment variables

Architecture Improvements

  • Browser Layer - Refactored to composition pattern (eliminated 58 (this as any) casts)
  • Database Layer - Refactored to repository pattern for cleaner code organization

Other Changes

  • Updated Gemini models to gemini-3 series
  • Documentation improvements
  • Tool rename: xhs_check_loginxhs_check_login_session
  • New tool: xhs_check_auth_status for checking existing sessions

v2.1.0

Choose a tag to compare

@ShunL12324 ShunL12324 released this 29 Jan 17:26

What's Changed

New Features

  • Multi-step login flow: Login now uses a more reliable multi-step process
    • xhs_add_account → returns sessionId and QR code URL
    • xhs_check_login → check status after QR scan
    • xhs_submit_verification → submit SMS code if required

Improvements

  • Extract magic numbers to named constants (TIMEOUTS, SEARCH_DEFAULTS, SCROLL_CONFIG, DELAYS)
  • Replace console.error/log with structured logger module
  • Add Chinese comments throughout codebase for better maintainability
  • Add logger module (core/logger.ts) with file and console output
  • Docs workflow now triggers on release events

Documentation

  • Updated API docs for new login flow
  • Added xhs_submit_verification documentation
  • Updated README with new login steps

v2.0.0

Choose a tag to compare

@ShunL12324 ShunL12324 released this 28 Jan 23:57

v2.0: Multi-account support + SQLite database storage