Image Processor MCP Server

Image Processor MCP Server

Enables optimization, conversion to WebP, and uploading of images to Vercel Blob storage, supporting both local files and external URLs.

Category
访问服务器

Tools

process_and_upload_image

Process a local image file (optimize, resize, convert to WebP) and upload to Vercel Blob

process_and_upload_image_from_url

Process an image from a URL (optimize, resize, convert to WebP) and upload to Vercel Blob

README

Image Processor MCP Server

This MCP server provides tools for image processing and uploading to Vercel Blob storage. It allows you to:

  1. Optimize and resize images (from local files or URLs)
  2. Convert images to WebP format
  3. Upload both versions to Vercel Blob storage

Features

  • Image Optimization: Resize and optimize images for better performance
  • WebP Conversion: Convert images to the WebP format for smaller file sizes
  • Vercel Blob Integration: Automatically upload processed images to Vercel Blob storage
  • Customizable Dimensions: Specify custom dimensions for image resizing
  • URL Support: Process images from external URLs

Installation

The server is already installed and configured in the MCP settings file. It uses the Vercel Blob token from your environment variables.

Usage

You can use the MCP server in Claude by using the use_mcp_tool function:

For Local Images

<use_mcp_tool>
<server_name>image-processor</server_name>
<tool_name>process_and_upload_image</tool_name>
<arguments>
{
  "imagePath": "/path/to/image.png",
  "newName": "new-image-name",
  "width": 550,
  "height": 300
}
</arguments>
</use_mcp_tool>

For Images from URLs

<use_mcp_tool>
<server_name>image-processor</server_name>
<tool_name>process_and_upload_image_from_url</tool_name>
<arguments>
{
  "imageUrl": "https://example.com/image.jpg",
  "newName": "new-image-name",
  "width": 550,
  "height": 300
}
</arguments>
</use_mcp_tool>

Parameters for Local Images

  • imagePath (required): Path to the image file to process
  • newName (required): New name for the processed image (without extension)
  • width (optional): Width to resize the image to (default: 550)
  • height (optional): Height to resize the image to (default: 300)

Parameters for URL Images

  • imageUrl (required): URL of the image to process
  • newName (required): New name for the processed image (without extension)
  • width (optional): Width to resize the image to (default: 550)
  • height (optional): Height to resize the image to (default: 300)

Response

The server will return a JSON response with the following structure:

{
  "success": true,
  "message": "Successfully processed and uploaded image: new-image-name",
  "results": {
    "png": {
      "fileName": "new-image-name_small.png",
      "localPath": "/path/to/temp/new-image-name_small.png",
      "blobUrl": "https://vercel-blob-url/new-image-name_small.png"
    },
    "webp": {
      "fileName": "new-image-name.webp",
      "localPath": "/path/to/temp/new-image-name.webp",
      "blobUrl": "https://vercel-blob-url/new-image-name.webp"
    }
  }
}

Implementation Details

The server uses:

  • Sharp: For image processing and optimization
  • @vercel/blob: For uploading to Vercel Blob storage
  • fs-extra: For file system operations

Examples

Example 1: Processing a Local Image

<use_mcp_tool>
<server_name>image-processor</server_name>
<tool_name>process_and_upload_image</tool_name>
<arguments>
{
  "imagePath": "/pathto_file/image_name.png",
  "newName": "test-processed-image",
  "width": 550,
  "height": 300
}
</arguments>
</use_mcp_tool>

Example 2: Processing an Image from URL

<use_mcp_tool>
<server_name>image-processor</server_name>
<tool_name>process_and_upload_image_from_url</tool_name>
<arguments>
{
  "imageUrl": "https://pplx-res.cloudinary.com/image/upload/v1749567759/pplx_project_search_images/6dff647e4fb1083aecf9ea6b1d49ea19386be588.jpg",
  "newName": "cloud-image",
  "width": 550,
  "height": 300
}
</arguments>
</use_mcp_tool>

Both examples will:

  1. Take the image (from local path or URL)
  2. Optimize and resize it to 550x300 pixels
  3. Create a PNG version with "_small" suffix
  4. Create a WebP version
  5. Upload both to Vercel Blob
  6. Return the URLs of the uploaded images

推荐服务器

Baidu Map

Baidu Map

百度地图核心API现已全面兼容MCP协议,是国内首家兼容MCP协议的地图服务商。

官方
精选
JavaScript
Playwright MCP Server

Playwright MCP Server

一个模型上下文协议服务器,它使大型语言模型能够通过结构化的可访问性快照与网页进行交互,而无需视觉模型或屏幕截图。

官方
精选
TypeScript
Magic Component Platform (MCP)

Magic Component Platform (MCP)

一个由人工智能驱动的工具,可以从自然语言描述生成现代化的用户界面组件,并与流行的集成开发环境(IDE)集成,从而简化用户界面开发流程。

官方
精选
本地
TypeScript
Audiense Insights MCP Server

Audiense Insights MCP Server

通过模型上下文协议启用与 Audiense Insights 账户的交互,从而促进营销洞察和受众数据的提取和分析,包括人口统计信息、行为和影响者互动。

官方
精选
本地
TypeScript
VeyraX

VeyraX

一个单一的 MCP 工具,连接你所有喜爱的工具:Gmail、日历以及其他 40 多个工具。

官方
精选
本地
graphlit-mcp-server

graphlit-mcp-server

模型上下文协议 (MCP) 服务器实现了 MCP 客户端与 Graphlit 服务之间的集成。 除了网络爬取之外,还可以将任何内容(从 Slack 到 Gmail 再到播客订阅源)导入到 Graphlit 项目中,然后从 MCP 客户端检索相关内容。

官方
精选
TypeScript
Kagi MCP Server

Kagi MCP Server

一个 MCP 服务器,集成了 Kagi 搜索功能和 Claude AI,使 Claude 能够在回答需要最新信息的问题时执行实时网络搜索。

官方
精选
Python
e2b-mcp-server

e2b-mcp-server

使用 MCP 通过 e2b 运行代码。

官方
精选
Neon MCP Server

Neon MCP Server

用于与 Neon 管理 API 和数据库交互的 MCP 服务器

官方
精选
Exa MCP Server

Exa MCP Server

模型上下文协议(MCP)服务器允许像 Claude 这样的 AI 助手使用 Exa AI 搜索 API 进行网络搜索。这种设置允许 AI 模型以安全和受控的方式获取实时的网络信息。

官方
精选