WebPerfect 图像处理服务器

WebPerfect MCP Server 是一个智能化的图像处理服务器,提供全自动的批量处理管道,用于生成适合网页使用的图像。其主要功能包括降噪、自动色阶/曲线调整、JPEG 伪影去除、4K 分辨率调整、智能锐化与阴影/高光增强以及先进的 WebP 转换。优化的压缩算法可在不牺牲质量的前提下提供更小的文件体积。

  • by splendasucks
  • 更新于
在 GitHub 查看 splendasucks/webperfect-mcp-server

使用说明

基本能力

产品定位

WebPerfect MCP Server 是一个专注于图像处理和优化的服务器,特别适合需要批量处理网页图像的场景。

核心功能

  1. 高级图像处理管道

    • 使用中值滤波进行强效降噪
    • 基于图像熵的智能自动色阶和曲线调整
    • 带有调制和锐化的高级纹理增强
    • 智能分辨率优化(最高支持4K)
    • 优化的WebP转换
  2. 工具

    • process_images: 处理和优化一批图像,提供高级增强功能。

适用场景

  • 网站开发中的图像优化
  • 批量处理大量图像
  • 需要高质量压缩的图像处理

使用教程

使用依赖

  • Node.js >= 16
  • Sharp 图像处理库
  • Model Context Protocol SDK

安装教程

  1. 克隆仓库:
git clone https://github.com/splendasucks/webperfect-mcp-server.git
cd webperfect-mcp-server
  1. 安装依赖:
npm install
  1. 构建服务器:
npm run build

调试方式

  1. 将服务器添加到 Claude MCP 设置中(通常在 claude_desktop_config.json 文件中):
{
  "mcpServers": {
    "webperfect": {
      "command": "node",
      "args": ["/path/to/webperfect-mcp-server/build/index.js"],
      "env": {}
    }
  }
}
  1. 重启 Claude 以加载 MCP 服务器。

  2. 通过 Claude 的 MCP 工具和资源使用服务器:

// 处理一批图像
<use_mcp_tool>
<server_name>webperfect</server_name>
<tool_name>process_images</tool_name>
<arguments>
{
  "inputDir": "/path/to/input",
  "outputDir": "/path/to/output"
}
</arguments>
</use_mcp_tool>

// 访问处理统计
<access_mcp_resource>
<server_name>webperfect</server_name>
<uri>stats/summary</uri>
</access_mcp_resource>