Prysm MCP 是一款功能强大的工具,专为人工智能助手量身打造。它借助模型上下文协议(Model Context Protocol),显著提升了人工智能助手的网页抓取能力。该工具支持多种浏览器引擎,利用 Puppeteer 实现高效的网页抓取与解析。
npm install -g @pinkpixel/prysm-mcp
npm install @pinkpixel/prysm-mcp
# 使用默认配置运行
prysm-mcp
# 自定义输出目录
PRYSM_OUTPUT_DIR=./output PRYSM_IMAGE_OUTPUT_DIR=./output/images prysm-mcp
# 默认模式
npx @pinkpixel/prysm-mcp
# 自定义配置
PRYSM_OUTPUT_DIR=./custom-output PRYSM_IMAGE_OUTPUT_DIR=./custom-output/images npx @pinkpixel/prysm-mcp
在工作区创建或编辑 .cursor/mcp.json 文件,并添加以下内容:
{
"mcpServers": {
"prysm-scraper": {
"command": "npx",
"args": ["-y", "@pinkpixel/prysm-mcp"],
"env": {
"PRYSM_OUTPUT_DIR": "${workspaceFolder}/scrape_results",
"PRYSM_IMAGE_OUTPUT_DIR": "${workspaceFolder}/scrape_results/images"
}
}
}
}
~/prysm-mcp/output/,用户可通过以下方式自定义:
# 在 Linux/macOS 系统中
export PRYSM_OUTPUT_DIR="/path/to/custom/directory"
export PRYSM_IMAGE_OUTPUT_DIR="/path/to/custom/image/directory"
# 在 Windows 命令提示符中
set PRYSM_OUTPUT_DIR=C:\path\to\custom\directory
set PRYSM_IMAGE_OUTPUT_DIR=C:\path\to\custom\image\directory
# 在 PowerShell 中
$env:PRYSM_OUTPUT_DIR="C:\path\to\custom\directory"
$env:PRYSM_IMAGE_OUTPUT_DIR="C:\path\to\custom\image\directory"
# 保存到指定文件
Format the scraped data as markdown and save to file:/path/to/output.md
# 指定输出目录
PRYSM_OUTPUT_DIR=/tmp prysm-mcp
file:用于指定输出到特定文件。# 启动调试模式
DEBUG=prysm-mcp prysm-mcp
# 查看帮助信息
prysm-mcp --help
Prysm MCP 采用 MIT 许可证,允许用户自由使用、修改和分发代码。详细许可内容请参考项目仓库中的 LICENSE 文件。
感谢您选择 Prysm MCP,希望它能为您的项目带来高效的支持!