Skip to main content

MCP server for image zoom-in tool, crop and resize image regions for detailed analysis

Project description

MCP Image Zoom-In Tool

A Model Context Protocol (MCP) server that provides image zoom-in capabilities for AI models.

Features

  • Image Cropping: Crop specific regions from images using bounding box coordinates
  • Smart Resizing: Automatically resize cropped images for Vision Transformer compatibility
  • Multiple Input Sources: Support for URLs, local files, and base64 encoded images
  • Relative Coordinates: Use normalized [0, 1000] coordinate system

Installation

# Using uvx (recommended for MCP)
uvx mcp-image-zoom

# Using pip
pip install mcp-image-zoom

Usage

As MCP Server

Run the server directly:

mcp-image-zoom

MCP Configuration

Add to your MCP client configuration:

{
  "mcpServers": {
    "image-zoom": {
      "command": "uvx",
      "args": ["mcp-image-zoom"]
    }
  }
}

Available Tools

image_zoom_in

Zoom in on a specific region of an image.

Parameters:

  • image_source (string): Image URL, file path, or base64 string
  • bbox_x1 (number): Left edge (0-1000)
  • bbox_y1 (number): Top edge (0-1000)
  • bbox_x2 (number): Right edge (0-1000)
  • bbox_y2 (number): Bottom edge (0-1000)
  • label (string, optional): Region label

Returns:

  • cropped_image: Base64 encoded cropped image
  • original_size: [width, height]
  • crop_region: [x1, y1, x2, y2] in pixels
  • output_size: [width, height] of output

get_image_info

Get basic information about an image.

Parameters:

  • image_source (string): Image URL, file path, or base64 string

Returns:

  • width, height: Image dimensions
  • format: Image format
  • mode: Color mode

Coordinate System

The tool uses relative coordinates [0, 1000]:

  • (0, 0) = top-left corner
  • (1000, 1000) = bottom-right corner

Example: To crop the center-right region:

{
  "bbox_x1": 500,
  "bbox_y1": 250,
  "bbox_x2": 1000,
  "bbox_y2": 750
}

License

Apache-2.0

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

mcp_image_zoom-0.1.1.tar.gz (4.8 kB view details)

Uploaded Source

Built Distribution

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

mcp_image_zoom-0.1.1-py3-none-any.whl (5.8 kB view details)

Uploaded Python 3

File details

Details for the file mcp_image_zoom-0.1.1.tar.gz.

File metadata

  • Download URL: mcp_image_zoom-0.1.1.tar.gz
  • Upload date:
  • Size: 4.8 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.2.0 CPython/3.11.14

File hashes

Hashes for mcp_image_zoom-0.1.1.tar.gz
Algorithm Hash digest
SHA256 b73a1d9c44d10f5db8f4c1f7acef8aeae47d42be1b8f701557648263fa569a63
MD5 d75c7cf415f57496c5fca3d865a5356e
BLAKE2b-256 3b03098fa89b3539d21f5aa6694ff79a0475d165f3e0b357e76da0b3d9e63b77

See more details on using hashes here.

File details

Details for the file mcp_image_zoom-0.1.1-py3-none-any.whl.

File metadata

  • Download URL: mcp_image_zoom-0.1.1-py3-none-any.whl
  • Upload date:
  • Size: 5.8 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.2.0 CPython/3.11.14

File hashes

Hashes for mcp_image_zoom-0.1.1-py3-none-any.whl
Algorithm Hash digest
SHA256 e27a60ccb58b6d6fc81e491a478b49ec090c3577d2412e3b8a82a40a7fa54c42
MD5 9a86cbe13ac66f5df04d81238dcac5f4
BLAKE2b-256 d711ef047ab19457aff0e5f13861696281537b71a9dc8456e875f55b4b6eda86

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