Skip to main content
Glama
MCP Windows Website Downloader Server

MCP Windows Website Downloader Server

by angrysky56

MCP 网站下载器

简单的 MCP 服务器,用于下载文档网站并准备进行 RAG 索引。

特征

  • 下载完整的文档站点,无论如何都是大块的。

  • 维护链接结构和导航,不是真的。哈哈

  • 下载并组织资产(CSS、JS、图像),但对 AI 来说并不是很友好,而且可能都需要某种解析或矢量化到数据库或类似的东西中。

  • 为 RAG 系统创建干净的索引,目前似乎在每个文件夹中都创建了一个索引,甚至没有查看它。

  • 简单的单一用途 MCP 接口,是的。

Related MCP server: WebClone MCP Server

安装

分叉并下载,然后 cd 到存储库。

uv venv
./venv/Scripts/activate
pip install -e .

将其放入您的 claude_desktop_config.json 中,并使用您自己的路径:

   "mcp-windows-website-downloader": {
     "command": "uv",
     "args": [
       "--directory",
       "F:/GithubRepos/mcp-windows-website-downloader",
       "run",
       "mcp-windows-website-downloader",
       "--library",
       "F:/GithubRepos/mcp-windows-website-downloader/website_library"
     ]
   },

替代文本

其他用法你不必担心,可能会产生幻觉,哈哈:

  1. 启动服务器:

python -m mcp_windows_website_downloader.server --library docs_library
  1. 通过 Claude Desktop 或其他 MCP 客户端使用:

result = await server.call_tool("download", {
    "url": "https://docs.example.com"
})

输出结构

docs_library/
  domain_name/
    index.html
    about.html
    docs/
      getting-started.html
      ...
    assets/
      css/
      js/
      images/
      fonts/
    rag_index.json

发展

该服务器遵循标准MCP架构:

src/
  mcp_windows_website_downloader/
    __init__.py
    server.py    # MCP server implementation
    core.py      # Core downloader functionality
    utils.py     # Helper utilities

成分

  • server.py :处理工具注册和请求的主要 MCP 服务器实现

  • core.py :核心网站下载功能,具有适当的资产处理

  • utils.py :用于文件处理和 URL 处理的辅助实用程序

设计原则

  1. 单一职责

    • 每个模块都有一个明确的目的

    • 服务器处理 MCP 接口

    • 核心处理下载

    • Utils 处理常见操作

  2. 清洁结构

    • 保持原有网站结构

    • 按类型组织资产

    • 为 RAG 系统创建清晰的索引

  3. 稳健运行

    • 正确的错误处理

    • 合理的深度限制

    • 资产下载验证

    • 清理 URL/路径处理

RAG指数

rag_index.json文件包含:

{
  "url": "https://docs.example.com",
  "domain": "docs.example.com", 
  "pages": 42,
  "path": "/path/to/site"
}

贡献

  1. 分叉存储库

  2. 创建功能分支

  3. 进行更改

  4. 提交拉取请求

执照

MIT 许可证 - 请参阅许可证文件

错误处理

服务器处理常见问题:

  • 无效的 URL

  • 网络错误

  • 资产下载失败

  • 格式错误的 HTML

  • 深度递归

  • 文件系统错误

错误响应遵循以下格式:

{
  "status": "error",
  "error": "Detailed error message"
}

成功响应:

{
  "status": "success",
  "path": "/path/to/downloaded/site",
  "pages": 42
}

Available Tools

1 tool
downloadC

Download documentation website for RAG indexing

Inputs: url (required).

Tool Schema Changelog

Recent tool additions, removals, and schema changes observed during successful MCP inspections.

Loading tool schema changelog…

    TDQS

    B3.1/5.0

    Scored across 1 tool

    Disambiguation5/5

    With only one tool, there is no possibility of confusion or overlap between tools. The single tool has a clear and distinct purpose.

    Naming Consistency5/5

    A single tool inherently has perfect naming consistency, as there are no other tools to compare it against for patterns or conventions.

    Tool Count2/5

    One tool is too few for a server named 'MCP Windows Website Downloader Server', which suggests a scope that might include operations like listing available websites, configuring downloads, or managing downloaded content. A single download tool feels thin and incomplete for this domain.

    Completeness2/5

    The tool surface is severely incomplete for the implied domain of downloading Windows documentation websites. It lacks essential operations such as listing available websites, checking download status, managing or deleting downloaded content, or configuring download parameters, which are likely needed for effective RAG indexing workflows.

    Related MCP Connectors

    Related MCP Servers

    • A
      license
      B
      quality
      D
      maintenance
      This server converts webpages into clean, structured Markdown optimized for language model consumption, removing unnecessary content and supporting JavaScript rendering.
      1
      12
      MIT
    • A
      license
      Not graded
      quality
      D
      maintenance
      A read-only Python MCP server for authorized website research, structured data extraction, downloadable-document analysis, and content auditing inside OpenCode. It crawls authorized public domains with safety constraints including robots.txt respect, SSRF defenses, bounded concurrency, and content-type allowlists.
      MIT