New Research: Supply Chain Attack on Axios Pulls Malicious Dependency from npm.Details
Socket
Book a DemoSign in
Socket

image-processing-server

Package Overview
Dependencies
Maintainers
1
Versions
7
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

image-processing-server

An MCP server for image processing using JIMP library

latest
npmnpm
Version
1.0.6
Version published
Weekly downloads
1
Maintainers
1
Weekly downloads
 
Created
Source

Image Processing MCP Server

A microservice for image processing based on FastMCP and Jimp, providing multiple image processing capabilities.

Introduction

The Image Processing MCP Server is a feature-rich image processing service that supports various common image operations, including resizing, cropping, rotating, drawing shapes, adding watermarks, edge detection, grayscale conversion, Gaussian blur, thresholding, and flipping. The service provides interfaces through the Model Context Protocol (MCP) and can be easily integrated into AI applications.

Features List

  • Resize - Resize images to specified dimensions
  • Crop - Crop a specified area of an image
  • Rotate - Rotate images by a specified angle
  • Draw Shape - Draw rectangles or circles on images
  • Concatenate - Horizontally or vertically concatenate multiple images
  • Edge Detection - Detect edges in images
  • Grayscale - Convert images to grayscale
  • Gaussian Blur - Apply Gaussian blur to images
  • Threshold - Apply threshold processing to images
  • Flip - Horizontally, vertically, or bidirectionally flip images

Installation and Running

Requirements

  • Node.js (version 16 or higher)
  • npm (usually installed with Node.js)

Installation Steps

  • Clone or download the project code

  • Navigate to the server directory:

    cd server
    
  • Install dependencies:

    npm install
    
  • Compile TypeScript code:

    npm run build
    

Running the Server

npm start

The server will start on the default port and listen for MCP connections.

Tool Details

1. Resize

Resize an image to specified width and height.

Parameters:

  • imagePath: Image file path or URL
  • width: Target width
  • height: Target height

2. Crop

Crop a specified area of an image.

Parameters:

  • imagePath: Image file path or URL
  • x: X-coordinate of the top-left corner of the crop area
  • y: Y-coordinate of the top-left corner of the crop area
  • width: Width of the crop area
  • height: Height of the crop area

3. Rotate

Rotate an image by a specified angle.

Parameters:

  • imagePath: Image file path or URL
  • degrees: Rotation angle (0-360)

4. Draw Shape

Draw rectangles or circles on an image.

Parameters:

  • imagePath: Image file path or URL
  • shape: Shape type ('rectangle' or 'circle')
  • x: Starting point x-coordinate
  • y: Starting point y-coordinate
  • width: Shape width
  • height: Shape height
  • color: Color (hexadecimal)

5. Concatenate

Horizontally or vertically concatenate multiple images.

Parameters:

  • imagePaths: Array of image paths
  • direction: Concatenation direction ('horizontal' or 'vertical')

6. Edge Detection

Detect edges in an image.

Parameters:

  • imagePath: Image file path or URL

7. Grayscale

Convert an image to grayscale.

Parameters:

  • imagePath: Image file path or URL

8. Gaussian Blur

Apply Gaussian blur to an image.

Parameters:

  • imagePath: Image file path or URL
  • radius: Blur radius

9. Threshold

Apply threshold processing to an image.

Parameters:

  • imagePath: Image file path or URL
  • thresholdValue: Threshold value (0-255)

10. Flip

Horizontally, vertically, or bidirectionally flip an image.

Parameters:

  • imagePath: Image file path or URL
  • direction: Flip direction ('horizontal', 'vertical', 'both')

Usage Examples

After connecting to the server through an MCP client, you can call any of the above tools for image processing.

For example, to resize an image:

{
  "tool": "resize",
  "arguments": {
    "imagePath": "/path/to/image.jpg",
    "width": 800,
    "height": 600
  }
}

Return Format

All tools return a unified JSON format:

{
  "status": true,
  "outputPath": "/path/to/output/image.jpg",
  "imgData": "base64_encoded_image_data",
  "error": ""
}
  • status: Whether the operation was successful
  • outputPath: Output file path (for local files)
  • imgData: Base64 encoded image data (for web images)
  • error: Error message (if any)

Technology Stack

  • TypeScript
  • FastMCP - Model Context Protocol framework
  • Jimp - Image processing library
  • Zod - Parameter validation library

Keywords

mcp

FAQs

Package last updated on 14 Nov 2025

Did you know?

Socket

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts