1. Conduid
  2. Developer Tools
  3. Xhs MCP
MCP server · Developer Tools

Xhs MCP

小红书MCP服务 x-s x-t js逆向

Unclaimed xhsmcpdevtools
66Good

Scored 5 days ago · breakdown

About Xhs MCP

Xhs MCP is an MCP server published by jobsonlook in the Developer Tools category: 小红书MCP服务 x-s x-t js逆向.

The repository has 516 stars and 105 forks, with the last commit a month ago. Recent commit activity is the strongest signal that reported issues will get attention.

Install

From source
git clone https://github.com/jobsonlook/xhs-mcp

This server has no ConduID identity, so agent calls to it are not receipted. Pin the version you install and review the source before granting it credentials.

Ask AI

✦

Ask AI about Xhs MCP

Powered by Claude · Grounded in docs

I know everything about Xhs MCP. Ask me about installation, configuration, usage, or troubleshooting.

Security checks

Static checks derived from the repository 4 days ago. Heuristics on the source, not an audit.

  • ✓README presentThe repository ships documentation.
  • !License declaredNo license file. Legally you have no right to use it in a product.
  • ✓Tests presentA test suite exists in the repository.
  • ✓Dependencies pinnedA lockfile pins dependency versions.
  • !No dynamic code executionSource scan found eval or shell execution. Review how tool inputs reach it before granting credentials.
  • !Scoped permissionsDoesn't declare a permission scope. Assume it can do anything its process can.

README

小红书MCP服务

smithery badge PyPI version

一个用于小红书API的MCP(Model Context Protocol)服务器,支持搜索笔记、获取内容、查看评论和发表评论等功能。

特点

  • 采用js逆向出x-s,x-t,直接请求http接口,无须笨重的playwright
  • 搜索笔记
  • 获取笔记内容
  • 获取笔记的评论
  • 发表评论

特性

快速开始

方法一:使用uvx(推荐)

1. 环境要求

  • Python 3.12+
  • uv (安装方法: pip install uv)

2. 获取小红书的cookie

打开web小红书 登录后,获取cookie,将cookie配置到下一步的 XHS_COOKIE 环境变量中 cookie

3. 配置MCP服务器

在你的MCP客户端配置文件中添加以下配置:

{
    "mcpServers": {
        "xhs-mcp": {
            "command": "uvx",
            "args": [
                "--from",
                "jobson-xhs-mcp",
                "xhs-mcp"
            ],
            "env": {
                "XHS_COOKIE": "你的小红书cookie"
            }
        }
    }
}

4. 测试运行

# 设置环境变量
export XHS_COOKIE="你的小红书cookie"

# 直接运行测试
uvx --from jobson-xhs-mcp xhs-mcp --help

方法二:从源码安装

1. 环境要求

  • node
  • python 3.12
  • uv (pip install uv)

2. 克隆并安装

git clone git@github.com:jobsonlook/xhs-mcp.git
cd xhs-mcp
uv sync

3. 获取小红书的cookie

打开web小红书 登录后,获取cookie,将cookie配置到下一步的 XHS_COOKIE 环境变量中 cookie

4. 配置MCP服务器

{
    "mcpServers": {
        "xhs-mcp": {
            "command": "uv",
            "args": [
                "--directory",
                "/path/to/xhs-mcp",
                "run",
                "xhs_mcp/__main__.py"
            ],
            "env": {
                "XHS_COOKIE": "你的小红书cookie"
            }
        }
    }
}

可用工具

本MCP服务器提供以下工具:

  • check_cookie() - 检测cookie是否失效
  • home_feed() - 获取首页推荐笔记
  • search_notes(keywords) - 根据关键词搜索笔记
  • get_note_content(url) - 获取笔记内容(需要带xsec_token的完整URL)
  • get_note_comments(url) - 获取笔记评论(需要带xsec_token的完整URL)
  • post_comment(comment, note_id) - 发布评论到指定笔记

使用示例

在Claude Desktop中使用

  1. 打开Claude Desktop的设置
  2. 找到MCP服务器配置
  3. 添加上述JSON配置
  4. 重启Claude Desktop
  5. 现在你可以在对话中使用小红书相关功能了

常见问题

Q: Cookie如何获取? A: 在浏览器中登录小红书网页版,打开开发者工具,在Network标签页中找到任意请求,复制Cookie头的值。

Q: 为什么提示cookie失效? A: 小红书的cookie有时效性,需要定期更新。重新登录网页版获取新的cookie即可。

Q: uvx命令找不到? A: 请先安装uv:pip install uv,然后确保PATH环境变量包含uv的安装路径。

免责声明

本项目仅用于学习交流,禁止用于其他用途,任何涉及商业盈利目的均不得使用,否则风险自负。

README fetched from the repository 4 days ago. The original is authoritative.

Questions

About Xhs MCP

How do I install Xhs MCP?

No package has been published for this server, so install it from source: clone the repository and follow its README.

Is Xhs MCP safe to use with an AI agent?

Its trust score is 66 out of 100 (good). It passes 3 of the 6 static security checks run so far; the failures are listed above. It has no ConduID identity yet, so agent calls to it are not receipted.

Is Xhs MCP still maintained?

Yes — the last commit was a month ago. The repository has 516 stars and 105 forks and 15 open issues.