UseScraper MCP Server

by tanevanwifferen
Verified

remote-capable server

The server can be hosted and run remotely because it primarily relies on remote services or has no dependency on the local environment.

Integrations

  • Allows scraping web content and converting it to Markdown format.

  • The MCP server is built using TypeScript.

UseScraper MCP 服务器

这是一个基于 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

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

You must be authenticated.

A
security – no known vulnerabilities
A
license - permissive license
A
quality - confirmed to work

Tools

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

  1. Features
    1. Tools
  2. Installation
    1. Installing via Smithery
    2. Manual Installation
  3. Configuration
    1. Usage
      1. Development
        1. Debugging
      ID: oqq8he02cy