docs
One tool. One endpoint.
Both surfaces run the same code, so they return the same thing. Send share links exactly as you copied them — tracking parameters and xsec_token are handled.
mcp
Claude Code
claude mcp add --transport http linkdigest \ https://linkdigest.dev/mcp \ --header "Authorization: Bearer ld_live_..."
That registers one tool, digest_url(url, format). The agent calls it by itself whenever it meets a social link it cannot open, so you do not need to mention LinkDigest in your prompt.
Cursor
Add this to ~/.cursor/mcp.json:
{
"mcpServers": {
"linkdigest": {
"url": "https://linkdigest.dev/mcp",
"headers": { "Authorization": "Bearer ld_live_..." }
}
}
}rest
POST /api/v1/digest
curl -X POST https://linkdigest.dev/api/v1/digest \
-H "Authorization: Bearer ld_live_..." \
-H "Content-Type: application/json" \
-d '{"url": "https://www.xiaohongshu.com/discovery/item/...", "format": "json"}'format is json (default) or markdown.
Response fields
| field | meaning |
|---|---|
| platform | Which site the link resolved to. |
| author | Post author's display name. |
| title | Post title, in its original language. |
| posted_at | Publication date, YYYY-MM-DD. |
| caption | The post's own caption or description text. |
| transcript | Array of { t, text } — seconds and speech. Empty when the post has no speech. |
| ocr_text | Text visible on screen: burned-in captions, UI labels, slide text. |
| images | Array of { description, ocr } — one entry per image on image posts. |
| key_points | The substantive takeaways, in the post's original language. |
| raw_markdown | The whole digest pre-rendered as Markdown. |
| transcript_source | native_captions, asr, or none — how the transcript was obtained. |
| degraded | Anything that did not work fully, in plain words. Empty on a clean run. |
Status codes
| code | meaning |
|---|---|
| 401 | Missing or revoked API key. |
| 422 | The link could not be fetched — blocked, removed, or login-walled. |
| 429 | Plan allowance used up. Cached links never count. |
| 502 | The digest engine failed. Safe to retry. |
| 504 | The media took too long to process. |