结构化数据提取服务

Scrapezy MCP Server是一个用于从网站提取结构化数据的模型上下文协议服务器,适用于需要自动化数据抓取的场景。

  • by Scrapezy
  • JavaScript
  • 本地部署
  • 14 星标
  • 更新于
在 GitHub 查看 Scrapezy/mcp

使用说明

@scrapzy/mcp mcp服务器

一个模型上下文协议服务器 斯克拉佩齐 这使得AI模型能够从网站中提取结构化数据。

特性

工具

  • extract_structured_data -从网站中提取结构化数据
    • 将URL和提示符作为必需参数
    • 根据提示返回从网站提取的结构化数据
    • 提示应明确描述从网站中提取哪些数据

安装

通过Smithery安装

通过以下方式自动安装Scrapezy MCP Server for Claude Desktop 史密瑟里:

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服务器通过stdio进行通信,调试可能具有挑战性。我们建议使用 MCP检查员,可作为包脚本使用:

npm run inspector

检查器将提供一个URL,用于访问浏览器中的调试工具。

许可证

麻省理工学院