Commit Graph

6 Commits

Author SHA1 Message Date
zy
53ea832773 refactor: 迁移到官方 MCP SDK (#167)
- 添加官方 SDK 依赖 github.com/modelcontextprotocol/go-sdk v0.7.0
- 新增 mcp_server.go 使用官方 SDK 注册 8 个 MCP 工具
- 删除自实现的 streamable_http.go(约 400 行)
- 更新 routes.go 使用 mcp.NewStreamableHTTPHandler
- 优化服务器优雅关闭逻辑(5秒超时 + 警告日志)
- 清理 types.go 中的 JSON-RPC 相关类型

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

Co-authored-by: Claude <noreply@anthropic.com>
2025-09-27 01:44:02 +08:00
lmxdawn
a8a2743a51 feat: 支持返回登录二维码与 Docker 部署 (#155)
* feat: 支持返回登录二维码与 Docker 部署

* feat: 完善扫码登录功能

* fix: 修复当存在已经登录的情况,上层还会启动 goroutine的问题,并把 mcp 的返回增加为图片格式
2025-09-25 19:44:01 +08:00
zy
e4745d28d4 feat: 添加 Chrome 浏览器支持和安装说明折叠 (#67)
* feat: 添加 Chrome 浏览器支持和安装说明折叠

- 支持 Chrome 浏览器作为备选方案
- README 安装部分使用 details 标签折叠
- 优化浏览器配置和初始化逻辑

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

Co-Authored-By: Claude <noreply@anthropic.com>

* docs: 更新 README.md 以包含 Windows 问题和登录部分说明

- 添加 Windows 问题的链接以供参考
- 更新 README 中的登录部分内容

---------

Co-authored-by: Claude <noreply@anthropic.com>
2025-09-14 17:49:19 +08:00
zy
a7e975cf7c refactor: 重构代码架构,解耦处理器和服务 (#13)
重大架构改进:
- 移除全局变量 xiaohongshuService,改用依赖注入
- 将代码按职责分离到不同文件:
  * app_server.go - 核心服务器结构
  * types.go - 统一类型定义
  * routes.go - 路由配置
  * middleware.go - 中间件
  * handlers_api.go - REST API 处理器
  * handlers_mcp.go - MCP 协议处理器
- 将通用工具函数从 AppServer 方法改为独立函数
- 删除未使用的类型定义(LoginWaitRequest)
- 修复 JSON 编码错误处理

优势:
 更好的依赖注入模式
 清晰的职责分离
 提高代码可测试性
 符合 Go 最佳实践
 降低耦合度,提高内聚性

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

Co-authored-by: Claude <noreply@anthropic.com>
2025-08-17 16:15:54 +08:00
zy
0e4450b12c refactor: 改进浏览器实例管理,按需创建浏览器实例 (#12)
- 移除全局浏览器单例,改为按需创建浏览器实例
- 添加 configs/browser.go 用于管理无头模式配置
- 更新 service.go 中所有方法,每次调用时创建新的浏览器实例
- 更新测试文件,使用新的浏览器管理方式
- 确保每个浏览器实例使用后正确关闭,避免资源泄漏

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

Co-authored-by: Claude <noreply@anthropic.com>
2025-08-17 15:30:16 +08:00
zy
7cd35ebb71 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>
2025-08-10 13:09:00 +08:00