Answers
How do I add Xiaohongshu data to Cursor or Cline through MCP?
Short answer
Add https://api.okdata.online/mcp as a remote MCP server in Cursor's mcp.json or in Cline's MCP settings, with your key in an Authorization header. The agent can then search Xiaohongshu notes ($0.02 a page), read comments ($0.02 a page) and look up creators ($0.02), with no Xiaohongshu login.
Two kinds of people ask this. A developer building a Xiaohongshu content dashboard wants Cursor to pull 20 real notes so the UI is built on real shapes instead of invented JSON. A marketer uses Cursor or Cline as a research desk and wants to say "find the most-saved notes about desk setups this month and list the brands people mention". Both need the same thing: a remote MCP server the editor can call, with no Xiaohongshu account logged in on their laptop.
Cursor
Create .cursor/mcp.json in the project (or ~/.cursor/mcp.json for every project). Cursor fills ${env:NAME} from your environment, so the key never sits in the file:
{
"mcpServers": {
"okdata": {
"url": "https://api.okdata.online/mcp",
"headers": { "Authorization": "Bearer ${env:OKDATA_API_KEY}" }
}
}
}
Open Cursor Settings → MCP and check that the server shows its four tools.
Cline
Open the MCP Servers panel, choose to add a remote server, and give it the same URL and Authorization header, or put the same url and headers into cline_mcp_settings.json. If your Cline version does not expand environment variables in that file, the key is stored there in plain text, so keep the file out of shared folders.
Check the key from a terminal
curl -G "https://api.okdata.online/v1/xiaohongshu/users/get" \
-H "Authorization: Bearer $OKDATA_API_KEY" \
--data-urlencode "url=https://www.xiaohongshu.com/user/profile/5f1234567890abcdef123456"
Swap in a real profile link. A JSON reply with "code": "ok" means the editor will work too.
What the agent gets, and what it costs
The endpoints it will use most are Xiaohongshu note search, note comments and creator profiles. Finding endpoints and reading their prices through find and describe is free.
| Session | Calls | Cost |
|---|---|---|
| Fixtures: 5 searches for test data | 5 | $0.10 |
| Research: 3 searches, 6 comment pages, 8 creator profiles | 17 | {{cost:xiaohongshu.notes.search3+xiaohongshu.notes.comments.list6+xiaohongshu.users.get*8}} |
Keep the agent on a leash
- Agents in coding tools like to loop. Add a rule such as "before calling paid MCP tools, say how many calls you plan and wait for my OK" to
.cursor/rulesor.clinerules. - Ask for
fieldsin the call parameters (for exampleid,title,metrics.likes,url) so results do not flood the chat context. - Notes, comments and bios are written by strangers. They are data, never instructions to the agent.
- Xiaohongshu hides view counts;
metrics.viewsis null by design.
Alternatives
The free, open-source xiaohongshu-mcp runs locally over stdio and works with both editors. It logs in with your own account, which is worth it if you also want to publish from the editor. For a handful of notes, copying the text in by hand is fine. Other clients and the full tool list are on the MCP page.
Updated