HTTrack MCP Server

io.github.TechVentures-Studiov1.0.1更新于 Oct 1, 2026

AI-agent website mirroring and offline archive browsing over MCP, powered by HTTrack.

概览

AI 生成的概览

封装 HTTrack,让助手能把网站镜像到本地存档,并浏览、读取和搜索已下载的文件。

功能
该服务器把 HTTrack 的网站复制能力以 MCP 工具的形式提供。助手可以用 mirror_site 启动后台镜像,用 mirror_status 查询进度,再用 catalog、list_files、read_file 和 search_files 处理存档内容。镜像按项目存放在共享存档目录下,文本文件可读取或按子串搜索。
适用场景
当助手需要网站的离线副本以便日后阅读、搜索或据此回答问题时使用,而不是实时抓取。适合需要反复查询同一批已下载内容的研究或文档存档场景。
运行要求
作为本地进程运行;文档中的部署方式使用 Docker,容器通过映射端口以 streamable HTTP 暴露 MCP 服务器。需要把一个主机目录以读写方式挂载为存档目录。未声明任何身份验证。
安装前请注意
README 说明没有任何身份验证,因此只应在可信网络中运行,或置于带认证的网关之后。镜像会把第三方网站内容下载到挂载的存档目录,且该卷以读写方式挂载。read_file 会拒绝二进制文件,并将内容限制在 256 KB。

安装

在 SourceWeft 中

  1. 打开 控制台中的 HTTrack MCP Server,将其添加到工作区。
  2. 为需要使用其工具的对话启用该服务。

Desktop only,通过 STDIO。 STDIO 服务会启动本地进程,因此需要 SourceWeft 桌面宿主。

其他 MCP 客户端

参照 仓库 中的启动说明。

README

HTTrack MCP Server

[License: AGPL v3]

A FastMCP (Model Context Protocol) server that wraps the classic HTTrack website copier, so AI agents can mirror websites into a shared archive and then browse, read, and search the downloaded content — all over MCP.

Copyright (C) 2026 Tech Ventures VCC. Licensed under the GNU Affero General Public License v3.0 (see LICENSE).

Why

HTTrack is battle-tested for offline website copying, but it has no scripting API — only a GUI and a CLI. This server makes it agent-native: an LLM agent can call mirror_site to start a download in the background, poll mirror_status, and later answer questions from the archive via catalog, list_files, read_file, and search_files.

Tools

ToolPurpose
mirror_site(url, project, depth, max_rate, filters)Start a background mirror into the archive (/data/<project>). One active mirror per project — a concurrent request for the same project returns already_running with the live job_id; different projects run in parallel.
mirror_status(job_id)Job status (running / done / failed + log tail). Omit to list recent jobs; also accepts the project name.
catalog()All projects: short name, short description (auto-derived from each site's <title>/meta description), source URL, status, page/file counts, size.
list_files(project, subpath)Directory listing inside a project (name, type, size, modified).
read_file(project, path, max_bytes)Read one text file (HTML/JS/CSS/txt/json/md). Refuses binaries; caps content at 256 KB to keep agent context sane.
search_files(project, query, max_results)Case-insensitive substring search across a project's text files, capped results.

Quick start

Prerequisites: Docker.

bash
docker build -t httrack-mcp-server .
docker run -d --name httrack-mcp --restart unless-stopped \  -p 9050:8000 \  -v /path/to/your/archive:/data:rw \  httrack-mcp

The container exposes the MCP server over streamable HTTP at http://<host>:9050/mcp.

Register in an MCP client

Example for MCPHub-style gateways (streamable-http):

json
{  "httrack": {    "type": "streamable-http",    "url": "http://192.168.1.35:9050/mcp",    "enabled": true,    "description": "HTTrack site mirroring + archive browsing",    "owner": "admin"  }}

Clients that speak streamable HTTP directly can connect to /mcp with no extra auth (nobody is authenticated; run this on a trusted network, or put it behind your gateway's auth). See HELP.md for full usage, examples, and troubleshooting.

Concurrency model

  • One httrack process per project, isolated by its own output directory — no shared state between projects, so multiple agents can mirror different sites in parallel.
  • mirror_site guards against double-mirroring the same project (in-process job table + a /proc scan for httrack processes writing to that project directory).

CI

GitHub Actions runs on every PR and push: Python syntax check of server.py, Dockerfile sanity assertions, and a Docker image build.

License

This program is free software: you can redistribute it and/or modify it under the terms of the GNU Affero General Public License as published by the Free Software Foundation, either version 3 of the License, or (at your option) any later version.

If you run a modified version of this server as a network service, AGPL §13 requires you to offer your users the corresponding source of that modified version.

Copyright (C) 2026 Tech Ventures VCC. HTTrack itself is GPL-licensed by Xavier Roche and contributors; this project only shells out to it and is not affiliated with it.

来源:README.md,提交 7feccd3

工具

0
工具元数据尚未被收录。

版本历史

1
  1. v1.0.1最新Oct 1, 2026