Skip to main content

Model Context Protocol Server for Image File Format Conversion

Project description

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

pip install image-convertor-mcp

Development Installation

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

{
  "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

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.5

  • Bug Fix: Added warning capture to auto_convert_folder_tool to resolve "stuck processing" issue
  • Improvement: All MCP tools now provide comprehensive warning reporting and transparency
  • Consistency: Unified warning capture implementation across all tools for better user experience

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 file for details.

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

image_convertor_mcp-0.1.5.tar.gz (18.2 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

image_convertor_mcp-0.1.5-py3-none-any.whl (21.9 kB view details)

Uploaded Python 3

File details

Details for the file image_convertor_mcp-0.1.5.tar.gz.

File metadata

  • Download URL: image_convertor_mcp-0.1.5.tar.gz
  • Upload date:
  • Size: 18.2 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.1.0 CPython/3.13.3

File hashes

Hashes for image_convertor_mcp-0.1.5.tar.gz
Algorithm Hash digest
SHA256 cd1d2490ffb8b045069c4d862bb0d8ce735c1097c3a417b59e671166dcf70f7b
MD5 f09c6b36175b0c7ddbec7c87e442dff9
BLAKE2b-256 56579bf01a0416d4bdd1c135112bfc1920ece434fe4a6a74b4e7461fc3874186

See more details on using hashes here.

File details

Details for the file image_convertor_mcp-0.1.5-py3-none-any.whl.

File metadata

File hashes

Hashes for image_convertor_mcp-0.1.5-py3-none-any.whl
Algorithm Hash digest
SHA256 61566fe9a86eb3796d6f563e40f1cee611969befe6e2ed1f8051d5469eaf1ac1
MD5 e661a7ddd1d5b9ba02ff6cc1cf43e901
BLAKE2b-256 c461a97e40bdd18bad509dbbee5549d3b9e8c650e1a6a50d788df9814f0a171e

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page