Archive Zip Unzip Bomb Guard

com.bestremotetools由 bestremotetools.com 发布v0.21.0更新于 Oct 24, 2026

Pack a folder with a glob, look inside an archive, unpack it with bomb, traversal and symlink guards

已验证STDIO仅桌面文件与存储安全与监控

概览

AI 生成的概览

本地 MCP 服务器,让助手创建、查看并安全解压 zip 压缩包,在解压前标记压缩炸弹、路径穿越和符号链接。

可以做什么
  • 用 glob 模式把文件或目录树打包成压缩包,并向已有压缩包追加文件
  • 列出每个条目的大小、压缩比,并标记绝对路径、..、符号链接、重名等危险项
  • 在路径穿越、符号链接和压缩炸弹防护下解压到指定目录,支持试运行
  • 不实际解压,直接读取压缩包内某个文本条目
  • 把某月的发票、报价和导出文件打包成一个文件,并查看创建历史与免费额度
  • 查询授权状态并激活 Pro 密钥
适用场景
适合需要把文件打包给别人,或收到压缩包后想先弄清里面有什么、是否安全再打开的场景。读取和检查不限量,因此适合谨慎处理来路不明的压缩包。
运行要求
以本地进程(stdio)方式在桌面端运行;README 建议使用 .mcpb 一键包或克隆后自行构建,因为 npm 包尚未发布。无需账号、API 密钥或网络访问。可选通过 MCP_LICENSE_KEY 环境变量提供 Pro 授权密钥。
安装前请注意
免费版对写入有额度限制(每月 20 个压缩包、单个 25 MB、200 个条目);Pro 为一次性付费购买。解压会向指定目录写入文件,建议先看试运行结果。不支持 zip 密码,传入会被拒绝。会在用户数据目录下保留一份创建记录。

安装

在 SourceWeft 中

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

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

其他 MCP 客户端

参照 仓库 中的启动说明。

README

mcp-zip

Make a zip, look inside one, and unpack one, in the conversation you are already in. Pack a folder with a glob (**/*.csv, everything except node_modules). Read the one README out of an archive without unpacking it. Ask what is inside a zip somebody sent you and be told before you open it: absolute paths, .., symlinks, duplicate names, and the entry that claims to be 200 MB inside a 199 KB file. Bundle a month of invoices, quotes and exports into one file to send to an accountant. Everything runs on your machine: no upload, no account, no API key, and no network call of any kind.

In the official MCP Registry (io.github.theluckystrike/zip-archive-create-extract-bomb-guard).

[zip demo]

npm publish for @theluckystrike/mcp-zip is pending, so npx -y @theluckystrike/mcp-zip returns 404 today. Until then, the .mcpb one-click bundle or a clone+build is the working path.

Install

Claude Desktop, ~/Library/Application Support/Claude/claude_desktop_config.json (macOS) or %APPDATA%\Claude\claude_desktop_config.json (Windows):

json
{  "mcpServers": {    "zip": { "command": "npx", "args": ["-y", "@theluckystrike/mcp-zip"] }  }}

Claude Code:

sh
claude mcp add zip -- npx -y @theluckystrike/mcp-zip

Cursor, .cursor/mcp.json:

json
{  "mcpServers": {    "zip": { "command": "npx", "args": ["-y", "@theluckystrike/mcp-zip"] }  }}

Tools

toolwhat it does
zip_createPack files, or a directory tree with glob patterns, into a new .zip
zip_listEvery entry with its size, compressed size and ratio, and everything dangerous in it, flagged
zip_extractUnpack into a directory, with traversal, symlink and zip-bomb guards and a dry_run
zip_addAdd files to an archive that already exists
zip_extract_textRead one text entry inline, without unpacking anything
zip_bundle_monthOne month of invoices, quotes and exports from the sibling servers, in one file
zip_historyWhat you have created, and how much of this month's free allowance is left
license_status, license_activateFree or Pro, and activating a key

Free vs Pro

FreePro
Archives per calendar month20Unlimited
Archive sizeUp to 25 MBUnlimited
Entries per archiveUp to 200Unlimited
Reading: zip_list, zip_extract, zip_extract_textUnlimitedUnlimited
Bomb, traversal and symlink guardsYesYes

Reading is never metered. The free tier is a limit on what you write, because an archive somebody sent you is exactly the one you most need to inspect before opening, and a paywall in front of that would be a paywall in front of the safety check.

Get Pro: https://mcp.zovo.one/buy/zip - $19 one time, or $39 for every server in the suite, lifetime. Keys verify offline; nothing is sent anywhere.

Why fflate and not a hand-written writer

The choice was fflate (pure JS, 0 dependencies, synchronous zipSync/inflateSync) against writing a STORE/DEFLATE writer on node:zlib, which is available with no dependency at all.

The container format is written here either way. This server reads the central directory itself, in src/zipfile.ts, roughly 200 lines: sizes, names, methods, CRCs, external attributes. It has to, because every guard in the server is a decision made from those headers before anything is inflated, and a library that hands back {name: bytes} has already decompressed the bomb by the time you can look at it. So the argument for a library was never "it saves me the format".

What is left is the compressor, and that is the part not to write. node:zlib would do it, but its raw-deflate calls are async-first, they carry a thread-pool round trip per call, and the sync ones each build a native stream; packing 200 small files is 200 of those. fflate's deflateSync is a pure-JS implementation with no native handle, it packs 200 files in 74 ms (measured below), and it means the package still has no native build step, which is the rule for this whole suite: npx has to work everywhere.

The trade is stated plainly: fflate builds the archive in one buffer, so this server refuses inputs over 512 MB rather than pretending to stream, and it does not read ZIP64 (over 4 GB or over 65,535 entries), which is refused by name rather than misread.

Measured: the file type does not predict the compression ratio, repetition does

Every file below was zipped at level 6 on this machine. The "type" column is what a person would call the file; the ratio is what actually happened.

filetypebyteszippedratio
a 12-page invoice from mcp-pdfPDF15,12514,1181.07x
a 400-paragraph contract from mcp-docxDOCX9,8977,3111.35x
4,000 rows of billing CSV, varied valuesCSV321,329134,0492.40x
this server's own index.tssource39,49811,9383.31x
package-lock.jsonJSON138,83533,2234.18x
20,000 lines of an app loglog1,603,390106,26115.09x
4,000 rows of billing CSV, 40 repeated clientsCSV338,5494,09482.69x
50 MB of zero bytesbomb52,428,80051,2941022x

PDF and DOCX barely move, and that is not a surprise once you look inside them: both are already deflate containers, so zipping them again is packaging, not compression. Bundling a month of invoices is worth doing for the one file, not for the space.

The two CSV rows are the interesting pair. Same tool, same shape, same size, 34x apart: the one with forty repeated client names compresses 82.69x, the one with unique values 2.40x. Nothing about "it is a CSV" predicts which one you have.

Measured: why the bomb ceiling is 100x and not 50x

A compression bomb is refused by ratio, and the obvious instinct is to set that ceiling low, well under the 1022x a zeros file reaches. The table above says why that is wrong: a real CSV export, of the kind zip_bundle_month collects from the expense tracker, reached 82.69x, which is 83% of the way to a 100x ceiling and well past a 50x one. A ceiling tuned to be comfortably below a bomb would refuse a real monthly export, and the person on the other end would learn to pass max_ratio on everything, which turns the guard off permanently.

So the ratio is the second guard, not the first. The first is the total: the selected entries' declared uncompressed sizes are added up and compared against a ceiling (1 GB by default, max_total_mb to change it), because 200 MB out of a 199 KB file is a decision you can make about the archive as a whole without judging any entry. Both are read from the central directory, so refusing a bomb costs no decompression at all:

refuse a 500 MB bomb (497.8 KB on disk)   3 ms, nothing inflated, out_dir not even created

Measured: a bounded output buffer is not a bomb guard

fflate.inflateSync(data, { out: new Uint8Array(n) }) looks like the whole answer: cap the buffer, cap the damage. It is not, and the way it fails is quiet. A 100,000-byte entry inflated into a 10-byte buffer returns 10 bytes and throws nothing. An archive whose header declares 10 bytes for a 100 KB entry would extract as a 10-byte file, reported as a success, with the truncation invisible.

So the buffer bounds the memory and the CRC-32 in the central directory proves the bytes. Every entry this server writes out is checksummed against the header before it reaches the disk, and a mismatch refuses the entry by name. That is the check that turns a lying header from silent data loss into a sentence.

Timings

M-series laptop, over stdio, per call, cold store:

operationmeasured
zip_create, 200 files, 4.0 MB74 ms
zip_list, 200 entries2 ms
zip_extract, 200 entries47 ms
zip_extract_text, one entry1 ms
refuse a 500 MB bomb3 ms
whole test suite, 38 tests, five files3.9 s

Privacy

Everything stays on your machine. There is no network code in this server at all: no fetch, no HTTP client, no telemetry. Archives are written where you say, and a small register of what was created lives under ~/.local/share/mcp-servers/zip/ (or $XDG_DATA_HOME). License keys verify offline with a public key.

Zip passwords are not supported, and passing one is refused rather than ignored: the classic zip cipher is broken and AES zip encryption is a vendor extension no two tools agree on, so a "password protected" archive from here would be a false promise.

Built by theluckystrike. Support: [email protected]

Use these docs as an MCP server

Any MCP client (Claude, Cursor, Windsurf, VS Code) can read this repository's documentation directly via GitMCP - no install:

来源:servers/zip/README.md,提交 1bd9d69

工具

0
SourceWeft 尚未在沙箱中启动过该软件包,因此其工具未知。

版本历史

1
  1. v0.21.0最新Sep 16, 2026

评分

已满足适用检查项的 50%

该评分衡量此收录条目的完整程度,依据注册中心条目、端点与公开来源计算得出。它不是对服务器本身的评价,也不表示服务器安全或当前可用:可连通性是带日期的检查结果,评分也不包含安装量或用户评价。

  • 近 30 天内可连通25 分

    请保持端点能够响应 MCP 握手;SourceWeft 每 30 天探测一次。

  • 已声明认证方式10 分

    请在注册中心条目中声明凭据请求头,或保持端点能够响应探测,以便判定其认证方式。

  • 已列出工具15 分

    请让服务器在无凭据时响应 tools/list,或发布可在沙箱中无凭据启动的软件包。

  • 描述必需15 分
  • 图标10 分
  • 文档15 分
  • 许可证10 分