mcpField
🔍
🔍 Prysm MCP Server

🔍 Prysm MCP Server

本地服务
github.com/pinkpixel-dev浏览器自动化273 周前更新

关于 🔍 Prysm MCP Server

Prysm MCP Server 让 AI 助手以快速、均衡或深入模式抓取网页。它支持内容分析、图片提取、多种输出格式,并可将结果保存为文件。

主要功能

  1. 01快速、均衡和深入抓取
  2. 02分析 URL 以选择抓取方式
  3. 03将结果转换为 Markdown、HTML 或 JSON
  4. 04提取并下载图片
  5. 05配置滚动行为和输出路径

适用场景

  1. 01按所需深度抓取网页
  2. 02以指定格式保存提取内容
  3. 03下载网页中的图片

MCP 相关

它向 MCP 客户端提供网页抓取和结果格式化工具,支持不同提取深度、图片选项和文件输出。

配置

本地服务的配置在各客户端中通用,复制后粘贴到客户端的 MCP 配置文件即可。

暂未收录安装方式

我们还没有获取到这个服务的安装包或远程地址,请按项目 README 中的说明安装。

代码仓库

工具

还没有获取到工具列表

本地服务需要在你的电脑上运行后才能读取工具,维护者暂未提供工具列表。

详细介绍

MseeP.ai Security Assessment Badge

🔍 Prysm MCP 服务

Prysm MCP(Model Context Protocol)服务使 Claude 等 AI 助手能够以高准确度和灵活性抓取网页内容。

✨ 功能

  • 🎯 多种抓取模式:可选择专注(快速)、均衡(默认)或深度(全面)模式
  • 🧠 内容分析:分析 URL,以确定最佳抓取方式
  • 📄 格式灵活:将结果格式化为 Markdown、HTML 或 JSON
  • 🖼️ 图片支持:可选择提取甚至下载图片
  • 🔍 智能滚动:为单页应用配置滚动行为
  • 📱 响应式适配:适应不同的网站布局和结构
  • 💾 文件输出:将格式化后的结果保存到首选目录

🚀 快速开始

安装
# Recommended: Install the LLM-optimized version
npm install -g @pinkpixel/prysm-mcp

# Or install the standard version
npm install -g prysm-mcp

# Or clone and build
git clone https://github.com/pinkpixel-dev/prysm-mcp.git
cd prysm-mcp
npm install
npm run build
集成指南

我们为常见的 MCP 兼容应用提供了详细的集成指南:

用法

设置 Prysm MCP 服务有多种方式:

使用 mcp.json 配置

按照上述指南,在适当位置创建 mcp.json 文件。

{
  "mcpServers": {
    "prysm-scraper": {
      "description": "Prysm web scraper with custom output directories",
      "command": "npx",
      "args": [
        "-y",
        "@pinkpixel/prysm-mcp"
      ],
      "env": {
        "PRYSM_OUTPUT_DIR": "${workspaceFolder}/scrape_results",
        "PRYSM_IMAGE_OUTPUT_DIR": "${workspaceFolder}/scrape_results/images"
      }
    }
  }
}

🛠️ 工具

该服务提供以下工具:

scrapeFocused

快速网页抓取,针对速度进行了优化(滚动次数较少,仅抓取主要内容)。

Please scrape https://example.com using the focused mode

可用参数:

  • url(必需):要抓取的 URL
  • maxScrolls(可选):最大滚动尝试次数(默认值:5)
  • scrollDelay(可选):每次滚动之间的延迟,单位为毫秒(默认值:1000)
  • scrapeImages(可选):是否在结果中包含图片
  • downloadImages(可选):是否在本地下载图片
  • maxImages(可选):要提取的图片数量上限
  • output(可选):下载图片的输出目录
scrapeBalanced

均衡的网页抓取方式,覆盖范围较广且速度合理。

Please scrape https://example.com using the balanced mode

可用参数:

  • 与 scrapeFocused 相同,但默认值不同
  • maxScrolls 默认值:10
  • scrollDelay 默认值:2000
  • 增加 timeout 参数,用于限制总抓取时间(默认值:30000ms)
scrapeDeep

最大限度提取网页内容的抓取方式(速度较慢,但更全面)。

Please scrape https://example.com using the deep mode with maximum scrolls

可用参数:

  • 与 scrapeFocused 相同,但默认值不同
  • maxScrolls 默认值:20
  • scrollDelay 默认值:3000
  • maxImages 默认值:100
formatResult

将抓取的数据格式化为不同的结构化格式(Markdown、HTML、JSON)。

Format the scraped data as markdown

可用参数:

  • data(必需):要格式化的抓取数据
  • format(必需):输出格式——“markdown”、“html”或“json”
  • includeImages(可选):是否在输出中包含图片(默认值:true)
  • output(可选):用于保存格式化结果的文件路径

也可以指定输出路径,将格式化后的结果保存到文件:

Format the scraped data as markdown and save it to "my-results/output.md"

⚙️ 配置

输出目录

默认情况下,保存格式化结果时,文件会保存到 ~/prysm-mcp/output/。你可以通过以下两种方式自定义:

  1. 环境变量:将环境变量设置为你偏好的目录:
# Linux/macOS
export PRYSM_OUTPUT_DIR="/path/to/custom/directory"
export PRYSM_IMAGE_OUTPUT_DIR="/path/to/custom/image/directory"

# Windows (Command Prompt)
set PRYSM_OUTPUT_DIR=C:\path\to\custom\directory
set PRYSM_IMAGE_OUTPUT_DIR=C:\path\to\custom\image\directory

# Windows (PowerShell)
$env:PRYSM_OUTPUT_DIR="C:\path\to\custom\directory"
$env:PRYSM_IMAGE_OUTPUT_DIR="C:\path\to\custom\image\directory"
  1. 工具参数:调用工具时直接指定输出路径:
# For general results
Format the scraped data as markdown and save it to "/absolute/path/to/file.md"

# For image downloads when scraping
Please scrape https://example.com and download images to "/absolute/path/to/images"
  1. MCP 配置:在 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_IMAGE_OUTPUT_DIR,它默认会指向 PRYSM_OUTPUT_DIR 下名为 images 的子文件夹。

如果只提供相对路径或文件名,文件将相对于已配置的输出目录保存。

路径处理规则

formatResult 工具会按以下方式处理路径:

  • 绝对路径:按提供的路径原样使用(/home/user/file.md)
  • 相对路径:相对于已配置的输出目录保存(subfolder/file.md)
  • 仅文件名:保存到已配置的输出目录(output.md)
  • 目录路径:如果路径指向一个目录,则会根据内容和时间戳自动生成文件名

🏗️ 开发

# Install dependencies
npm install

# Build the project
npm run build

# Run the server locally
node bin/prysm-mcp

# Debug MCP communication
DEBUG=mcp:* node bin/prysm-mcp

# Set custom output directories
PRYSM_OUTPUT_DIR=./my-output PRYSM_IMAGE_OUTPUT_DIR=./my-output/images node bin/prysm-mcp
通过 npx 运行

你可以直接使用 npx 运行服务,无需安装:

# Run with default settings
npx @pinkpixel/prysm-mcp

# Run with custom output directories
PRYSM_OUTPUT_DIR=./my-output PRYSM_IMAGE_OUTPUT_DIR=./my-output/images npx @pinkpixel/prysm-mcp

📋 许可证

MIT

🙏 致谢

由 Pink Pixel 开发

由 Model Context Protocol 和 Puppeteer 提供支持

评论

支持 Markdown

第一次接触 MCP?

从协议是什么,到在客户端里装上第一个服务,这几条回答覆盖了大多数入门问题。

一个开放协议,规定了 AI 应用如何以统一方式连接外部工具与数据源。客户端负责与模型对话,MCP 服务负责提供工具、资源和提示模板,两者通过标准消息通信,同一个服务可以被不同客户端复用。