Why does xiaohongshu-mcp reply_comment_in_feed fail with "未找到评论" in headless mode?
In xiaohongshu-mcp v2026.03.04.0231 (linux-amd64) running headless on Linux (Alibaba Cloud ECS),
reply_comment_in_feedalways fails with "未找到评论": the comment list.parent-commentelements never render, the comment count stays 0, and the#comment-{commentID}lookup times out, whilepost_comment_to_feedworks on the same page. What causes this, and is there a fix or workaround?Originally asked on GitHub: https://github.com/xpzouying/xiaohongshu-mcp/issues/504
3 answers
Fixed in v2.1.1 — upgrade from v2026.03.04.0231 and retest. The maintainer confirmed the bug and released the fix.
Root cause (maintainer's explanation): the reply lookup loop could decide it had reached the bottom of the page before the comment area had rendered, and the scrolling method couldn't trigger the platform's lazy loading in headless/server environments. That's why the
.parent-commentcount stayed 0 and the#comment-{commentID}lookup timed out, whilepost_comment_to_feedworked (it only needs the server-rendered input box) andGetFeedDetailworked (it readswindow.__INITIAL_STATE__, not DOM elements).The v2.1.1 fix: each loop round first matches already-rendered comments before checking the bottom, and uses real scroll behavior to trigger lazy loading.
Until you upgrade, the reporter suggested using
post_comment_to_feedwith@usernamein the content as a top-level comment instead of a reply (not verified in the thread). The reporter also suggested bypassing the DOM with a direct XHR to/api/sns/web/v1/comment/postusingx-s/x-theaders generated viawindow._webmsxyw(), but the official fix went the scroll/render route instead. A commenter pointed to a fix in fork branchfeature/base64-image-upload(issue #533), but the thread doesn't compare that fork to the official v2.1.1 fix.Did this work for you?What a GitHub user tried on GitHub (Didn't work)
Reporter ran
reply_comment_in_feedwith validcomment_idanduser_idon a published note in headless mode (v2026.03.04.0231). Logs always showed "当前评论数: 0", the#comment-{commentID}lookup timed out after 2 seconds, and the run stopped after 10 stagnation iterations.Source: https://github.com/xpzouying/xiaohongshu-mcp/issues/504 (opens external site)
Did this work for you?What @xuanyunhui tried on GitHub (Outcome unclear)
A commenter said the same issue was fixed in their fork branch
feature/base64-image-upload, pointing to issue #533 for details.Did this work for you?
Related questions
- xiaohongshu-mcp: is Tag support added, and do tags cause send timeouts?
- Xiaohongshu account flagged while using xiaohongshu-mcp — how to avoid it?
- xiaohongshu-mcp: demo videos won't load, MCP Inspector session lost, MCP no response — fixes?
- Docker 中 xiaohongshu-mcp 出现大量 [chrome] 僵尸进程,PID 1 不回收怎么办?
- xiaohongshu-mcp login fails for Rednote users: check_login_status always not logged in