7gugu_zip_mcp

7gugu_zip_mcp

by 7gugu
An MCP server enabling AI to compress and decompress local files using ZIP operations.

ZIP MCP Server: AI-Powered File Compression and Decompression

Overview

The ZIP MCP Server is a compression server built on fastMCP and zip.js, implementing the Model Context Protocol (MCP). This project enables AI systems to compress, decompress, and query ZIP files with full parameter control, making it a powerful tool for managing local files and directories.

Features

  • Compression and Decompression: Supports compressing and decompressing files and data.
  • Multi-File Packaging: Allows packaging multiple files into a single ZIP archive.
  • Compression Level Control: Adjust compression levels from 0 to 9.
  • Password Protection: Secure ZIP files with passwords and encryption strength settings.
  • Metadata Query: Retrieve detailed information about compressed packages.

Project Structure

The project is organized as follows:

zip-mcp
├── src
│   ├── index.ts               # Application entry point
│   ├── utils
│   │   └── compression.ts     # Compression and decompression implementation
├── tsconfig.json              # TypeScript configuration file
├── package.json               # npm configuration file
└── README.md                  # Project documentation

Installation and Usage

  1. Clone the project:
    shell git clone <repository-url> cd zip-mcp
  2. Install dependencies:
    shell npm install
  3. Generate MCP JSON:
    shell npm run json
    json { "mcpServers": { "zip-mcp": { "command": "npx", "args": [ "tsx", "<ABSOLUTE PATH>src/index.ts" ] } } }
  4. Configure the MCP JSON in your AI client.

Tools

Compression Tool (compress)

Compress files or directories into a ZIP file.

Parameters:
- input: Path of the file or directory to compress.
- output: Path of the output ZIP file.
- options: Optional settings like compression level, password, and overwrite behavior.

Decompression Tool (decompress)

Decompress ZIP files to a specified directory.

Parameters:
- input: Path of the ZIP file.
- output: Path of the output directory.
- options: Optional settings like password and overwrite behavior.

ZIP Info Tool (getZipInfo)

Retrieve metadata about a ZIP file.

Parameters:
- input: Path of the ZIP file.
- options: Optional settings like password.

Test Tool (echo)

Test the service by returning a message.

Parameters:
- message: Message to return.

Examples

// Compress files
await client.executeTool("compress", {
  input: "/path/to/files/or/directory",
  output: "/path/to/output.zip",
  options: {
    level: 9,
    comment: "Test compression",
    password: "secret",
    overwrite: true,
  },
});

// Decompress files
await client.executeTool("decompress", {
  input: "/path/to/archive.zip",
  output: "/path/to/extract/directory",
  options: {
    password: "secret",
    overwrite: true,
    createDirectories: true,
  },
});

// Get ZIP info
await client.executeTool("getZipInfo", {
  input: "/path/to/archive.zip",
  options: {
    password: "secret",
  },
});

// Test service
await client.executeTool("echo", {
  message: "Hello, ZIP MCP Server!",
});

Contact

License

This project is licensed under the MIT License.

Features & Capabilities

Categories
mcp_server model_context_protocol typescript compression decompression zip api_integration claude

Implementation Details

Stats

0 Views
6 GitHub Stars

Repository Info

7gugu Organization

Similar MCP Servers

continuedev_continue by continuedev
25049
21423
9300