FitFileSize

io.github.Gautamstar由 GitHub 账号 Gautamstar 发布v0.2.1更新于 Oct 24, 2026

Compress PDFs and images, iPhone HEIC too, to fit an upload limit or a form's rules.

已验证STDIO仅桌面文件与存储媒体与设计

概览

AI 生成的概览

本地 MCP 服务器,让助手压缩 PDF 和图片(含 iPhone HEIC),以满足上传大小限制或表单的精确规则。

可以做什么
  • 把单个 PDF 或图片压缩到指定大小上限,或按精确像素尺寸裁剪、留白
  • 一次批量处理最多 10 个使用同一上限的文件,结果保存在原文件旁
  • 套用表单预设,如签证照片、考试与银行上传、IRCC 文件或 Discord 表情,并可设最小尺寸
  • 列出可用的表单预设及其规则和官方来源
  • 默认保持原格式,仅在明确允许时才输出 JPEG;HEIC 照片会转为 JPEG
适用场景
当文件或照片需要上传到有严格大小或像素要求的门户、表单或聊天服务,并希望助手在本地完成缩放与压缩、无需手动修图时使用。
运行要求
需要 Node.js 20.10 或更高版本;通过 npx 本地运行,无需账号或 API 密钥。压缩需联网,因为文件会上传到 FitFileSize 服务处理。支持最大 50 MB 的文件。
安装前请注意
文件会通过 HTTPS 发送到 FitFileSize 的服务器压缩,结果保存后即删除,因此私密文件会离开本机。上传计入每小时 30 次的免费额度。结果以新文件形式写在原文件旁,批量操作一次最多处理 10 个文件。

安装

在 SourceWeft 中

  1. 打开 控制台中的 FitFileSize,将其添加到工作区。
  2. 为需要使用其工具的对话启用该服务。

Desktop only,通过 STDIO。 STDIO 服务会启动本地进程,因此需要 SourceWeft 桌面宿主。

其他 MCP 客户端

参照 仓库 中的启动说明。

README

FitFileSize MCP server

Let your AI assistant make a PDF or image fit an upload limit, or a form's exact rules, with FitFileSize.

"Make ~/Downloads/signature.jpg fit the IBPS signature rules"

Saved ~/Downloads/signature.fit.jpg for IBPS signature (JPEG, 140 × 60 pixels, 10 KB to 20 KB): 10,240 bytes (10.0 KB), under the 20,000 bytes limit.

  • Any limit: "get this scan under 300 KB", "this photo under 50 KB".
  • Form presets: US visa photo (DS-160), Indian e-Visa passport page and photo, IBPS, SBI, RRB, SSC, NEET, JEE Main, CUET and GATE uploads, IRCC documents, and Discord emoji, profile banners and message uploads. The preset sets the size limit, the minimum size and the exact pixels. Ask for list_forms to see them all.
  • Several files at once: "fit these five documents under 2 MB each".
  • Keeps as much quality as the limit allows, and saves the result next to the original as <name>.fit.<ext>. Every file keeps its format (a PNG stays a PNG) unless you say a JPEG is fine; iPhone HEIC photos come back as JPEG.
  • Free, no account, no API key. Files up to 50 MB.

Setup

Needs Node.js 20.10 or newer. Step-by-step setup with copy buttons: fitfilesize.com/claude.html.

Claude Code

bash
claude mcp add fitfilesize -- npx -y fitfilesize-mcp

Claude Desktop, Cursor, Windsurf and other clients that use an mcpServers config file:

json
{  "mcpServers": {    "fitfilesize": {      "command": "npx",      "args": ["-y", "fitfilesize-mcp"]    }  }}

(Claude Desktop: Settings → Developer → Edit Config. Cursor: ~/.cursor/mcp.json.)

VS Code (.vscode/mcp.json):

json
{  "servers": {    "fitfilesize": { "command": "npx", "args": ["-y", "fitfilesize-mcp"] }  }}

Tools

fit_file

Argument
pathFull path to the file (~/ works). PDF, JPEG, PNG, WebP, TIFF, BMP or HEIC (returned as JPEG), up to 50 MB.
pathsInstead of path: up to 10 files that share the same limit. Each is saved beside its original; one that fails is reported without stopping the rest.
limitThe upload limit, like "200KB" or "1.5MB". KB and MB are 1000-based, so the result passes a check done either way.
formInstead of limit: a form preset from list_forms, like "ibps-photo".
width, heightOptional exact pixel size, images only.
fit"crop" (default) or "pad" with white, when the pixel size changes the shape.
minimumOptional smallest size, like "10KB". A small JPEG is padded up to it; the picture is unchanged.
jpeg_okOptional. true lets a PNG, WebP, TIFF or BMP come back as a JPEG when that is what fits. Off by default; when it would have helped, the result says so.
outputOptional path for the result, with path only.

list_forms

The form presets, each with its rules and the official source they come from. The list is read from fitfilesize.com/forms.json, so new forms appear without an update; a copy is bundled for when the site cannot be reached.

Privacy

The file is sent to FitFileSize's server over HTTPS, compressed there, and deleted as soon as the result is saved on your computer. Requests name the package and its version (fitfilesize-mcp/0.2.1), nothing about you. Nothing else leaves your machine. See the privacy page. Uploads count against the site's free limit of 30 an hour.

Development

bash
npm installnpm test          # the tools through an MCP client, against a stand-in APInpm run build     # bundles the form presets from the website's data

FITFILESIZE_API points the server at another API, such as a local one (http://127.0.0.1:8000).

Licence

MIT, see LICENSE. This covers the MCP server in this folder; the rest of the FitFileSize repository is not open source.

来源:mcp/README.md,提交 307987b

工具

0
SourceWeft 尚未在沙箱中启动过该软件包,因此其工具未知。

版本历史

3
  1. v0.2.1最新Oct 18, 2026
  2. v0.2.0Sep 27, 2026
  3. v0.1.1Sep 26, 2026

评分

已满足适用检查项的 40%

该评分衡量此收录条目的完整程度,依据注册中心条目、端点与公开来源计算得出。它不是对服务器本身的评价,也不表示服务器安全或当前可用:可连通性是带日期的检查结果,评分也不包含安装量或用户评价。

  • 近 30 天内可连通25 分

    请保持端点能够响应 MCP 握手;SourceWeft 每 30 天探测一次。

  • 已声明认证方式10 分

    请在注册中心条目中声明凭据请求头,或保持端点能够响应探测,以便判定其认证方式。

  • 已列出工具15 分

    请让服务器在无凭据时响应 tools/list,或发布可在沙箱中无凭据启动的软件包。

  • 描述必需15 分
  • 图标10 分
  • 文档15 分
  • 许可证10 分

    请在仓库或注册中心条目中声明许可证。