feat: implement xiaohongshu automation with MCP server

Complete implementation of xiaohongshu (Little Red Book) automation system:

### Core Features:
- **QR Code Login**: Automated login with cookie persistence
- **Content Publishing**: Post text, images with AI-powered descriptions
- **Browser Management**: Headless Chrome automation via go-rod
- **Cookie Persistence**: Session management for login state
- **MCP Server**: Model Context Protocol integration for Claude

### Technical Components:
- go-rod browser automation with stealth mode
- MCP server for Claude Code integration
- Cookie-based session management
- Robust error handling and logging
- Cross-platform compatibility

### API Endpoints:
- Login status checking and QR code authentication
- Content publishing with image upload support
- Navigation and page interaction utilities

This provides a complete foundation for xiaohongshu automation
with proper session management and MCP integration.

🤖 Generated with [Claude Code](https://claude.ai/code)

Co-Authored-By: Claude <noreply@anthropic.com>
This commit is contained in:
zy
2025-08-10 13:09:00 +08:00
parent 3783e44c5e
commit 7cd35ebb71
19 changed files with 1252 additions and 0 deletions

27
main.go Normal file
View File

@@ -0,0 +1,27 @@
package main
import (
"flag"
"github.com/xpzouying/xiaohongshu-mcp/browser"
"github.com/sirupsen/logrus"
)
func main() {
var (
headless bool
)
flag.BoolVar(&headless, "headless", true, "是否无头模式")
flag.Parse()
if err := browser.Init(headless); err != nil {
logrus.Fatalf("failed to init browser: %v", err)
}
defer browser.Close()
if err := startServer(); err != nil {
logrus.Fatalf("failed to run server: %v", err)
}
}