Answers
Is there a Xiaohongshu MCP server that doesn't need a QR code login?
Short answer
Yes. The okdata MCP server reads public Xiaohongshu data with an API key and no Xiaohongshu account, so there is no QR code to scan and no session that expires overnight. A note search costs $0.02 for about 20 notes, a full note $0.02 and a page of comments $0.02.
Yes, if your agent only needs to read. The open-source Xiaohongshu MCP servers drive a real browser that is logged into your own account, so the agent stops whenever that session ends: after a restart, after a device check, or simply after a few days. A research job that runs at 3 a.m. has nobody to scan the code. The okdata MCP server works on an API key instead. Your agent asks for data, we read the public pages, and nothing is tied to a Xiaohongshu account of yours.
What the agent can read
- Xiaohongshu note search: notes for a keyword, sorted by relevance, newest or most popular, filtered to video or image notes.
- Xiaohongshu note detail: the full text, every image or the video, likes, saves and comment count. It takes a note ID or a link, including xhslink.com share links.
- Xiaohongshu note comments: comments with likes and reply counts, about 10 per page.
- Creator profiles, a creator's notes and the hot topics list are on the Xiaohongshu API page.
It cannot post, comment, like or open your drafts and messages. Anything that acts as you needs your login.
What a session costs
The find and describe tools are free. Only call is billed, at the price describe shows, and failed calls cost nothing.
| Task | Calls | Cost |
|---|---|---|
| One keyword, 3 pages of results (about 60 notes) | 3 | $0.06 |
| Read 10 of those notes in full | 10 | $0.20 |
| Two pages of comments on 5 notes | 10 | $0.20 |
| All of the above | 23 | {{cost:xiaohongshu.notes.search3+xiaohongshu.notes.get10+xiaohongshu.notes.comments.list*10}} |
Connect it
For Claude Code, put this in .mcp.json and keep the key in the OKDATA_API_KEY environment variable. Cursor, Cline, Claude Desktop and others are on the MCP page.
{
"mcpServers": {
"okdata": {
"type": "http",
"url": "https://api.okdata.online/mcp",
"headers": { "Authorization": "Bearer ${OKDATA_API_KEY}" }
}
}
}
To check the key before the agent uses it, run one search by hand:
curl -G "https://api.okdata.online/v1/xiaohongshu/notes/search" \
-H "Authorization: Bearer $OKDATA_API_KEY" \
--data-urlencode "query=露营装备" -d sort=latest
Limits worth knowing
- Xiaohongshu does not show view counts, so
metrics.viewsis null andmeta.unavailablesays why. - Each page is a separate charge. Tell the agent how many pages it may read before it starts.
- Only public notes come back. A deleted or private note returns
not_foundand is not charged.
When the open-source MCP is the better choice
xiaohongshu-mcp is free and can publish notes and reply to comments as you. If the agent has to act as your account, that is the right tool, and the QR login is part of the deal. If it only reads and has to run unattended, an API key is less work. For bulk crawls you control end to end, MediaCrawler is another free option that also logs in with your account. More reading-only use cases are on the content research page.
Updated