article
README
Project description
install
- python packages
pip install -r requirements.txt
- install chromedriver find out your chrome version like "134.0.6998.166". download it
npx @puppeteer/browsers install chromedriver@134.0.6998.166
copy the chromedriver to your path or add it in your path
- install xhs_mcp_server
pip install xhs-mcp-server
login
run the following command in your terminal.
env phone=YOUR_PHONE_NUMBER python -m xhs_mcp_server.__login__
it will show:
无效的cookies,已清理
请输入验证码:
and you need to input the verification code in the terminal and press enter.
check it
env phone=YOUR_PHONE_NUMBER python -m xhs_mcp_server.__login__
it will show:
使用cookies登录成功
inspector
start the inspector by following command in terminal:
npx @modelcontextprotocol/inspector -e phone=YOUR_PHONE_NUMBER python -m xhs_mcp_server
you can use a local image, type in its path in the inspector
["PATHTOYOURIMAGE.jpg"]
it will show an error, but it is ok, the post will be sent. Error Request timed out
start the server
start the server by following command:
env phone=YOUR_PHONE_NUMBER python -m xhs_mcp_server
扫码联系在线客服