Skip to main content
Glama

mcp_images

MCP server for raster image manipulation — Pillow + OpenCV. 25 tools across draw, filter, transform, metadata, and analysis categories.

Requires pi-mcp-bridge to connect to pi.

Installation

# Base install (Pillow + ImageMagick/Wand)
pip install git+https://github.com/timaliev/mcp_images.git

# Or via uv:
uv tool install git+https://github.com/timaliev/mcp_images.git

Optional dependencies

Extra

Packages

Tools enabled

[analysis]

scikit-image, pyzbar, rembg

raster_diff, raster_qr, raster_bgremove

# With analysis extras:
pip install "git+https://github.com/timaliev/mcp_images.git#egg=mcp-images[analysis]"

# Or via uv:
uv tool install "git+https://github.com/timaliev/mcp_images.git#egg=mcp-images[analysis]"

ImageMagick must be installed separately via system package manager:

brew install imagemagick          # macOS
apt install imagemagick           # Debian/Ubuntu

Related MCP server: Image Processor MCP Server

Configuration

With pi-mcp-bridge

First install pi-mcp-bridge:

pi add mcp-bridge
# or manually:
# git clone https://github.com/timaliev/pi-mcp-bridge ~/.pi/agent/extensions/pi-mcp-bridge

Then configure mcp-images in ~/.pi/agent/settings.json:

{
  "mcpBridge": {
    "servers": [
      {
        "name": "raster",
        "command": "mcp-images",
        "args": [],
        "setupCommands": [
          "uv tool install --force --python 3.11 \"mcp-images[analysis] @ git+https://github.com/timaliev/mcp_images.git\""
        ]
      }
    ]
  }
}

Standalone MCP client

In ~/.mcp.json:

{
  "mcpServers": {
    "raster": {
      "command": "mcp-images",
      "args": []
    }
  }
}

Backends

Core tools accept an optional backend parameter ("pillow" or "magick").

Backend

Library

Strengths

pillow (default)

Pillow + OpenCV

Fast, simple, no extra deps

magick

Wand / ImageMagick

HEIC/AVIF/GIF, 40+ resize filters, industry-standard unsharp mask

# Use ImageMagick for HEIC conversion
raster_convert(path, "heic", backend="magick")

# Mitchell filter resize via ImageMagick
raster_resize(path, width=800, backend="magick")

# Back to Pillow for speed
raster_crop(path, 10, 10, 100, 100, backend="pillow")

Tools (25 total)

Core

Tool

Description

raster_info

Image metadata: dimensions, format, mode, DPI, file size

raster_convert

Convert format (png, jpeg, webp, tiff, bmp). Use fmt parameter

raster_resize

Resize by dimensions, scale, or fit mode

raster_crop

Crop to rectangle

raster_rotate

Rotate by degrees

raster_adjust

Brightness, contrast, saturation, sharpness, gamma

Draw

Tool

Description

raster_text

Overlay text with font size and color

raster_draw

Draw shapes: rect, circle, line, arrow

Filters

Tool

Description

raster_filter

Blur, sharpen, denoise, grayscale, invert, threshold. Use filter_name

raster_enhance

Auto-enhance: contrast, color, sharpness, all

Transform

Tool

Description

raster_perspective

4-point perspective correction

raster_morphology

Morphological ops: dilate, erode, open, close

raster_balance

Auto balance: equalize, autocontrast, auto white

raster_padding

Add border/margin with fill color

raster_channels

Channel ops: extract, swap, reorder

raster_compress

Compress: quality control, metadata stripping

Metadata

Tool

Description

raster_exif

Extract EXIF metadata as dict

raster_colorspace

Convert: RGB, HSV, LAB, grayscale

raster_blend

Alpha-blend two images

raster_contours

Find contours with OpenCV, draw on output

Analysis (requires pip install mcp-images[analysis])

Tool

Description

raster_diff

SSIM structural similarity between two images

raster_histogram

Channel histogram (R/G/B/all)

raster_edge

Canny edge detection

raster_qr

Decode QR codes and barcodes

raster_bgremove

Remove background (returns RGBA)

Development

git clone https://github.com/timaliev/mcp_images.git
cd mcp_images
uv run pytest

Available Tools

8 tools
raster_adjustC

Adjust image properties. Values: 1.0 = no change, >1.0 = increase, <1.0 = decrease.

Inputs: path (required), gamma, output, contrast, +3 more.

raster_convertC

Convert image to another format (png, jpeg, webp, tiff, bmp).

Inputs: path (required), format (required), output, quality.

raster_cropA

Crop image to the specified rectangle (inclusive pixel coordinates).

Inputs: top (required), left (required), path (required), right (required), +2 more.

raster_enhanceC

Auto-enhance image. mode: contrast, color, sharpness, or all.

Inputs: path (required), mode, factor, output.

raster_filterB

Apply a named filter. Supported: blur, gaussian_blur, median, sharpen, edge_enhance, denoise, grayscale, invert, threshold.

Inputs: path (required), filter (required), output, radius, +1 more.

raster_infoA

Return image metadata: dimensions, format, mode, DPI, file size.

Inputs: path (required).

raster_resizeB

Resize image. Provide width/height, scale factor, or fit mode (cover/contain/fill).

Inputs: path (required), fit, scale, width, +2 more.

raster_rotateB

Rotate image by degrees. expand=True enlarges canvas to fit.

Inputs: path (required), degrees (required), expand, output.

Tool Schema Changelog

Recent tool additions, removals, and schema changes observed during successful MCP inspections.

Loading tool schema changelog…

    TDQS

    A3.5/5.0

    Scored across 8 tools

    Disambiguation5/5

    Each tool handles a distinct operation (metadata, conversion, resizing, cropping, rotation, adjustment, filtering, enhancement) with no functional overlap. Descriptions clearly differentiate the actions.

    Naming Consistency5/5

    All tools follow the consistent raster_ prefix followed by a verb (convert, resize, crop, rotate, adjust, filter, enhance) or a noun (info). The pattern is uniform and predictable.

    Tool Count5/5

    Eight tools cover a comprehensive set of image operations without being excessive. Each tool serves a clear purpose, and the count is well-scoped for an image manipulation server.

    Completeness5/5

    The toolset covers the core lifecycle of raster image manipulation: reading metadata, converting formats, geometric transformations, color adjustments, and enhancement. No major gaps are apparent for typical image editing workflows.

    Maintenance

    ActivityInactive
    ResponsivenessNo recent community issues

    Related MCP Connectors

    Related MCP Servers