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 🙏

© 2026 – Pkg Stats / Ryan Hefner

@mcpcn/mcp-image-quick-edit

v1.1.5

Published

将图片改圆角、尺寸缩放、旋转、翻转、叠加文字水印、叠加图片水印整合为一个 MCP 服务,暴露 6 个工具。

Downloads

30

Readme

图片快速编辑 MCP(统一版)

将以下 6 个已实现的 MCP 合并为一个 TypeScript MCP 服务,并以中文工具名暴露 6 个工具:

  • 图片改圆角
  • 图片尺寸缩放
  • 图片旋转
  • 图片翻转
  • 叠加文字水印
  • 叠加图片水印

整合来源目录(仅作溯源说明):

  • /Users/fengjinchao/Desktop/mcp/skills/typescript/图片改圆角
  • /Users/fengjinchao/Desktop/mcp/skills/typescript/图片尺寸缩放
  • /Users/fengjinchao/Desktop/mcp/skills/typescript/图片旋转
  • /Users/fengjinchao/Desktop/mcp/skills/typescript/图片翻转
  • /Users/fengjinchao/Desktop/mcp/skills/typescript/叠加文字水印
  • /Users/fengjinchao/Desktop/mcp/skills/typescript/叠加图片水印

使用要求

  • Node.js >= 18.17.0(sharp 运行时要求)。若你的 Node 版本较低(如 18.12.0),请使用 nvm 升级,例如:
    • nvm install 18.20.3 && nvm use 18.20.3
    • 或使用 Node 20+。

安装与构建

npm install
npm run build

运行(STDIO 模式)

node dist/index.js

作为 MCP 服务器运行时,会通过 stdio 与客户端握手并提供工具能力。

工具一览与参数

所有工具均要求提供 inputPath 和/或 outputPath 等路径参数。输出格式由 outputPath 扩展名决定(jpg/png/webp)。

  • 图片改圆角
    • 参数:inputPath, outputPath, radius(默认20), backgroundColor(默认transparent)
  • 图片尺寸缩放(模式与原实现一致)
    • 参数:inputPath, outputPath, width?, height?, mode(width|height|exact|fit|fill|scale, 默认fit), scale?, quality(默认90), maintainAspectRatio(默认true)
  • 图片旋转(合并了 EXIF 自动旋转)
    • 参数:inputPath, outputPath, angle(默认90), backgroundColor(默认transparent), autoRotate(默认false)
  • 图片翻转(含镜像)
    • 参数:inputPath, outputPath, flipType(horizontal|vertical|both, 默认horizontal), mirrorType?(left|right|top|bottom), quality(默认90)
  • 叠加文字水印(将原“单个/重复”合并,使用 mode 切换)
    • 参数:inputPath, outputPath, mode(single|tiled, 默认single), text, position(top-left|top-right|bottom-left|bottom-right|center|custom, 默认bottom-right), x?, y?, fontSize(默认32), fontColor(默认white), opacity(默认0.7), rotation(默认0), padding(默认20), spacingX(默认150), spacingY(默认100), strokeWidth(默认0), strokeColor(默认black)
  • 叠加图片水印(将原“单个/平铺”合并,使用 mode 切换)
    • 参数:inputPath, watermarkPath, outputPath, mode(single|tiled, 默认single), position, x?, y?, scale(默认0.2), opacity(默认0.8), padding(默认20), rotation(默认0), spacingX(默认150), spacingY(默认100), blendMode(over|multiply|screen|overlay|darken|lighten|color-dodge|color-burn|hard-light|soft-light|difference|exclusion, 默认over)

说明与注意

  • 文字水印的不透明度:sharp 对整体文字层的不透明度支持有限,当前通过 SVG 及混合方式近似处理;如需精确半透明文字,可按需扩展为更复杂的 SVG。
  • 输出格式:根据 outputPath 的扩展名自动选择 jpeg/png/webp,并在 jpeg/webp 下应用 quality

开发

  • 入口:src/index.ts
  • 构建输出:dist/index.js

欢迎根据需要继续拆分到 src/tools/* 做更加模块化的实现。