Metadata-Version: 2.4
Name: image-convertor-mcp
Version: 0.1.4
Summary: Model Context Protocol Server for Image File Format Conversion
Project-URL: Homepage, https://github.com/Beta0415/image-convertor-mcp
Project-URL: Repository, https://github.com/Beta0415/image-convertor-mcp
Project-URL: Documentation, https://github.com/Beta0415/image-convertor-mcp#readme
Project-URL: Issues, https://github.com/Beta0415/image-convertor-mcp/issues
Author: Beta
Maintainer: Beta
License: MIT License
        
        Copyright (c) 2024 Beta
        
        Permission is hereby granted, free of charge, to any person obtaining a copy
        of this software and associated documentation files (the "Software"), to deal
        in the Software without restriction, including without limitation the rights
        to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
        copies of the Software, and to permit persons to whom the Software is
        furnished to do so, subject to the following conditions:
        
        The above copyright notice and this permission notice shall be included in all
        copies or substantial portions of the Software.
        
        THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
        IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
        FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
        AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
        LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
        OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
        SOFTWARE.
License-File: LICENSE
Keywords: gif,image-conversion,image-processing,mcp,model-context-protocol,pdf
Classifier: Development Status :: 4 - Beta
Classifier: Intended Audience :: Developers
Classifier: License :: OSI Approved :: MIT License
Classifier: Operating System :: OS Independent
Classifier: Programming Language :: Python :: 3
Classifier: Programming Language :: Python :: 3.9
Classifier: Programming Language :: Python :: 3.10
Classifier: Programming Language :: Python :: 3.11
Classifier: Programming Language :: Python :: 3.12
Classifier: Topic :: Multimedia :: Graphics :: Graphics Conversion
Classifier: Topic :: Scientific/Engineering :: Image Processing
Classifier: Topic :: Software Development :: Libraries :: Python Modules
Requires-Python: >=3.9
Requires-Dist: mcp>=0.1.0
Requires-Dist: pillow-heif>=0.15.0
Requires-Dist: pillow>=10.0.0
Requires-Dist: reportlab>=4.0.0
Description-Content-Type: text/markdown

# Image Convertor MCP

A Model Context Protocol (MCP) server that provides comprehensive image conversion and processing tools.

## Features

- **General Image Conversion**: Convert between various image formats (JPEG, PNG, BMP, TIFF, ICO, WEBP, HEIC/HEIF, AVIF, GIF)
- **Batch Processing**: Convert entire folders of images to a target format
- **GIF Creation**: Convert multiple images to animated GIFs with customization options
- **PDF Generation**: Combine multiple images into a single PDF document
- **Smart Naming**: Automatic file naming with duplicate prevention
- **Format Detection**: Auto-detect input image formats
- **Quality Control**: Optimize ICO files with multiple resolutions

## Installation

### From PyPI
```bash
pip install image-convertor-mcp
```

### Development Installation
```bash
git clone https://github.com/beta/image-convertor-mcp
cd image-convertor-mcp
pip install -e .
```

## Configuration

No special configuration required. The server runs with default settings.

### Example MCP Configuration

```json
{
  "mcpServers": {
    "Image Convertor MCP": {
      "command": "uvx",
      "args": ["image-convertor-mcp"],
      "env": {}
    }
  }
}
```

## Available Tools

### General Image Conversion
- `auto_convert_image(input_path:str, target_format:str, output_dir:str=None, file_name:str=None)` - Convert a single image to target format
- `auto_convert_folder(input_folder:str, target_format:str, output_dir:str=None)` - Convert all images in a folder to target format

### GIF Creation
- `convert_images_to_gif(input_folder:str, custom_name:str=None, duration:int=100, loop:int=0, color_mode:str="RGB", color_count:int=256, brightness:float=1.0, contrast:float=1.0, saturation:float=1.0, ping_pong:bool=False, easing:str="none", easing_strength:float=1.0)` - Convert multiple images to animated GIF

### PDF Generation
- `convert_images_to_pdf(input_folder:str, output_dir:str=None, output_name:str=None, sort_order:str="alphabetical", page_size:str="A4", dpi:int=300, fit_to_page:bool=True, center_image:bool=True, background_color:str="white")` - Combine multiple images into PDF

## Supported Formats

### Input Formats
- JPEG (.jpg, .jpeg)
- PNG (.png)
- BMP (.bmp)
- TIFF (.tif, .tiff)
- ICO (.ico)
- WEBP (.webp)
- HEIC/HEIF (.heic, .heif)
- AVIF (.avif)
- GIF (.gif)

### Output Formats
- JPEG (.jpg)
- PNG (.png)
- BMP (.bmp)
- TIFF (.tif)
- ICO (.ico)
- WEBP (.webp)
- HEIC/HEIF (.heic)
- AVIF (.avif)
- GIF (.gif)
- PDF (.pdf)

## Usage

### Command Line
```bash
image-convertor-mcp
```

### As MCP Server
The server runs over stdio and can be integrated with any MCP-compatible client.

## Requirements

- Python 3.9+
- Pillow (PIL) for image processing
- pillow-heif for HEIC/HEIF support
- reportlab for PDF generation
- Internet connection (for some format conversions)

## Changelog

### Version 0.1.4
- **Feature**: Added comprehensive warning capture and reporting for MCP tools with optional parameters
- **Feature**: Enhanced user transparency - MCP clients now receive detailed information about parameter fallbacks and corrections
- **Improvement**: Better error reporting - users see exactly what happened during tool execution, including any warnings
- **Maintenance**: Streamlined codebase with simple, reliable memory management using garbage collection
- **Reliability**: Fixed MCP tool execution issues and ensured consistent, stable performance

### Version 0.1.1
- Initial release with core image conversion functionality

## License

This project is licensed under the MIT License - see the [LICENSE](LICENSE) file for details.