npm package discovery and stats viewer.

Discover Tips

  • General search

    [free text search, go nuts!]

  • Package details

    pkg:[package-name]

  • User packages

    @[username]

Sponsor

Optimize Toolset

I’ve always been into building performant and accessible sites, but lately I’ve been taking it extremely seriously. So much so that I’ve been building a tool to help me optimize and monitor the sites that I build to make sure that I’m making an attempt to offer the best experience to those who visit them. If you’re into performant, accessible and SEO friendly sites, you might like it too! You can check it out at Optimize Toolset.

About

Hi, 👋, I’m Ryan Hefner  and I built this site for me, and you! The goal of this site was to provide an easy way for me to check the stats on my npm packages, both for prioritizing issues and updates, and to give me a little kick in the pants to keep up on stuff.

As I was building it, I realized that I was actually using the tool to build the tool, and figured I might as well put this out there and hopefully others will find it to be a fast and useful way to search and browse npm packages as I have.

If you’re interested in other things I’m working on, follow me on Twitter or check out the open source projects I’ve been publishing on GitHub.

I am also working on a Twitter bot for this site to tweet the most popular, newest, random packages from npm. Please follow that account now and it will start sending out packages soon–ish.

Open Software & Tools

This site wouldn’t be possible without the immense generosity and tireless efforts from the people who make contributions to the world and share their work via open source initiatives. Thank you 🙏

© 2025 – Pkg Stats / Ryan Hefner

image-processing-server

v1.0.6

Published

An MCP server for image processing using JIMP library

Downloads

735

Readme

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

  1. Resize - Resize images to specified dimensions
  2. Crop - Crop a specified area of an image
  3. Rotate - Rotate images by a specified angle
  4. Draw Shape - Draw rectangles or circles on images
  5. Concatenate - Horizontally or vertically concatenate multiple images
  6. Edge Detection - Detect edges in images
  7. Grayscale - Convert images to grayscale
  8. Gaussian Blur - Apply Gaussian blur to images
  9. Threshold - Apply threshold processing to images
  10. 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

  1. Clone or download the project code

  2. Navigate to the server directory:

    cd server
  3. Install dependencies:

    npm install
  4. 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