npm package discovery and stats viewer.

Discover Tips

  • General search

    [free text search, go nuts!]

  • Package details

    pkg:[package-name]

  • User packages

    @[username]

Sponsor

Optimize Toolset

I’ve always been into building performant and accessible sites, but lately I’ve been taking it extremely seriously. So much so that I’ve been building a tool to help me optimize and monitor the sites that I build to make sure that I’m making an attempt to offer the best experience to those who visit them. If you’re into performant, accessible and SEO friendly sites, you might like it too! You can check it out at Optimize Toolset.

About

Hi, 👋, I’m Ryan Hefner  and I built this site for me, and you! The goal of this site was to provide an easy way for me to check the stats on my npm packages, both for prioritizing issues and updates, and to give me a little kick in the pants to keep up on stuff.

As I was building it, I realized that I was actually using the tool to build the tool, and figured I might as well put this out there and hopefully others will find it to be a fast and useful way to search and browse npm packages as I have.

If you’re interested in other things I’m working on, follow me on Twitter or check out the open source projects I’ve been publishing on GitHub.

I am also working on a Twitter bot for this site to tweet the most popular, newest, random packages from npm. Please follow that account now and it will start sending out packages soon–ish.

Open Software & Tools

This site wouldn’t be possible without the immense generosity and tireless efforts from the people who make contributions to the world and share their work via open source initiatives. Thank you 🙏

© 2026 – Pkg Stats / Ryan Hefner

@sykuang/rednote-mcp

v1.1.0

Published

Xiaohongshu (rednote / 小红书) MCP server for Claude Desktop, Cursor and AI agents — search, read, comment, like and publish notes via npx. Node.js + Playwright port of xiaohongshu-mcp.

Readme

rednote-mcp — Xiaohongshu (小红书 / REDNOTE) MCP server (Node.js)

npm

繁體中文 | English

小紅書 / rednote / REDNOTE MCP server,讓 Claude Desktop、Cursor、Codex 等 MCP/AI agent 透過自然語言搜尋、瀏覽、留言、按讚與發布筆記。

本專案為 xpzouying/xiaohongshu-mcp(Go 版,目標中國站 xiaohongshu.com)的 Node.js + TypeScript + Playwright 海外版(rednote.com)port,可直接 npx 安裝使用,無需自行編譯。

關鍵字:xiaohongshu mcp · rednote mcp · 小红书 mcp · xiaohongshu-mcp · Claude Desktop · Cursor · AI agent · MCP server

功能

提供 13 個 MCP 工具:

| Tool | 說明 | |------|------| | check_login_status | 檢查登入狀態 | | get_login_qrcode | 取得登入二維碼 | | delete_cookies | 刪除 cookies 重置登入 | | list_feeds | 取得首頁 feeds | | search_feeds | 搜尋筆記(含篩選) | | get_feed_detail | 取得筆記詳情 + 評論 | | user_profile | 取得用戶主頁 | | post_comment_to_feed | 發表評論 | | reply_comment_in_feed | 回覆評論 | | like_feed / favorite_feed | 點讚 / 收藏 | | publish_content | 發佈圖文 | | publish_with_video | 發佈視頻 |

同時提供 HTTP API(/api/v1/*)與 MCP Streamable HTTP(/mcp)。

安裝

方式 1:直接用 npx(推薦)

# stdio 模式 (給 MCP client)
npx -y @sykuang/rednote-mcp --stdio

# HTTP 模式
npx -y @sykuang/rednote-mcp --port :18060

# 查所有選項
npx -y @sykuang/rednote-mcp --help

首次執行會自動下載 Chromium(~170MB,一次性)。

Claude Desktop / Cursor 設定範例

{
  "mcpServers": {
    "rednote": {
      "command": "npx",
      "args": ["-y", "@sykuang/rednote-mcp", "--stdio"]
    }
  }
}

方式 2:全域安裝

npm install -g @sykuang/rednote-mcp
rednote-mcp --stdio

方式 3:從原始碼

git clone https://github.com/sykuang/rednote-mcp.git
cd rednote-mcp
npm install
npm run build
node dist/main.js --stdio

啟動

HTTP 模式(預設 :18060):

npx @sykuang/rednote-mcp --port :18060
# 或從原始碼: node dist/main.js --port :18060

stdio 模式(給 Claude Desktop / Cursor 等 MCP client):

npx @sykuang/rednote-mcp --stdio
# 或
MCP_STDIO=1 node dist/main.js

CLI flags:

  • --headless true/false(預設 true)
  • --bin /path/to/chromium(也可用 ROD_BROWSER_BIN env)
  • --port :18060
  • --stdio

環境變數:

  • MCP_STDIO=1 啟用 stdio
  • ROD_BROWSER_BIN 指定 Chromium 路徑
  • COOKIES_PATH 指定 cookies 檔路徑(預設先看 /tmp/cookies.json,否則 ./cookies.json
  • XHS_PROXY HTTP/HTTPS 代理

開發

npm run dev          # tsx 直接跑
npm run build        # 編譯到 dist/
npm run format       # prettier
npm run lint         # tsc --noEmit

Docker

使用預編譯 image (GHCR)

# 直接 docker run
docker run -d --name rednote-mcp \
  -p 18060:18060 \
  -v $(pwd)/cookies.json:/app/cookies.json \
  --shm-size=1g \
  ghcr.io/sykuang/rednote-mcp:latest

docker compose

# 取得 cookies.json 後 (參考下方登入流程), 直接啟動
docker compose up -d
docker compose logs -f

docker-compose.yml 已包含:

  • 使用 GHCR 預編譯 image (ghcr.io/sykuang/rednote-mcp:latest)
  • cookies.json 持久化 mount
  • shm_size: 1gb(瀏覽器子程序需要)

從原始碼 build

docker build -t rednote-mcp-node .
docker run -p 18060:18060 -v $(pwd)/cookies.json:/app/cookies.json rednote-mcp-node

與 Go 版本差異

本專案為 xpzouying/xiaohongshu-mcp(小紅書中國站,Go 實作)的海外版(REDNOTE)port

  • 目標站點不同:原版針對 xiaohongshu.com(中國站),本專案針對 rednote.com(海外站)
  • 實作語言:Go → Node.js / TypeScript(方便 npx 安裝、跨平台無需編譯)
  • Playwright 取代 go-rod;XHR 攔截改用 page.on('response'),比 CDP 更簡單
  • HTTP 框架用 Fastify 取代 Gin
  • MCP 用官方 @modelcontextprotocol/sdk
  • 業務邏輯、API 端點、MCP 工具 schema 與原版完全對齊