unpack-mcp
Server Configuration
Describes the environment variables required to run the server.
| Name | Required | Description | Default |
|---|---|---|---|
| dir | No | Sandbox directory. Repeatable: every archive, destination, output and source path must resolve after symlinks inside one of these directories. With no --dir, the server's current directory is used. Relative paths are relative to the first --dir. | |
| max-ratio | No | Optional server limit for the maximum compression ratio. | 200 |
| max-entries | No | Optional server limit for the maximum number of archive entries. | 10000 |
| max-total-mb | No | Optional server limit for the maximum total uncompressed size in MB. | 1024 |
Instructions
Guidance the server publishes about itself, which clients place ahead of the tool catalog so the model reads it before choosing anything.
Inspect, search, safely extract and create archives (zip, tar, tar.gz/bz2/xz, bare gz/bz2/xz; no 7z/rar). Start with archive_info (format, sizes, encryption, suspicious entries, and whether extraction would be refused), then list_entries, read_entry or search_in_archive to look inside WITHOUT extracting. extract_archive refuses path traversal, absolute paths, link escapes, device files, duplicate names and decompression bombs, never overwrites unless overwrite=true, and supports dry_run=true. All paths must be inside the directories the server was started with (--dir). Nested archives are reported, never extracted automatically.
Capabilities
Features and capabilities supported by this server
Protocol revision2025-11-25
| Capability | Details |
|---|---|
| tools | {
"listChanged": false
} |
| prompts | {
"listChanged": false
} |
| resources | {
"subscribe": false,
"listChanged": false
} |
Tools
Functions exposed to the LLM to take actions
| Name | Description |
|---|---|
| archive_infoA | Summarize an archive without extracting anything. Call this first. Reports format (zip, tar, tar.gz/bz2/xz, gz/bz2/xz), entry counts by kind, compressed and uncompressed totals and ratio, encryption, zip comment, top-level layout, nested archives (reported only), suspicious entries (path traversal, absolute paths, links that escape, device files, duplicates, Windows-reserved names) and an "Extraction verdict" saying whether extract_archive would accept it. password: only for ZipCrypto zips (standard-library limit; AES zips are unsupported). encoding: re-decode legacy zip names that are not flagged UTF-8, e.g. cp857 or cp1254 for Turkish, cp932 Japanese, gbk Chinese, cp1251 Russian (default cp437, as zip specifies). |
| list_entriesA | List archive members without extracting. glob filters by full path or, when it has no '/', by file name (e.g. '.py', 'src/'). tree=true renders an indented tree instead of one line per entry (kind, size, mtime, name; '!!' marks entries extract_archive would refuse). limit caps the output (default 200); the rest is summarized as a count. |
| read_entryA | Preview ONE member without extracting the rest. Returns UTF-8 text when the member is text, otherwise a hex dump of the first 512 bytes. max_bytes caps what is read (default 64 KiB, hard cap 1 MiB); the header says if it was truncated. member is the exact name shown by list_entries. |
| search_in_archiveA | Grep text members inside an archive without extracting it. pattern is a Python regular expression, matched per line. glob narrows which members are searched. Binary members are skipped and counted; each member is read at most 5 MiB and the whole search at most 64 MiB, and the result says when a cap was hit. Output lines look like 'member/name:LINE: text'. |
| extract_archiveA | Safely extract an archive (all of it, or selected members) into dest. Everything is checked BEFORE the first byte is written; if anything is unsafe the whole call is refused and nothing is written. Refused: '..' traversal, absolute and drive-letter paths, backslash tricks, symlinks that point outside dest (or through a link), hardlinks, device/FIFO files, duplicate names, and decompression bombs (too large, too high a compression ratio, too many entries). Nested archives are NOT extracted. members: names, directory prefixes ('src/') or globs ('*.txt'); use it to take only the safe entries from an archive that was refused. Existing files are never overwritten unless overwrite=true. dry_run=true validates and lists what would be written without touching the disk. symlinks='skip' (default) reports links instead of creating them; 'create' makes in-bounds links (needs privileges on Windows). If a failure happens mid-way, files created by this call are removed. max_total_mb / max_ratio / max_entries can only make the server's limits stricter, never looser. |
| create_archiveA | Create an archive from files and directories. format: zip (default), tar, tar.gz, tar.bz2 or tar.xz. Each source is stored under its own base name (directories recursively). excludes are globs matched against the stored path and against every path component (e.g. ['*.pyc', 'pycache', '.git']). deterministic=true fixes timestamps, owners, permissions and ordering, so the same inputs give byte-identical output (the sha256 is returned). Symlinks in the sources are refused; the output file is never overwritten unless overwrite=true. Zips cannot be encrypted (standard-library limit). |
| verify_archiveA | Test archive integrity by decompressing every file and checking CRCs/checksums. Writes nothing. Returns 'OK ...' or 'FAILED ...' with the bad members. Encrypted members are only verified when password is given. |
Prompts
Interactive templates invoked by user choice
| Name | Description |
|---|---|
No prompts | |
Resources
Contextual data attached and managed by the client
| Name | Description |
|---|---|
No resources | |
TDQS
Scored across 7 tools
Each tool has a clearly distinct role: preview one member, list members, search text, summarize metadata and safety, verify integrity, extract, or create. The closest overlap is archive_info versus list_entries, but archive_info's summary/verdict focus versus list_entries' filterable member listing keeps the boundary clear.
All names use snake_case, and six of seven are clear verb_noun forms such as read_entry, create_archive, and extract_archive. archive_info is the lone noun-led outlier, so the convention is mostly consistent but not perfect.
Seven tools are well-scoped for an archive handling server. Each covers a necessary operation (create, inspect, read, search, verify, extract) without excessive surface area.
The surface covers the core archive lifecycle: creating archives, inspecting and listing contents, previewing and searching members, verifying integrity, and safely extracting. Advanced archive-editing operations are absent, but they fall outside the apparent unpacking-focused scope.