Commit Graph

68 Commits

Author SHA1 Message Date
allcontributors[bot]
4e29627b99 docs: add laryzhong as a contributor for code (#89)
* docs: update README.md [skip ci]

* docs: update .all-contributorsrc [skip ci]

---------

Co-authored-by: allcontributors[bot] <46447321+allcontributors[bot]@users.noreply.github.com>
2025-09-17 00:21:42 +08:00
allcontributors[bot]
965adf1efb docs: add esperyong as a contributor for code (#88)
* docs: update README.md [skip ci]

* docs: update .all-contributorsrc [skip ci]

---------

Co-authored-by: allcontributors[bot] <46447321+allcontributors[bot]@users.noreply.github.com>
2025-09-17 00:20:36 +08:00
zy
e0ce06fbf0 Update README.md 2025-09-17 00:16:42 +08:00
allcontributors[bot]
f6c8593e15 docs: add xpzouying as a contributor for code, ideas, and 5 more (#87)
* docs: update README.md [skip ci]

* docs: create .all-contributorsrc [skip ci]

---------

Co-authored-by: allcontributors[bot] <46447321+allcontributors[bot]@users.noreply.github.com>
2025-09-17 00:12:09 +08:00
Angiin
2de8634960 Update windows_guide.md (#84)
本文档主要是协助 Windows 用户解决环境变量相关问题,建议 Windows 设备的用户在部署前参考此内容中的步骤。
2025-09-16 15:19:54 +08:00
zy
2690372f48 Update README.md 2025-09-16 12:53:08 +08:00
Duong Tran
73d0ef86ae 📝 docs(readme) [DOCS]: add English version of README (#81)
* 📝 docs(readme) [DOCS]: add English version of README

* 📝 docs(readme) [DOCS]: update platform name to RedNote
2025-09-16 11:48:34 +08:00
zy
3143576cc0 publish tags by arrow down (#80)
使用 arrow down 吧,arrow-right 有时候不能移动到最结尾
2025-09-16 02:12:21 +08:00
Zhongpeng
414dddfc53 Feature/n8n integration (#78)
* feat: add n8n integration examples and workflow templates

- Add comprehensive n8n workflow examples for Xiaohongshu automation
- Include detailed documentation and setup instructions
- Add workflow templates for automatic note publishing to Xiaohongshu
- Include supporting images and visual guides for n8n configuration

* 修改图片路径写法,以适应github显示

---------

Co-authored-by: 钟鹏 <zhongpeng@ng.yn.cn>
Co-authored-by: zy <xpzouying@gmail.com>
2025-09-16 01:58:54 +08:00
zy
49eaabca34 readme: 增加 examples 的索引 (#79) 2025-09-16 01:54:22 +08:00
Zhongpeng
dd2672e2bb feat: add n8n integration examples and workflow templates (#77)
- Add comprehensive n8n workflow examples for Xiaohongshu automation
- Include detailed documentation and setup instructions
- Add workflow templates for automatic note publishing to Xiaohongshu
- Include supporting images and visual guides for n8n configuration

Co-authored-by: 钟鹏 <zhongpeng@ng.yn.cn>
2025-09-16 01:29:39 +08:00
zy
45fa757938 add github codeownder (#76) 2025-09-16 01:15:25 +08:00
zy
ee86f46201 docs: 更新示例说明,添加目录以存放示例内容 (#75) 2025-09-16 00:39:29 +08:00
zy
ff72fe872e docs: 增加 Windows 指南 (#74)
* docs: 增加 Windows 指南

* update contrib
2025-09-16 00:31:21 +08:00
zy
25a1366b69 Update README.md
增加微信群二维码
2025-09-16 00:06:54 +08:00
clearwater
cc10ac9f38 publish_content content description enhance (#72)
Co-authored-by: liuyong <liuyong@tuyoogame.com>
2025-09-15 21:10:42 +08:00
zy
db9962ec24 Update README.md 2025-09-15 19:48:15 +08:00
zy
0c57bd6b0f Update README.md 2025-09-15 19:45:18 +08:00
zy
36c9c5fc51 Update README.md 2025-09-15 10:45:48 +08:00
zy
0dbd6766ac Update README.md 2025-09-15 01:49:31 +08:00
zy
90169ec894 refactor: 优化小红书标签输入逻辑 (#71)
* refactor: 优化小红书标签输入逻辑

- 调整 inputTag 函数以减少延迟时间
- 增加标签联想下拉框的等待时间
- 更新 MustInput 和 MustKeyActions 方法的调用顺序
- 添加错误处理和日志记录以增强稳定性

* update headless_browser version

* downgrade fetchup version

* update publish
2025-09-14 21:47:55 +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
47aba20735 feat: 添加小红书标签功能支持 (#65)
* feat: 实现小红书标签输入和自动关联功能

- 在 PublishImageContent 结构体中添加 Tags 字段
- 实现 inputTags 函数处理多个标签输入
- 实现 inputTag 函数自动点击标签联想下拉框
- 通过 #creator-editor-topic-container 选择器定位标签下拉框
- 自动点击第一个 .item 元素完成标签关联
- 添加错误处理和日志记录

* feat: 为 MCP 和 HTTP API 添加标签(tags)支持

- 在 PublishRequest 结构体中添加 Tags 字段
- 更新 MCP handler 处理标签参数
- 更新 MCP 工具定义,添加 tags 参数说明
- HTTP API 自动支持 tags 字段(通过 PublishRequest)
- 保持向后兼容,tags 为可选参数
2025-09-14 15:06:23 +08:00
zy
cd4e75fa46 Update README.md 2025-09-11 23:42:04 +08:00
zy
0d545a83a4 Update README.md 2025-09-11 23:39:27 +08:00
zy
c2908419c3 docs: 添加Google Gemini CLI集成配置文档 (#54)
- 新增Gemini CLI的MCP服务器配置示例
- 提供基于settings.json的配置方法
- 添加httpUrl配置用于HTTP连接
- 完善Gemini CLI使用说明

解决 #49

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

Co-authored-by: Claude <noreply@anthropic.com>
2025-09-10 01:24:23 +08:00
zy
adabc4ba57 feat: 添加标题长度校验防止小红书API拒绝 (#53)
- 新增go-runewidth依赖用于计算字符显示宽度
- 在PublishContent方法中添加标题长度验证
- 标题超过40个单位时返回"标题长度超过限制"错误
- 中文字符计2个单位,ASCII字符计1个单位
- 确保标题符合小红书API要求:最多20个中文字符或40个ASCII字符

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

Co-authored-by: Claude <noreply@anthropic.com>
2025-09-10 01:07:09 +08:00
zy
f21183fa48 update wait for list feed and get feed details (#52)
更新一下 list-feed,get-feed-detail 行为的等待,
这里可能是 windows 的问题所在
2025-09-10 00:30:31 +08:00
zy
8338252ab5 fix: 修复MCP工具定义与文档描述 (#51)
* docs: 更新README添加评论功能说明

- 新增第6个主要功能:发表评论到帖子
- 添加评论功能的视频演示
- 更新MCP工具列表,包含post_comment_to_feed
- 补充遗漏的get_feed_detail工具
- 更新工具总数从4个到6个

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

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

* fix: 修复MCP工具定义与文档描述不一致问题

修复publish_content工具定义:
- 删除不存在的video参数
- 将images添加到required字段
- 更新标题描述添加字数限制说明
- 修正工具描述为"发布小红书图文内容"

更新README.md文档:
- 修正publish_content参数说明(images必需,不支持video)
- 确保文档与实际MCP工具定义一致

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

Co-authored-by: Claude <noreply@anthropic.com>

---------

Co-authored-by: Claude <noreply@anthropic.com>
2025-09-09 23:43:41 +08:00
zy
cd28e4064e feat: 添加小红书Feed评论功能 (#50)
实现通过HTTP GIN API和MCP API发表评论到小红书Feed的功能:
- 新增POST /api/v1/feeds/comment端点
- 新增post_comment_to_feed MCP工具
- 添加PostCommentRequest和PostCommentResponse类型
- 实现PostCommentToFeed服务方法
- 新增CommentFeedAction用于浏览器自动化操作

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

Co-authored-by: Claude <noreply@anthropic.com>
2025-09-09 23:13:05 +08:00
zy
8fdb461f8f docs: update CLAUDE.md with development guidelines (#46)
- Add requirements for formatting Go source files after modifications
- Specify the need to delete unnecessary scripts and build files generated during testing
- Introduce a branching policy for feature changes
- Establish a rule against pushing to remote without prior approval
- Outline the review process including local and remote PR reviews
2025-09-09 01:11:25 +08:00
zy
cc14518d03 docs: add feed detail feature documentation with video demo
- Add new feature section for getting post details with interactions and comments
- Include important tips about required parameters (feedID and xsec_token)
- Add reminder that login is required for this feature
- Add hint to users about clicking titles to expand video demos
- Include video demonstration link

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

Co-Authored-By: Claude <noreply@anthropic.com>
2025-09-09 01:06:03 +08:00
zy
27575689a6 feat: enhance feed detail functionality with MCP interface improvements (#45)
* feat: add feed detail page functionality with gin and MCP interfaces

Add comprehensive Feed detail page support:
- Create new FeedDetailAction in xiaohongshu/feed_detail.go
- Add HTTP API endpoint POST /api/v1/feeds/detail
- Add MCP tool 'get_feed_detail' for MCP protocol support
- Support feed_id and xsec_token parameters (both required)
- Raw __INITIAL_STATE__ JSON data saved to feed_detail.json
- Return structured data for both HTTP and MCP interfaces

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

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

* feat: enhance feed detail functionality with MCP interface improvements

- Add comprehensive feed detail page support with proper data extraction
- Create dedicated feed_detail.go file for FeedDetailAction
- Optimize Go struct definitions based on actual JSON data analysis
- Remove unnecessary fields from FeedDetail, DetailImageInfo, CommentList, and Comment structs
- Update MCP interface description to reflect comment retrieval capability
- Support both HTTP REST API and MCP protocol interfaces
- Implement proper Vue 3 reactive data extraction from window.__INITIAL_STATE__
- Include feed content, user info, interaction data, and comment lists

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

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

* fix: restore JSON file writing for testing and improve code structure

- Restore feed_detail.json file writing for testing purposes
- Improve error handling by separating marshal and unmarshal steps
- Keep the original data extraction logic for complex Vue reactive data structure

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

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

* refactor: simplify JSON unmarshaling using struct instead of map[string]any

- Replace complex map[string]any extraction with direct struct unmarshaling
- Define inline struct matching the actual JSON response structure
- Remove unnecessary extractFeedDetailData and extractNestedValue methods
- Significantly reduce code complexity and improve readability

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

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

* docs: improve MCP interface descriptions for better usability

- Enhance get_feed_detail parameter descriptions with clear source information
- Clarify publish_content images parameter supports both local paths and URLs
- Improve search_feeds description to specify supported search types
- Keep descriptions concise and practical without over-complication

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

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

* fix: revert search_feeds keyword description to keep it simple

- Remove unnecessary details from keyword description
- Keep interface descriptions concise and clear

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

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

---------

Co-authored-by: Claude <noreply@anthropic.com>
2025-09-09 00:55:24 +08:00
zy
12ba28759f docs: add video demonstrations to main features with collapsible sections (#40)
- Replace plain text feature list with collapsible sections
- Add video demonstrations for all 5 main features:
  * Login and check login status (2 videos)
  * Publish image-text content (1 video)
  * Search content (1 video)
  * Get recommendation list (1 video)
- Merge login and check login status into single feature point
- Organize features in logical usage order
- Maintain clean document structure with expandable video demos

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

Co-authored-by: Claude <noreply@anthropic.com>
2025-09-07 22:59:22 +08:00
zy
6517cc1423 docs: merge MCP_README.md into main README with collapsible sections (#39)
- Consolidate all MCP client integration docs into single README
- Replace simple client list with detailed collapsible sections
- Add enhanced quick start with service verification steps
- Include all tested configurations for Cursor, VSCode, MCP Inspector
- Preserve all demo screenshots and configuration examples
- Remove duplicate MCP_README.md file to reduce maintenance overhead

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

Co-authored-by: Claude <noreply@anthropic.com>
2025-09-07 22:45:38 +08:00
zy
0d66edf55d Merge pull request #34 from xpzouying/update-vscode-mcp
修改 vscode 接入的方式
2025-09-06 21:05:01 +08:00
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