Website Downloader MCP Server

Website Downloader MCP Server

用于下载整个网站的MCP Server。

Google Workspace Server MCP server

这个工具可让您使用 wget 下载整个网站,保留原站点结构并将链接转换为本地可用。

安装前提

确保您的系统已安装 wget

macOS

brew install wget

Linux (Debian/Ubuntu)

sudo apt-get update && sudo apt-get install wget

Windows

使用方法

调用 download_website 函数并传递以下参数:

{
  "url": "https://example.com",      // 必需:要下载的网站URL
  "outputPath": "/path/to/output",   // 可选:保存目录,默认为当前目录
  "depth": 2                         // 可选:递归下载的深度 (0=仅当前页面)
}

主要功能

  • 递归下载网站内容
  • 下载所有必要资源(CSS、图片等)
  • 自动转换链接为本地路径
  • 为文件添加适当扩展名
  • 限制下载至原域名
  • 保持原网站结构

服务器安装

npm install
npm run build

添加到 MCP 配置:

{
  "mcpServers": {
    "website-downloader": {
      "command": "node",
      "args": ["/path/to/website-downloader/build/index.js"]
    }
  }
}