1.0.1 • Published 10 months ago

@mcpflow.io/mcp-website-downloader-mcp-server v1.0.1

Weekly downloads
-
License
未指定
Repository
-
Last release
10 months ago

Website Downloader MCP Server

此包由 MCPFlow 打包并发布到npm仓库。

MCP服务器用于下载整个网站。

安装与使用

直接使用npx运行:

npx @mcpflow.io/mcp-website-downloader-mcp-server

或者先安装后使用:

# 安装
npm install @mcpflow.io/mcp-website-downloader-mcp-server

# 使用
npx @mcpflow.io/mcp-website-downloader-mcp-server

使用方法

Usage

The server provides a tool called download_website with the following parameters:

  • url (required): The URL of the website to download
  • outputPath (optional): The directory where the website should be downloaded. Defaults to the current directory.
  • depth (optional): Maximum depth level for recursive downloading. Defaults to infinite. Set to 0 for just the specified page, 1 for direct links, etc.

工具函数

setupToolHandlers

Sets up the tool handlers for the server.

参数:

  • server: The server instance to set up the tool handlers on.

isValidDownloadArgs

Checks if the provided arguments are valid for downloading a website.

参数:

  • args: The arguments to validate.

run

Starts the server and connects it to the provided transport.

参数:

  • transport: The transport to use for the server connection.

原始信息

原始README

Website Downloader MCP Server

This MCP server provides a tool to download entire websites using wget. It preserves the website structure and converts links to work locally.

Prerequisites

The server requires wget to be installed on your system.

Installing wget

macOS

Using Homebrew:

brew install wget

Linux (Debian/Ubuntu)

sudo apt-get update
sudo apt-get install wget

Linux (Red Hat/Fedora)

sudo dnf install wget

Windows

  1. Using Chocolatey:
choco install wget
  1. Or download the binary from: https://eternallybored.org/misc/wget/
    • Download the latest wget.exe
    • Place it in a directory that's in your PATH (e.g., C:\Windows\System32)

Usage

The server provides a tool called download_website with the following parameters:

  • url (required): The URL of the website to download
  • outputPath (optional): The directory where the website should be downloaded. Defaults to the current directory.
  • depth (optional): Maximum depth level for recursive downloading. Defaults to infinite. Set to 0 for just the specified page, 1 for direct links, etc.

Example

{
  "url": "https://example.com",
  "outputPath": "/path/to/output",
  "depth": 2  // Optional: Download up to 2 levels deep
}

Features

The website downloader:

  • Downloads recursively with infinite depth
  • Includes all page requisites (CSS, images, etc.)
  • Converts links to work locally
  • Adds appropriate extensions to files
  • Restricts downloads to the same domain
  • Preserves the website structure

Installation

  1. Build the server:
npm install
npm run build
  1. Add to MCP settings:
{
  "mcpServers": {
    "website-downloader": {
      "command": "node",
      "args": ["/path/to/website-downloader/build/index.js"]
    }
  }
}
1.0.1

10 months ago

1.0.0

10 months ago