使用SiteMCP抓取网站只需要简单几步:
- environmental preparation:确保Node.js版本≥16,可通过
node -v
probe - 单次运行: Direct use
npx sitemcp 网站URL
(e.g.npx sitemcp https://example.com
) - 全局安装(可选): By
npm i -g sitemcp
永久安装
运行后工具会自动:
- 下载依赖(首次使用时)
- 抓取指定网站内容
- 缓存数据到
~/.cache/sitemcp
- 启动本地MCP服务器(默认端口3000)
整个过程结束后终端会显示Server running at http://localhost:3000
,此时AI即可通过该地址访问网站数据。
This answer comes from the articleSiteMCP: Crawling website content and turning it into MCP servicesThe