
7gugu/zip-mcp
Developer toolsこのページは AI により自動翻訳されています。技術的な詳細は原文をご確認ください。 原文を見る
ローカルファイルを圧縮し、解凍する機能でAIを提供するMCPツール.
概要
ZIP MCPの特長 Server は、モデルコンテキストプロトコル (MCP) を実装し、fastMCP と zip.js に基づく圧縮サーバーです。 このプロジェクトは、完全にパラメータ制御ZIP圧縮、減圧、およびクエリ圧縮パッケージ情報機能を提供します。 - ファイルとデータの圧縮と減圧をサポート - 複数のファイルパッケージ圧縮をサポート - 圧縮レベル制御(0-9)を提供 - パスワード保護と暗号化強度の設定をサポート - 圧縮されたパッケージメタデータのためのクエリ機能を提供します - パストラバール書き込みを防ぐための圧縮上のZIPエントリパスを検証 以前のバージョンでは、decompress ツールで任意のファイル書き込みの問題を書き換えます: 悪意のある ZIP エントリ名 (例えば ./outside.txt) は、以前に出力ディレクトリと組み合わされ、意図した抽出ルートの外側に書かれている可能性があります。 抽出は、出力ルートを一度解決し、各エントリパスを検証し、絶対パス、ドライブレッタパスを拒絶します.
概要(AI 翻訳)
日本語 | English
プロジェクト紹介
ZIP MCPの特長 Server は、モデルコンテキストプロトコル (MCP) を実装し、fastMCP と zip.js に基づく圧縮サーバーです。 このプロジェクトは、完全にパラメータ制御ZIP圧縮、減圧、およびクエリ圧縮パッケージ情報機能を提供します。
##特徴
- ファイルとデータの圧縮と減圧をサポート
- 複数のファイル包装圧縮をサポート
- 圧縮レベル制御(0-9)を提供して下さい
- パスワード保護と暗号化強度の設定をサポート
- 圧縮されたパッケージメタデータのための問い合わせ機能を提供して下さい
- パスの横断的な書き込みを防ぐため、ZIPエントリーパスを非圧縮で検証
セキュリティ
Versions 1.0.6 以降は [decompress]] で任意のファイル書き込みの問題を修正します。悪意のある ZIP エントリ名 (例えば ../outside.txt)) は、以前に出力ディレクトリと意図した抽出ルートの外側に書き込むことができます。 抽出は出力ルートを一度解決し、各エントリパスを検証し、絶対パス、ドライブレッタパス、[..]セグメント、出力ディレクトリをエスケープする任意のパスを拒否します。
Ryan*([email protected])は、本件を責任をもって報告しています.
このページは AI により自動翻訳されています。技術的な詳細は原文をご確認ください。
README
以下は原文 README の抜粋です。原文を見る。
ZIP MCP Server
中文 | English
Project Introduction
ZIP MCP Server is a compression server based on fastMCP and zip.js, implementing the Model Context Protocol (MCP). This project provides fully parameter-controlled ZIP compression, decompression, and query compression package information functions.
Features
- Supports compression and decompression of files and data
- Supports multi-file packaging compression
- Provides compression level control (0-9)
- Supports password protection and encryption strength settings
- Provides query function for compressed package metadata
- Validates ZIP entry paths on decompression to prevent path traversal writes
Security
Versions 1.0.6 and later fix an arbitrary file write issue in the decompress tool: malicious ZIP entry names (for example ../outside.txt) could previously be joined with the output directory and written outside the intended extraction root. Extraction now resolves the output root once, validates each entry path, and rejects absolute paths, drive-letter paths, .. segments, and any path that would escape the output directory.
Thanks to Ryan ([email protected]) for responsibly reporting this issue.
Project Structure
zip-mcp
├── src
│ ├── index.ts # Application entry point
│ ├── utils
│ │ ├── compression.ts # Compression and decompression implementation
│ │ └── safePath.ts # Safe ZIP entry path validation
├── tsconfig.json # TypeScript configuration file
├── package.json # npm configuration file
└── README.md # Project documentation
Installation
You can install ZIP MCP Server globally using npm:
npm install -g zip-mcp
MCP Configuration
After installation, you can configure ZIP MCP in your MCP JSON configuration:
{
"mcpServers": {
"zip-mcp": {
"command": "zip-mcp",
"args": []
}
}
}
Configure the MCP JSON in the AI Client
- Claude Client: https://modelcontextprotocol.io/quickstart/user
- Raycast: requires installing the MCP plugin
- Cursor: https://docs.cursor.com/context/model-context-protocol#configuring-mcp-servers
MCP Tool Description
ZIP MCP Server provides the following tools, which can be called through the MCP protocol:
Compression Tool (compress)
Compress local files or directories into a ZIP file.
Parameters:
input: Path of the file or directory to be compressed (string or string array)output: Path of the output ZIP fileoptions: Compression options (optional)level: Compression level (0-9, default is 5)
インストール
This server does not publish a one-line install command.
Open the repository installation guide MCP 初心者?mcpskill.org のガイドから始めましょう →設定
{
"mcpServers": {
"zip-mcp": {
"command": "zip-mcp",
"args": []
}
}
}