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.0.tar.gz (4.6 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.0-py3-none-any.whl (5.6 kB view details)

Uploaded Python 3

File details

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

File metadata

  • Download URL: mcp_image_zoom-0.1.0.tar.gz
  • Upload date:
  • Size: 4.6 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.0.tar.gz
Algorithm Hash digest
SHA256 3112aa94057c9113da553f1d6a73f3408ac0232e3ebf2f2f727538fda6eb563b
MD5 12e2bdd312c60c4be7c673d139f7dc30
BLAKE2b-256 e950c6e799ccf705e87c537e5a689688522989b420070cfa670d1f74711262a3

See more details on using hashes here.

File details

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

File metadata

  • Download URL: mcp_image_zoom-0.1.0-py3-none-any.whl
  • Upload date:
  • Size: 5.6 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.0-py3-none-any.whl
Algorithm Hash digest
SHA256 4e6a561c739669d334d981c34c09ae18cdda4420fa66e5168ec964e7c2b797d4
MD5 b258d63eb3d1ddb5a709d6974e2908af
BLAKE2b-256 1a767753d299535b039dc87934b2390f20b7f6138a795b9f0dc2afa7ef1c35d5

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