Scrapezy MCP Server

官方

使用 Scrapezy 将网站转化为数据集

文档

@scrapezy/mcp MCP 服务器

Scrapezy MCP server

smithery badge

一个用于 Scrapezy 的模型上下文协议服务器,使 AI 模型能够从网站中提取结构化数据。

功能特性

工具

  • extract_structured_data - 从网站提取结构化数据
    • 需要 URL 和提示词作为必填参数
    • 根据提示词返回从网站中提取的结构化数据
    • 提示词应清晰描述要从网站中提取哪些数据

安装

通过 Smithery 安装

要通过 Smithery 为 Claude Desktop 自动安装 Scrapezy MCP 服务器:

npx -y @smithery/cli install @Scrapezy/mcp --client claude

手动安装

npm install -g @scrapezy/mcp

使用方法

API 密钥设置

提供 Scrapezy API 密钥有两种方式:

  1. 环境变量:

    export SCRAPEZY_API_KEY=your_api_key
    npx @scrapezy/mcp
    
  2. 命令行参数:

    npx @scrapezy/mcp --api-key=your_api_key
    

要与 Claude Desktop 配合使用,请添加服务器配置:

在 MacOS 上:~/Library/Application Support/Claude/claude_desktop_config.json 在 Windows 上:%APPDATA%/Claude/claude_desktop_config.json

{
  "mcpServers": {
    "scrapezy": {
      "command": "npx @scrapezy/mcp --api-key=your_api_key"
    }
  }
}

Claude 中的使用示例

您可以在 Claude 中使用此工具,提示词示例如下:

Please extract product information from this page: https://example.com/product
Extract the product name, price, description, and available colors.

Claude 将使用 MCP 服务器从网站中提取所请求的结构化数据。

调试

由于 MCP 服务器通过标准输入输出进行通信,调试可能具有挑战性。我们建议使用 MCP Inspector,它作为一个包脚本提供:

npm run inspector

Inspector 将提供一个 URL,以便在浏览器中访问调试工具。

许可证

MIT