Skip to main content

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

  1. Python 3.11+
  2. Chrome/Chromium installed
  3. 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 URL
  • COOKIES_PATH: optional cookies file path
  • ROD_BROWSER_BIN: browser binary path compatibility alias
  • XHS_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


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.0.tar.gz (27.6 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

xiaohongshu_fastmcp-0.1.0-py3-none-any.whl (38.9 kB view details)

Uploaded Python 3

File details

Details for the file xiaohongshu_fastmcp-0.1.0.tar.gz.

File metadata

  • Download URL: xiaohongshu_fastmcp-0.1.0.tar.gz
  • Upload date:
  • Size: 27.6 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.2.0 CPython/3.13.5

File hashes

Hashes for xiaohongshu_fastmcp-0.1.0.tar.gz
Algorithm Hash digest
SHA256 fca499ba86e61a77b062e3aedaacf42b90f8fa93fbfb5b8ea6917eb3befdfa76
MD5 abee46626a271793f7bebb1a69f4c46f
BLAKE2b-256 71e297fd7ad2ab34dfe60868198f44286bf032761e32047fb55ba478b30bc0c5

See more details on using hashes here.

File details

Details for the file xiaohongshu_fastmcp-0.1.0-py3-none-any.whl.

File metadata

File hashes

Hashes for xiaohongshu_fastmcp-0.1.0-py3-none-any.whl
Algorithm Hash digest
SHA256 33085ba0520ee0aeea685d8694c898f3c4a2b575fb3957ea0a77a6319972ab98
MD5 53d138f5830541cf4b62786d36ab9396
BLAKE2b-256 6c7afce4628f0f67c206008eda2cdc0f0cfb603cb915edc2bb6832c7e4e7650d

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page