WebPerfect MCP Server

WebPerfect MCP Server

与webperfect服务交互的MCP Server。

简介

WebPerfect MCP 是一个智能图像处理服务器,提供全自动批处理流水线,用于优化网络图像。主要功能包括降噪、自动色阶/曲线调整、JPEG伪影去除和高级WebP转换。

安装步骤

# 1. 克隆仓库
git clone https://github.com/splendasucks/webperfect-mcp-server.git
cd webperfect-mcp-server

# 2. 安装依赖
npm install

# 3. 构建服务器
npm run build

配置 Claude

将服务器添加到您的 Claude MCP 配置中(claude_desktop_config.json):

{
  "mcpServers": {
    "webperfect": {
      "command": "node",
      "args": ["/path/to/webperfect-mcp-server/build/index.js"],
      "env": {}
    }
  }
}

使用方法

处理图像批次

<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>

可用优化预设

支持多种预设配置,包括:

  • web_standard:普通网页图像(1920px宽度,WebP格式,85%质量)
  • web_high_quality:高质量图像(4K分辨率,90%质量)
  • thumbnail:缩略图(400px宽度,80%质量)

系统要求

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

许可证

MIT