How do I log in to xiaohongshu-mcp on Linux or a headless server?
On Linux, the README quick-start for xiaohongshu-mcp (xpzouying/xiaohongshu-mcp) doesn't explain how login works, and the original reporter found it too unclear to proceed. No version or error message was given; the problem is purely a documentation gap. What is the actual login flow, and is there a way to log in on a server without a graphical desktop?
Originally asked on GitHub: https://github.com/xpzouying/xiaohongshu-mcp/issues/333
3 answers
Status: explained — the issue was closed as not planned, but the maintainer replied with the full login flow, so the question is effectively answered.
Login is a two-step process:
- Run the login binary
xiaohongshu-login-linux-amd64once. It opens a browser for QR-code login; after you authenticate, the cookies are saved to disk. - Start the main server with
xiaohongshu-mcp-linux-amd64. The MCP endpoint runs athttp://localhost:18060/mcp.
If the machine has no GUI (headless server), the maintainer says you can skip the separate login binary: start the main program and call the
get_login_qrcodetool to obtain a QR code to authenticate with.The maintainer also pointed to issue #31, which contains a video walkthrough, and noted that the README's "1.1 快速开始" section has been supplemented — re-read it if you got stuck on the older text. One commenter posted a screenshot image in this thread, but the image content was not described. The maintainer welcomed PRs to improve the documentation.
General advice: the cookies written to disk are credentials for your Xiaohongshu account, so keep that cookie file private and don't commit it to a repository.
Did this work for you?- Run the login binary
What @xpzouying tried on GitHub (Outcome unclear)
The maintainer explained that login has two steps: run
xiaohongshu-login-linux-amd64to get a browser QR-code login and save cookies to disk, then startxiaohongshu-mcp-linux-amd64(serving at http://localhost:18060/mcp). For headless servers he suggested starting the main program and callingget_login_qrcode.Did this work for you?What @ASDHSD tried on GitHub (Outcome unclear)
A commenter posted a screenshot image (mmexport1765791023063.png), presumably showing the login flow, but the image content was not described in text.
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