
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
概覽
本機 MCP 伺服器,讓助理建立、檢視並安全解壓縮 zip 壓縮檔,在解壓前標示壓縮炸彈、路徑穿越與符號連結。
- 可以做什麼
- 用 glob 模式把檔案或目錄樹打包成壓縮檔,並可將檔案加入既有壓縮檔
- 列出每個項目的大小、壓縮比,並標示絕對路徑、..、符號連結、重複名稱等危險項目
- 在路徑穿越、符號連結與壓縮炸彈防護下解壓縮到指定目錄,支援試跑
- 不實際解壓縮,直接讀取壓縮檔內某個文字項目
- 把某個月的發票、報價與匯出檔打包成單一檔案,並檢視建立紀錄與免費額度
- 查詢授權狀態並啟用 Pro 金鑰
- 適用情境
- 適合需要把檔案打包給他人,或收到壓縮檔後想先了解內容、確認安全再開啟的情況。讀取與檢查不限次數,因此適合謹慎處理來源不明的壓縮檔。
- 執行需求
- 以本機程序(stdio)在桌面端執行;README 建議使用 .mcpb 一鍵包或複製後自行建置,因為 npm 套件尚未發布。不需要帳號、API 金鑰或網路存取。可選擇透過 MCP_LICENSE_KEY 環境變數提供 Pro 授權金鑰。
安裝
在 SourceWeft 中
- 開啟 儀表板中的 Archive Zip Unzip Bomb Guard,將其新增到工作區。
- 為需要使用其工具的對話啟用該服務。
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).
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):
Claude Code:
Cursor, .cursor/mcp.json:
Tools
Free vs Pro
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.
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:
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:
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:
- Docs MCP URL: https://gitmcp.io/theluckystrike/mcp-zip
來源:servers/zip/README.md,提交 1bd9d69
工具
0版本歷史
1- v0.21.0最新Sep 16, 2026
評分
已滿足適用檢查項的 50%
該評分衡量此收錄條目的完整程度,依據註冊中心條目、端點與公開來源計算得出。它不是對伺服器本身的評價,也不表示伺服器安全或目前可用:可連通性是帶日期的檢查結果,評分也不包含安裝量或使用者評價。
- 近 30 天內可連通25 分
請保持端點能夠回應 MCP 握手;SourceWeft 每 30 天探測一次。
- 已宣告認證方式10 分
請在註冊中心條目中宣告憑證請求標頭,或保持端點能夠回應探測,以便判定其認證方式。
- 已列出工具15 分
請讓伺服器在無憑證時回應 tools/list,或發布可在沙箱中無憑證啟動的軟體包。
- 描述必需15 分
- 圖示10 分
- 文件15 分
- 授權條款10 分