
Image
io.github.theluckystrike由 GitHub 帳號 theluckystrike 發布v0.22.6更新於 Oct 24, 2026
Resize, convert, compress, crop, thumbnail and watermark images from your AI chat.
概覽
一個本機 MCP 伺服器,讓助手在你自己的電腦上對圖片進行縮放、格式轉換、壓縮、裁切、產生縮圖、加上浮水印和清除中繼資料。
- 可以做什麼
- 檢視圖片的格式、像素尺寸、長寬比、透明通道和檔案大小,並以十六進位色碼和佔比列出主色調。縮放、裁切、在 PNG、JPEG、BMP、GIF 和 TIFF 之間轉換,並壓縮,提供前後位元組數和可選的目標大小。批次縮放一組檔案,或為整個資料夾產生縮圖並寫入輸出目錄。用文字或已儲存的公司名稱加上浮水印,並透過從原始像素重新編碼來清除 EXIF、GPS、相機、XMP 和色彩設定檔。透過最近操作資源查看最近 25 次操作,並使用 prepare_for_web 提示產生適合網頁、無中繼資料的 JPEG。
- 適用情境
- 適合在對話中完成簡單的圖片處理,而不必使用網頁上傳工具:為網站縮小照片、轉換格式、製作縮圖,或在傳送客戶照片前移除 GPS 和 EXIF。由於不上傳任何內容,也適合注重隱私的本機工作。
- 執行需求
- 以本機程序在你的電腦上執行(僅限桌面端),需要 Node.js 18 或更新版本。npm 套件尚未發布,需透過 .mcpb 安裝包或從原始碼複製並建置來安裝。無需帳號、API 金鑰或網路存取;Pro 功能需要 MCP_LICENSE_KEY 或傳給 license_activate 的金鑰。
安裝
在 SourceWeft 中
- 開啟 儀表板中的 Image,將其新增到工作區。
- 為需要使用其工具的對話啟用該服務。
Desktop only,透過 STDIO。 STDIO 服務會啟動本機處理程序,因此需要 SourceWeft 桌面主機。
其他 MCP 客戶端
參照 儲存庫 中的啟動說明。
README
mcp-image
Say "make these five photos 1200 pixels wide" or "shrink this screenshot and strip the GPS out of it" and it happens, on your machine, in a second. This MCP server does the small image jobs that otherwise send you to a web uploader: resize, convert between PNG, JPEG, BMP, GIF and TIFF, compress with a real before-and-after byte count, crop, thumbnail a folder, watermark with your business name, and drop the EXIF block a phone camera writes into every photo. No upload, no account, no native dependency, no image editor.
In the official MCP Registry (io.github.theluckystrike/image-resize-convert-compress-watermark).
Listed on the AI Product Index - live remote endpoint at mcp.zovo.one/s/image, free tier, no signup.
The image chores of a freelance business, done from chat instead of from a browser tab you would rather not hand a client photo to.
60-second install
npm publish for @theluckystrike/mcp-image is pending. Until then, the .mcpb one-click bundle or a clone+build
is the working path, both are verified below.
One-click (.mcpb): download image.mcpb from the latest release and double-click it in Claude Desktop:
https://github.com/theluckystrike/mcp-servers/releases/latest
(claude_desktop_config.json):
Claude Code:
(.cursor/mcp.json):
The npx form above starts working the moment the package is published. Until then, use the .mcpb bundle above, or
build from source with exactly these three commands:
Then point your client's command at node with one arg: the absolute path to servers/image/dist/index.js.
To run in Pro mode set MCP_LICENSE_KEY in the same config block, or call license_activate once with your key.
Tools
Resource: image://recent returns the last 25 operations, newest first, with the inputs, the files written and when.
Prompt: prepare_for_web takes a camera-sized image down to a page-sized JPEG, drops the metadata that came with it, and reports the bytes saved.
What you can say
Worked example
The JPEG re-encode also drops the EXIF block the camera wrote, including the GPS coordinates. The original file is byte-for-byte unchanged.
Free vs Pro
The free limit is on what gets written, not on what gets read: a 12 MP phone photo taken down to 1600 px wide is a free call, because that is the job. Writing 12 MP back out again is the Pro one.
A tier limit is an answer, not an error, and nothing is written when one refuses a call.
Pro is a one-time $19, or $39 for every server in the collection, lifetime.
quality is a JPEG parameter, and only a JPEG parameter
This is the one thing about image compression that surprises people, so the server says it in its own answer rather
than accepting a number and quietly doing nothing with it. A JPEG throws away detail to get smaller, and quality
is the dial for how much. A PNG is lossless: there is no dial. Passing quality: 40 to a PNG output does not make
a PNG 60% smaller, it makes exactly the same PNG.
So the output format follows the extension of your out_path, and that is the lever:
out_path: "shot-small.jpg",qualityapplies, and a photo typically drops 80-95%.out_path: "shot-small.png",qualityis reported as not applicable, and onlymax_widthremoves bytes.
Palette quantisation was measured as an alternative for PNG and rejected: re-encoding a 300x220 noisy PNG through a 16-colour quantiser produced a larger file (115,451 bytes against 39,262), because the encoder here writes RGBA either way and quantising only destroys the row-to-row similarity that the deflate step was exploiting. A tool that claims to compress and returns a bigger file is worse than a tool that says which knob exists.
image_compress therefore always reports the byte count before and after, the percentage, and the method that did
the work, and, if the output came out larger, it says so and tells you to keep the original.
Decompression bombs are refused from the header, before anything decodes
A 4 KB PNG can declare that it is 20,000 by 20,000 pixels. Decoding it allocates 1.6 GB of RGBA and takes the process down before any size check written after the decode could ever run. So the declared dimensions are read out of the container header, PNG IHDR, the JPEG SOF segment, the GIF logical screen descriptor, the BMP info header, the first TIFF IFD, and a file over 10,000 px on a side is refused there, with the memory it would have taken named in the message:
The decoded size is checked again afterwards, because a header probe can come back empty on an unusual TIFF, and a guard that only sometimes runs is not a guard.
Existing files are never overwritten, and inputs are never modified
Every tool writes a new file and leaves its inputs byte-for-byte alone, there is no in-place mode, on purpose.
An out_path that already exists is refused:
The path is reserved with an exclusive create, not an existence check, so two processes writing the same out_path
at the same time cannot clobber each other: one wins, the other is refused and writes nothing. image_thumbnails
and image_batch_resize reserve every one of their output paths before writing any of them, so a collision on file
3 does not leave files 1 and 2 behind as a half-done batch, and the reservations are released, so nothing empty is
left on disk either.
Pass overwrite: true when replacing the file is what you want.
overwrite: true still does not let an output be an input. Writing a result back over one of its own sources
destroys that source, the pixels are already decoded in memory and get written over the file they came from, so a
4000 px original becomes the 512 px thumbnail and every later read of that path is quietly wrong. So an out_path
that resolves to (or shares an inode with) any input of the same call is refused before any work happens.
What "strip metadata" actually does
image_strip_metadata decodes the image and re-encodes it from the raw pixels. EXIF, GPS coordinates, the camera
and lens, the capture time, XMP packets and embedded colour profiles are not removed one by one, they are simply
never handed to the encoder, so they cannot come out the other side. Two consequences worth knowing:
- The pixels are the same, the bytes are not. A JPEG goes through the encoder a second time, so the copy is not bit-identical to the original even though it looks the same. Keep the original if that matters.
- Every other writing tool here has the same effect as a side effect. Resizing a photo also drops its EXIF.
Limits
- Inputs over 50 MB are refused: an image decodes to width x height x 4 bytes of raw RGBA regardless of how well it is compressed on disk.
- 10,000 px per side, checked from the header first and from the decode second.
- Read and written: PNG, JPEG, BMP, GIF and TIFF, detected by magic bytes rather than by file extension. No WebP, no AVIF, no HEIC, no SVG, there is no pure-JavaScript decoder for those that is worth shipping, and this server takes no native dependency.
- An animated GIF is read as its first frame. This server does not do animation.
- Watermark text is drawn with the bundled Open Sans bitmap faces (8, 16, 32, 64 and 128 px), and the largest one that fits the image is chosen. A character those faces do not carry is not drawn, so there is no CJK watermark.
- No rotation, no filters, no colour correction, no OCR, no background removal. This server does the size-and-format jobs; it is not an image editor.
How it stores data
Only a register of what it did: ${XDG_DATA_HOME:-~/.local/share}/mcp-servers/image/operations.json, the last 500
operations, as plain JSON. Your images stay where you put them. Every write to the register runs inside an advisory
lock on .../image/.lock, so two clients on one data directory cannot lose a record, and saves go to a temporary
file and are renamed into place.
If the register is unreadable or not valid JSON it is never treated as "empty": it is moved aside byte-for-byte as
operations.json.corrupt-<timestamp> with a marker beside it. The image you asked for is still written, the file
is on disk before the register is touched, and the answer tells you the history could not be updated.
The watermark reads the one shared profile the whole suite uses,
${XDG_DATA_HOME:-~/.local/share}/mcp-servers/profile/business.json, written by business_set in mcp-invoice or
mcp-docx. Nothing is invented: with no name stored and no text passed, image_watermark refuses and says which tool
to run.
Privacy
All data stays local. The server reads and writes files on your machine and makes no network request of any kind -- not for licensing (keys are verified offline), not for fonts, not for telemetry. A client photo you resize is never uploaded anywhere, which is the entire reason this exists.
Pairs with
- mcp-docx, size a logo here, then put it in the letterhead:
image_resizeto the header height, then the.docxwriter picks the file up from disk. - mcp-pdf, shrink the scans before you merge them, so the joined PDF is not 40 MB.
- mcp-resume, one correctly sized, metadata-free headshot for the CV and the application form.
- office-suite, several servers behind one install, one config entry.
Troubleshooting
npxhangs or fails to find the package: npm publish for this package is pending. Use the.mcpbbundle or the clone-and-build path above until it lands.- "quality does not apply to a PNG output": write to a
.jpgout_path, or passmax_width. See the section above. - "declares NxN pixels ... and was refused before decoding": the file claims a canvas over 10,000 px per side. If it is genuinely that large, resize it with a tool that streams tiles; this server decodes whole images.
- "does not start with the magic bytes": the file is not a PNG, JPEG, BMP, GIF or TIFF. A
.pngname on a WebP file is the usual cause; convert it first. - "already exists and nothing was written": pass
overwrite: true, or a differentout_path. - The watermark is tiny: the largest bundled face is 128 px, and it is chosen to fit within 80% of the image width. On a very large photo, resize first and watermark second.
- Node version: requires Node >= 18. Check with
node -v.
MIT licensed. Support: [email protected]
Built by theluckystrike.
Use these docs as an MCP server
Any MCP client (Claude, Cursor, Windsurf, VS Code) can read this repository's documentation directly via GitMCP - no install:
- Docs MCP URL: https://gitmcp.io/theluckystrike/mcp-image
來源:servers/image/README.md,提交 1bd9d69
工具
0版本歷史
2- v0.22.6最新Oct 14, 2026
- v0.22.1Sep 18, 2026
評分
已滿足適用檢查項的 50%
該評分衡量此收錄條目的完整程度,依據註冊中心條目、端點與公開來源計算得出。它不是對伺服器本身的評價,也不表示伺服器安全或目前可用:可連通性是帶日期的檢查結果,評分也不包含安裝量或使用者評價。
- 近 30 天內可連通25 分
請保持端點能夠回應 MCP 握手;SourceWeft 每 30 天探測一次。
- 已宣告認證方式10 分
請在註冊中心條目中宣告憑證請求標頭,或保持端點能夠回應探測,以便判定其認證方式。
- 已列出工具15 分
請讓伺服器在無憑證時回應 tools/list,或發布可在沙箱中無憑證啟動的軟體包。
- 描述必需15 分
- 圖示10 分
- 文件15 分
- 授權條款10 分