网络抓取器

@tanevanwifferen/usescraper-mcp-server
0 Stars 490 次浏览 tanevanwifferen 更新于 2026-08-23

一个基于 TypeScript 的 MCP 服务器,利用 UseScraper API 提供网页抓取功能,允许用户以各种格式从网页中提取内容。

该服务暂未提供标准配置,请参考 README 手动接入

可用工具 (1 个)

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

scrape 4 个参数 需填 1 项

Scrape content from a webpage using UseScraper API

必填参数:url

服务介绍

UseScraper MCP 服务器

smithery 徽章
这是一个基于 TypeScript 的 MCP 服务器,使用 UseScraper API 提供网页抓取功能。它暴露了一个名为 'scrape' 的工具,可以从网页中以多种格式提取内容。

功能

工具

  • scrape - 从网页中提取内容
    • 参数:
      • url (必需): 要抓取的网页 URL
      • format (可选): 保存内容的格式(text, html, markdown)。默认: markdown
      • advanced_proxy (可选): 使用高级代理绕过机器人检测。默认: false
      • extract_object (可选): 指定要提取的数据对象

安装

通过 Smithery 安装

要通过 Smithery 自动安装适用于 Claude Desktop 的 UseScraper:

npx -y @smithery/cli install usescraper-server --client claude

手动安装

  1. 克隆仓库:

    git clone https://github.com/your-repo/usescraper-server.git
    cd usescraper-server
    
  2. 安装依赖项:

    npm install
    
  3. 构建服务器:

    npm run build
    

配置

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

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

{
  "mcpServers": {
    "usescraper-server": {
      "command": "node",
      "args": ["/path/to/usescraper-server/build/index.js"],
      "env": {
        "USESCRAPER_API_KEY": "your-api-key-here"
      }
    }
  }
}

/path/to/usescraper-server 替换为实际的服务器路径,并将 your-api-key-here 替换为您的 UseScraper API 密钥。

使用

配置完成后,您可以通过 MCP 界面使用 'scrape' 工具。示例用法:

{
  "name": "scrape",
  "arguments": {
    "url": "https://example.com",
    "format": "markdown"
  }
}

开发

对于带有自动重建的开发:

npm run watch

调试

由于 MCP 服务器通过 stdio 通信,调试可能会比较困难。我们建议使用 MCP Inspector,它作为一个包脚本提供:

npm run inspector

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

相关 MCP 服务