Skip to main content
Glama
xoy8n

WebP Conversion MCP Server

by xoy8n
README.md
# WebP Conversion MCP Server

This project is a Model Context Protocol (MCP) server that converts image files to WebP format.

## Features

- Convert PNG, JPG, and JPEG files to WebP
- Support for single image or batch image conversion
- Option to configure quality and lossless compression
- Option to keep original files
- Provides a detailed report of the conversion result

### Installation & Execution

```bash
npx -y @xoy8n/webp-converter@latest
```

### Cursor mcp.json Configuration

```json
{
  "mcpServers": {
    "webp-converter": {
      "command": "npx",
      "args": ["-y", "@xoy8n/webp-converter@latest"]
    }
  }
}
```

## MCP Tool List

### 1. convert_to_webp

Converts a single image file to WebP format.

**Parameters:**

- `image_path`: Path to the image file to convert
- `base_path`: Base directory path
- `quality`: WebP quality setting (default: 95)
- `lossless`: Whether to use lossless compression (default: false)
- `keep_original`: Whether to retain the original file (default: false)

**Returns:**

- Conversion success status
- Input/output file paths
- File size before/after conversion
- Applied quality and compression settings

### 2. batch_convert_to_webp

Converts multiple image files to WebP format in one go.

**Parameters:**

- `image_paths`: Array of paths to image files to convert
- `base_path`: Base directory path (optional)
- `quality`: WebP quality setting (default: 95)
- `lossless`: Whether to use lossless compression (default: false)
- `keep_original`: Whether to retain the original files (default: false)

**Returns:**

- Array of conversion results for each image file

## How to Use

1. Select the image files you want to convert.
2. Run the `convert_to_webp` or `batch_convert_to_webp` command via the MCP tools.
3. Check the conversion results.

[![MCP Badge](https://lobehub.com/badge/mcp-full/xoy8n-webp-converter?theme=light)](https://lobehub.com/mcp/xoy8n-webp-converter)

## License

MIT

TDQS

D1.8/5.0

Scored across 2 tools

Disambiguation4/5

Despite lacking descriptions, the names clearly distinguish between single and batch conversion, reducing ambiguity for an agent.

Naming Consistency5/5

Both tools follow a consistent verb_noun pattern with snake_case ('convert_to_webp', 'batch_convert_to_webp').

Tool Count3/5

With only two tools, the server feels thin for a conversion domain, but it covers the essential single and batch operations.

Completeness3/5

Basic conversion functionality is present, but missing tools for settings, status, or output management, making it minimally complete.

Maintenance

ActivityInactive
ResponsivenessNo issues