智搜

@Ai-Quill/scraperis-mcp
2 Stars 686 次浏览 Ai-Quill 更新于 2026-08-23

启用通过自然语言提示从网站提取数据的功能,允许用户用简单的英语准确指定所需内容,并返回结构化的JSON数据。

MCP 服务配置

复制以下 JSON 到 OPClaw 或其他 MCP 客户端的配置文件中即可使用

{
  "mcpServers": {
    "scraperis_scraper": {
      "args": [],
      "command": "scraperis-mcp",
      "env": {
        "DEBUG": "*",
        "SCRAPERIS_API_KEY": "your-api-key-here"
      }
    }
  }
}

该服务需要配置环境变量:SCRAPERIS_API_KEY

可用工具 (1 个)

该服务在 MCP 协议中暴露的工具,AI 可按需调用

scraperis_scraper 2 个参数 需填 1 项

Extract data from websites using natural language prompts. The prompt should include the website URL and what data you want to extract. For example: 'Get me the top 10 products from producthunt.com' or 'Extract all article titles and authors from techcrunch.com/news'

必填参数:prompt

服务介绍

Scraper.is MCP

npm version

一个用于 Scraper.is模型上下文协议 (MCP) 集成 - 一个强大的网页抓取工具,适用于 AI 助手。

这个包允许 AI 助手通过 MCP 协议抓取网页内容,使它们能够从网络上获取最新信息。

特性

  • 🌐 网页抓取: 从任何网站提取内容
  • 📸 截图: 捕获网页的视觉表示
  • 📄 多种格式: 以 markdown、HTML 或 JSON 格式获取内容
  • 🔄 进度更新: 在抓取操作期间实时报告进度
  • 🔌 MCP 集成: 与支持 MCP 的 AI 助手无缝集成

安装

npm install -g scraperis-mcp

或者使用 yarn:

yarn global add scraperis-mcp

前提条件

你需要一个 Scraper.is API 密钥来使用这个包。

获取你的 API 密钥

  1. scraper.is 注册或登录
  2. 导航到仪表板中的 API 密钥部分: https://www.scraper.is/dashboard/apikeys
  3. 创建一个新的 API 密钥或复制现有的密钥
  4. 安全地存储此密钥,因为您需要它来使用此包

使用

环境设置

创建一个包含你的 Scraper.is API 密钥的 .env 文件:

SCRAPERIS_API_KEY=your_api_key_here

Claude Desktop 集成

要将此包与 Claude Desktop 一起使用:

  1. 全局安装包:

    npm install -g scraperis-mcp
    
  2. 将以下配置添加到您的 claude_desktop_config.json 文件中:

    {
      "mcpServers": {
        "scraperis_scraper": {
          "command": "scraperis-mcp",
          "args": [],
          "env": {
            "SCRAPERIS_API_KEY": "your-api-key-here",
            "DEBUG": "*"
          }
        }
      }
    }
    
  3. your-api-key-here 替换为您的实际 Scraper.is API 密钥。

  4. 重启 Claude Desktop 以应用更改。

使用 MCP Inspector 运行

对于开发和测试,您可以使用 MCP Inspector:

npx @modelcontextprotocol/inspector scraperis-mcp

与 AI 助手集成

该包设计用于支持模型上下文协议 (MCP) 的 AI 助手。配置正确后,AI 助手可以使用以下工具:

抓取工具

scrape 工具允许 AI 从网站提取内容。它支持各种格式:

  • markdown: 以 markdown 格式返回内容
  • html: 以 HTML 格式返回内容
  • screenshot: 返回网页的截图
  • json: 以 JSON 格式返回结构化数据

示例提示给 AI:

Can you scrape the latest news from techcrunch.com and summarize it for me?

API 参考

工具

scrape

根据提示从网页抓取内容。

参数:

  • prompt (字符串): 描述要抓取的内容的提示,包括 URL
  • format (字符串): 返回内容的格式 (markdown, html, screenshot, json, quick)

示例:

{
  "prompt": "Get me the top 10 products from producthunt.com",
  "format": "markdown"
}

开发

设置

  1. 克隆仓库:

    git clone https://github.com/Ai-Quill/scraperis-mcp.git
    cd scraperis-mcp
    
  2. 安装依赖项:

    npm install
    
  3. 构建项目:

    npm run build
    

脚本

  • npm run build: 构建项目
  • npm run watch: 监视更改并重新构建
  • npm run dev: 使用MCP Inspector进行开发运行
  • npm run test: 运行测试
  • npm run lint: 运行ESLint

贡献

欢迎贡献!请随时提交Pull Request。

许可证

此项目根据MIT许可证发布 - 详情请参阅LICENSE文件。

致谢

相关 MCP 服务