背景图片

zipic-mcp-server

Developer Tools

Description

A Swift implementation of a Model Context Protocol server for image compression, enabling LLMs to compress and optimize images through simple and advanced tools.

Author

okooo5km

Created Date

2024-12-01

Tutorial

Learn how to use this MCP server

Step 1: Install the Server

Option 1: One-Line Installation (curl)

bash curl -fsSL https://raw.githubusercontent.com/okooo5km/zipic-mcp-server/main/install.sh | bash

Option 2: Build from Source

  1. Clone the repository: bash git clone https://github.com/okooo5km/zipic-mcp-server.git cd zipic-mcp-server

  2. Build the project: bash swift build -c release

  3. Install the binary: bash mkdir -p ~/.local/bin cp $(swift build -c release --show-bin-path)/zipic-mcp-server ~/.local/bin/ echo 'export PATH="$HOME/.local/bin:$PATH"' >> ~/.zshrc source ~/.zshrc

Step 2: Configure for LLMs

Configure for Claude.app

Add to your Claude settings:

"mcpServers": { "zipic": { "command": "zipic-mcp-server" } }

Configure for Cursor

Add the following configuration to your Cursor editor's Settings - mcp.json:

{ "mcpServers": { "zipic": { "command": "zipic-mcp-server" } } }

Step 3: Use the Server

Quick Compression

{ "urls": [ "/Users/username/Desktop/photo.jpg", "/Users/username/Pictures/vacation" ] }

Advanced Compression

{ "urls": ["/Users/username/Desktop/photo.jpg"], "level": 2, "format": "webp", "width": 1200, "height": 0 }