Commit Graph

32 Commits

Author SHA1 Message Date
zy
f7ce2a7b16 修改 vscode 接入的方式
vscode 接入的方式,更换成新的 StreamHTTP 的方式
2025-09-06 21:04:37 +08:00
zy
8c68283edb Merge pull request #33 from xpzouying/fix-mcp-cursor-integration
Fix MCP Cursor integration with Streamable HTTP protocol
2025-09-06 20:31:49 +08:00
zy
9b086c162e fix: implement MCP Streamable HTTP protocol for Cursor integration
- Replace basic JSON-RPC implementation with Streamable HTTP protocol
- Add support for GET (SSE) and POST (JSON-RPC) requests
- Update protocol version from 2024-11-05 to 2025-03-26
- Fix list_feeds tool definition to match actual API (remove unused page/pageSize params)
- Add ping method support for MCP Inspector
- Update Cursor configuration to use url field instead of curl command
- Add comprehensive MCP integration documentation

Fixes #32

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

Co-Authored-By: Claude <noreply@anthropic.com>
2025-09-06 19:26:05 +08:00
zy
62b87f82d2 Update README.md 2025-09-05 01:44:25 +08:00
zy
0d64bd5e85 Update README.md 2025-09-05 01:30:59 +08:00
zy
ad500c3360 chore: 更新用户名常量为小红书的配置
- 将用户名常量从 "xpzouying" 修改为 "xiaohongshu-mcp" 以反映最新的配置要求
2025-08-31 15:56:01 +08:00
zy
aa09687751 feat: 添加搜索功能 (#16)
- 新增 SearchFeeds 服务方法,支持关键词搜索小红书内容
- 添加 search_feeds MCP 工具,提供搜索接口
- 新增 /api/v1/feeds/search API 端点
- 实现搜索页面的浏览器自动化操作
- 优化 MCP 协议支持,处理 notifications/initialized 和 notifications/cancelled 通知
- 更新文档,添加搜索功能说明和使用示例
- 重构类型定义,优化数据结构

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

Co-authored-by: Claude <noreply@anthropic.com>
2025-08-17 23:35:22 +08:00
zy
a0a063d418 fix: 修复 settings.local.json 文件中的配置项格式
- 更新配置项,确保 JSON 格式正确
- 添加新的浏览器导航和点击操作支持

🤖 Generated with [Claude Code](https://claude.ai/code)
2025-08-17 16:57:04 +08:00
zy
b64b241651 docs: 更新 MCP_README.md,增强 Claude Desktop 和 Cursor 的配置说明 (#15)
- 📝 修改 Claude Desktop 的 MCP 服务器配置示例,更新为使用 curl 命令
-  为 Cursor 添加项目级和全局配置示例,提升文档清晰度
- 🔧 更新相关图片文件,确保文档内容一致性

支持的 MCP 客户端:
 Claude Code CLI
 Claude Desktop
 Cursor
 VSCode
 MCP Inspector

🤖 Generated with [Claude Code](https://claude.ai/code)
2025-08-17 16:55:07 +08:00
zy
1ddc87349e docs: 完善 MCP 服务接入文档,新增 VSCode 配置支持 (#14)
文档改进:
- 📝 重构 MCP_README.md,使文档更加简洁实用
-  新增 VSCode 的 MCP 配置示例和说明
- 🔧 提供多种配置方式:全局设置和工作区设置
- 📚 更新主 README.md,添加 VSCode 到支持的客户端列表
- 🎯 优化文档结构,提升用户体验

支持的 MCP 客户端:
 Claude Code CLI
 Claude Desktop
 Cursor
 VSCode (新增)
 MCP Inspector

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

Co-authored-by: Claude <noreply@anthropic.com>
2025-08-17 16:33:08 +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
cfaee894f5 docs: 更新 README 文件,添加无头模式和非无头模式的运行示例 2025-08-17 15:06:50 +08:00
zy
86224dcaa3 update find content element (#10)
- Updated the getContentElement function to utilize the Race method for improved efficiency in finding content elements.
- Added error handling for cases where no elements are found, ensuring better logging and debugging capabilities.
2025-08-13 02:34:50 +08:00
zy
2312b76293 Merge pull request #9 from xpzouying/fix-star-history
fix: 更正 Star History 为官方格式
2025-08-12 01:40:29 +08:00
zy
93e424e09e fix: 更正 Star History 为官方格式
- 修正 type 参数从 Date 改为 Timeline
- 修正域名从 star-history.com 改为 www.star-history.com
- 使用官方推荐的正确格式

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

Co-Authored-By: Claude <noreply@anthropic.com>
2025-08-12 01:39:56 +08:00
zy
2fc66fc408 Merge pull request #8 from xpzouying/add-star-history
docs: 添加 Star History 图表
2025-08-12 01:38:51 +08:00
zy
8d5b773cb3 docs: 添加 Star History 图表
- 在 README 底部添加 Star History 图表
- 展示项目 star 增长趋势
- 使用 star-history.com 服务自动生成图表

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

Co-Authored-By: Claude <noreply@anthropic.com>
2025-08-12 01:38:02 +08:00
zy
3026e1347a Merge pull request #7 from xpzouying/optimize-readme-images
docs: 优化README中的图片显示尺寸
2025-08-12 01:34:55 +08:00
zy
8e6798393c docs: 优化README中的图片显示尺寸
- 将发布结果截图从原始尺寸(1170x3941)限制为宽度400px
- 使用HTML img标签替代Markdown语法以控制显示大小
- 改善GitHub上的阅读体验

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

Co-Authored-By: Claude <noreply@anthropic.com>
2025-08-12 01:34:02 +08:00
zy
4ae05ee130 Merge pull request #6 from xpzouying/get-feeds-list
feat: 添加获取小红书首页 Feeds 列表功能
2025-08-12 01:27:07 +08:00
zy
3b892b805a docs: 更新 README 文件,添加小红书使用步骤和待办事项 2025-08-12 01:25:45 +08:00
zy
aee7b321d3 feat: 添加获取小红书首页 Feeds 列表的 HTTP 和 MCP 接口
- 在 service.go 中添加 ListFeeds 业务逻辑,复用 xiaohongshu 包功能
- 添加 HTTP 接口 GET /api/v1/feeds/list
- 添加 MCP tool: list_feeds,支持通过 MCP 协议获取 Feeds
- 返回结构化的 Feeds 数据,包含列表和数量统计
- 更新 .gitignore 忽略构建产物和测试脚本
- 更新项目配置,添加 chmod 权限

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

Co-Authored-By: Claude <noreply@anthropic.com>
2025-08-12 01:22:19 +08:00
zy
bfa830026c chore: 更新项目配置
- 添加 gofmt 和 goimports 自动审批权限
- 添加 CLAUDE.md 项目指导文件,要求格式化 Go 源码

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

Co-Authored-By: Claude <noreply@anthropic.com>
2025-08-12 01:12:15 +08:00
zy
108da414fd feat: 实现获取小红书首页 Feed 列表功能
- 添加 FeedsListAction 用于获取页面 window.__INITIAL_STATE__ 数据
- 定义完整的 Feed 数据结构,包含笔记、视频、用户信息等
- 实现 GetFeedsList 方法解析并返回 Feed 列表
- 添加单元测试验证数据获取和 JSON 序列化

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

Co-Authored-By: Claude <noreply@anthropic.com>
2025-08-12 01:11:27 +08:00
zy
e156592d34 增加上传图片后,更多的等待时间 (#5)
FIX: #1
2025-08-11 23:15:50 +08:00
zy
5f8d6e174f update docs 2025-08-10 17:20:36 +08:00
zy
2170c58086 Update README with new examples and enhance binary assets for publishing features (#3) 2025-08-10 17:16:05 +08:00
zy
6ff3ca70b3 update video and images (#2)
* update image path

* add gif
2025-08-10 16:12:13 +08:00
zy
58faab15c4 mcp: add image url support (#1)
* refactor: remove redundant validation in service and clean up code

- Remove validatePublishRequest function as gin binding already handles validation
- Remove unused errors import
- Simplify PublishContent method by relying on gin's built-in validation
- Add comprehensive image processing support with URL download capability

* 添加 MCP 说明文档,完善教程
2025-08-10 15:44:15 +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
zy
3783e44c5e Initial commit 2025-08-03 17:08:45 +08:00