ZIP MCP 服务器
中文| English
项目介绍
ZIP MCP Server 是一个基于 fastMCP 和 zip.js 的压缩服务器,实现了模型上下文协议 (MCP)。该项目提供完全参数控制的 ZIP 压缩、解压以及查询压缩包信息功能。
特征
支持文件和数据的压缩和解压
支持多文件打包压缩
提供压缩级别控制(0-9)
支持密码保护和加密强度设置
提供压缩包元数据的查询功能
项目结构
安装
您可以使用 npm 全局安装 ZIP MCP 服务器:
MCP 配置
安装后,您可以在 MCP JSON 配置中配置 ZIP MCP:
在 AI 客户端中配置 MCP JSON
Claude 客户端: https://modelcontextprotocol.io/quickstart/user
Raycast:需要安装 MCP 插件
光标: https://docs.cursor.com/context/model-context-protocol#configuring-mcp-servers
MCP 工具描述
ZIP MCP Server 提供了以下工具,可以通过 MCP 协议调用:
压缩工具(压缩)
将本地文件或目录压缩为 ZIP 文件。
参数:
input
:要压缩的文件或目录的路径(字符串或字符串数组)output
:输出 ZIP 文件的路径options
:压缩选项(可选)level
:压缩级别(0-9,默认为5)password
:密码保护encryptionStrength
:加密强度(1-3)overwrite
:是否覆盖现有文件(布尔值)
返回:
成功:包含成功信息的文本内容
失败:包含错误信息的文本内容
解压工具(decompress)
将本地ZIP文件解压到指定目录。
参数:
input
:ZIP 文件的路径output
:输出目录的路径options
:解压缩选项(可选)password
:解压密码overwrite
:是否覆盖现有文件(布尔值)createDirectories
:是否创建不存在的目录(布尔值)
返回:
成功:包含解压结果信息的文本内容
失败:包含错误信息的文本内容
ZIP 信息工具 (getZipInfo)
获取本地ZIP文件的元数据信息。
参数:
input
:ZIP 文件的路径options
:选项(可选)password
:解压密码
返回:
成功:包含ZIP文件详细信息的文本内容,包括:
文件总数
总大小
压缩尺寸
压缩比
每个文件的详细信息
失败:包含错误信息的文本内容
测试工具(echo)
返回输入消息来测试服务是否正常运行。
参数:
message
:要返回的消息
返回:
包含输入消息和当前时间戳的文本内容
示例
使用 MCP 客户端调用工具的示例:
接触
邮箱: gz7gugu@qq.com
local-only server
The server can only run on the client's local machine because it depends on local resources.
为AI提供压缩和解压本地文件功能的MCP工具。
Related MCP Servers
- -securityAlicense-qualityAn MCP server that provides multiple file conversion tools for AI agents, supporting various document and image format conversions including DOCX to PDF, PDF to DOCX, image conversions, Excel to CSV, HTML to PDF, and Markdown to PDF.Last updated -17MIT License
- AsecurityAlicenseAqualityAn MCP server that implements Claude Code-like functionality, allowing the AI to analyze codebases, modify files, execute commands, and manage projects through direct file system interactions.Last updated -15265MIT License
- -securityAlicense-qualityA comprehensive MCP (Model Context Protocol) server for file system operations, providing Claude and other AI assistants with access to local files and directories.Last updated -1MIT License
- AsecurityAlicenseAqualityA powerful MCP tool for parsing and manipulating MIDI files that allows users to read, analyze, and modify MIDI files through natural language commands, supporting operations like reading file information, modifying tracks, adding notes, and setting tempo.Last updated -11377MIT License