FastMCP Python implementation for xiaohongshu-mcp
Project description
xiaohongshu-fastmcp
Python + FastMCP implementation of xiaohongshu-mcp with the same MCP tool surface.
Goals
- Keep MCP tool names and arguments aligned with the Go server
- Keep transport compatible at
http://localhost:18060/mcp - Migrate in small batches while preserving behavior contracts
Prerequisites
- Python 3.11+
- Chrome/Chromium installed
- Playwright browser runtime:
pip install -e .
playwright install chromium
Run
xiaohongshu-fastmcp --port 18060 --headless
or:
python -m xiaohongshu_fastmcp.server --port 18060 --headless
Run as stdio MCP server (for clients configured via uvx, e.g. Manus):
xiaohongshu-fastmcp --transport stdio --headless
or:
python -m xiaohongshu_fastmcp.server --transport stdio --headless
Example Manus stdio command using uvx:
uvx --from xiaohongshu-fastmcp xiaohongshu-fastmcp --transport stdio --headless
Endpoints
- MCP:
http://localhost:18060/mcp - Health:
http://localhost:18060/health - REST:
http://localhost:18060/api/v1/*
Environment Variables
XHS_PROXY: optional proxy URLCOOKIES_PATH: optional cookies file pathROD_BROWSER_BIN: browser binary path compatibility aliasXHS_BROWSER_BIN: browser binary path
Notes
- This project now exposes both MCP (
/mcp) and REST compatibility routes (/api/v1/*,/health) in one process. - FastMCP runtime is pinned to
fastmcp==3.1.1. - Publish flow prefers Go-parity selectors and keeps fallback selectors for DOM drift.
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
xiaohongshu_fastmcp-0.1.1.tar.gz
(28.0 kB
view details)
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file xiaohongshu_fastmcp-0.1.1.tar.gz.
File metadata
- Download URL: xiaohongshu_fastmcp-0.1.1.tar.gz
- Upload date:
- Size: 28.0 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.2.0 CPython/3.13.5
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
67cc27d89506272d24f977498806ba6a5969d689a76e364ccc5624771a785480
|
|
| MD5 |
255f30ae382804217fb7c5cb409b83c0
|
|
| BLAKE2b-256 |
ba914ba46ae4b0bb41cdd4b0830a41c4f423e0df2b079c212598aefefac595fe
|
File details
Details for the file xiaohongshu_fastmcp-0.1.1-py3-none-any.whl.
File metadata
- Download URL: xiaohongshu_fastmcp-0.1.1-py3-none-any.whl
- Upload date:
- Size: 39.2 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.2.0 CPython/3.13.5
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
52046de3c41fb7f215818f3905407ac7ae54512653069a1e8fcfc8062ae42402
|
|
| MD5 |
045ad285f13bf13bdf292ccf408fe1a0
|
|
| BLAKE2b-256 |
ccd132fea91131b2123a56a27fafe8045613b1d7087324e426401049b9ff2c84
|