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 stringbbox_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 imageoriginal_size: [width, height]crop_region: [x1, y1, x2, y2] in pixelsoutput_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 dimensionsformat: Image formatmode: 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
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
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
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
b73a1d9c44d10f5db8f4c1f7acef8aeae47d42be1b8f701557648263fa569a63
|
|
| MD5 |
d75c7cf415f57496c5fca3d865a5356e
|
|
| BLAKE2b-256 |
3b03098fa89b3539d21f5aa6694ff79a0475d165f3e0b357e76da0b3d9e63b77
|
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
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
e27a60ccb58b6d6fc81e491a478b49ec090c3577d2412e3b8a82a40a7fa54c42
|
|
| MD5 |
9a86cbe13ac66f5df04d81238dcac5f4
|
|
| BLAKE2b-256 |
d711ef047ab19457aff0e5f13861696281537b71a9dc8456e875f55b4b6eda86
|