Releases: ShunL12324/xhs-mcp
Releases · ShunL12324/xhs-mcp
Release list
v2.7.0
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
What's New
🎨 Image Processor with LangGraph Workflow
- New AI-powered image processing pipeline for creating Xiaohongshu-style content
xhs_create_draftnow acceptsscreenshotsparameter and auto-generates beautiful images- Multi-phase workflow: analyze → layout → process → beautify → quality check
- Quality check with
suggestedOrderfor automatic image reordering
🤖 Explore AI Enhancements
- New
like-targetprompt 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_imagetool (replaced by integrated workflow)
Breaking Changes
xhs_create_draftparameter changed fromimagestoscreenshotsxhs_generate_imagetool removed (use integratedxhs_create_draftinstead)
v2.5.0
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
deduplicateparameter) - 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
DEBUGenvironment 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
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=truefor non-headless browser that stays open after execution - EXPLORE_SELECTORS: Centralized selector constants for explore page
- Code cleanup and documentation improvements
v2.3.0
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
truefor non-headless browser debugging
Database
- New
my_published_notestable for caching creator center notes - New
MyNotesRepositorywith upsert, batch operations, and statistics
v2.2.0
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 -
describeImagesoption inxhs_get_notefor 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_login→xhs_check_login_session - New tool:
xhs_check_auth_statusfor checking existing sessions
v2.1.0
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 URLxhs_check_login→ check status after QR scanxhs_submit_verification→ submit SMS code if required
Improvements
- Extract magic numbers to named constants (
TIMEOUTS,SEARCH_DEFAULTS,SCROLL_CONFIG,DELAYS) - Replace
console.error/logwith 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_verificationdocumentation - Updated README with new login steps
v2.0.0
v2.0: Multi-account support + SQLite database storage