Kompressr

com.kompressr由 kompressr.com 发布v2.0.3更新于 Oct 25, 2026

Upload, optimize and manage files, wait for processing, and generate private delivery links.

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

概览

AI 生成的概览

Kompressr 本地 MCP 服务器让助手上传图片、视频、PDF、字体和文本,等待处理完成,生成私有链接并删除资源。

可以做什么
从本地路径或远程 URL 上传文件,可设置画质、可见性和私有链接有效期,并等待处理或查询状态与节省信息。分页列出项目内的上传文件,可按状态、可见性或删除状态筛选。为已处理的私有资源生成新的限时私有访问链接。永久删除单个资源或最多 100 个明确指定的资源 ID,并查看删除状态与存储额度。注册账号并通过邮件令牌验证,将凭据保存在本地。
适用场景
适合让助手把媒体或文档上传到 Kompressr 项目、确认处理完成、分发公开或私有访问链接,并在对话中清理资源。适用于管理 Kompressr 项目或按代理限定的上传的桌面 MCP 客户端。
运行要求
需要本地 Node.js 22 或更高版本,或可安装 MCPB 包的桌面客户端。需要 Kompressr 账号(30 天试用或付费方案),并在 KOMPRESSR_API_KEY 中提供项目/主密钥或限定范围的密钥。仅列出上传文件时需要 KOMPRESSR_PROJECT_ID。需能访问 Kompressr 的管理与上传域名;自定义部署可覆盖相关地址。
安装前请注意
API 密钥属于机密:项目/主密钥应只放在可信机器上,优先为每个代理使用限定范围的密钥,并避免把保存的配置提交到版本控制。删除不可撤销,缓存或离线副本可能仍存在;限定范围的密钥需显式授予删除权限。免费试用共 100 次图片上传且不按月续期。远程文件 URL 会在本机下载,私有或本地目标需显式加入主机白名单。已发出的写入若中断,可能已经成功。

安装

在 SourceWeft 中

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

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

其他 MCP 客户端

参照 仓库 中的启动说明。

README

@kompressr/mcp-server

Kompressr tools for MCP agents: upload files, wait for processing, generate private links, paginate uploads and permanently delete explicit asset IDs. File operations use the separate @kompressr/sdk package. Applications can use that SDK directly without starting MCP.

Requires Node.js 22 or later. For a desktop client that supports MCPB extensions, download a Kompressr MCP bundle from GitHub Releases and follow the desktop installation guide.

Setup

Create a Kompressr account and start the 30-day image-upload trial or choose a paid plan. In Dashboard → Projects, open the project and choose API Keys. Keep project/master keys on trusted machines; use scoped keys for individual application or agent runtimes. The project UUID is needed only for listing uploads.

Configure an MCP client to run the package:

json
{  "mcpServers": {    "kompressr": {      "command": "npx",      "args": ["-y", "@kompressr/[email protected]"],      "env": {        "KOMPRESSR_API_KEY": "YOUR_PROJECT_OR_SCOPED_KEY",        "KOMPRESSR_PROJECT_ID": "YOUR_PROJECT_UUID"      }    }  }}

KOMPRESSR_PROJECT_ID is required for upload listing; upload/status/signing/deletion need only the key. For source builds, follow CONTRIBUTING.md, then configure node with the absolute path to this package's built dist/index.js.

Configuration and migration

SettingMeaning
KOMPRESSR_API_KEYOpaque project/master or scoped key; API permissions remain authoritative
KOMPRESSR_PROJECT_IDProject UUID, required by list_assets
KOMPRESSR_API_URLManagement origin, default https://kompressr.com
KOMPRESSR_UPLOAD_BASE_URLUpload-body origin override
KOMPRESSR_REMOTE_ALLOWED_HOSTSComma-separated hostnames explicitly allowed to serve private/local remote-source addresses

Production defaults to https://kompressr.com for management and https://uploads.kompressr.com for upload bodies. For another deployment, supply KOMPRESSR_API_URL and KOMPRESSR_UPLOAD_BASE_URL from private runtime configuration. Custom management origins use the same upload origin unless overridden. Origins must use HTTP(S) without credentials, paths, queries or fragments.

Saved configuration remains ~/.kompressr/config.json:

json
{  "api_key": "YOUR_KEY",  "project_id": "YOUR_PROJECT_UUID",  "api_url": "https://kompressr.com",  "upload_url": "https://uploads.kompressr.com"}

Environment settings override saved values. A different environment key does not inherit the saved project or endpoint, which prevents mixing accounts; supply those explicitly for custom origins. A changed management origin re-derives uploads unless an upload override is provided. Old saved https://api.kompressr.com values migrate in memory to production. New saves use atomic replacement and permissions 0700 for the directory, 0600 for the file; existing files are not rewritten merely by loading. Keep keys and configuration out of source control.

File workflow

  1. Call upload_asset with exactly one file_path or file_url. Save the returned numeric asset_id.
  2. Call wait_for_asset or get_asset_status. Acceptance and a pending URL do not mean the file is ready; use the current processed response only for active assets.
  3. Share a public processed URL, or authorize the private recipient in your app and call generate_private_url for a fresh expiring link.
  4. On wait timeout, resume with the saved ID. Do not upload again to recover from a polling timeout.

The 30-day free trial includes 100 image uploads total, shared across API, SDKs, MCP and dashboard. This allowance does not renew monthly. Formats, size, video quality and private delivery remain plan/project dependent. The SDK sends all multipart options before the file, as required by the streaming API.

Tools

Missing/blank filenames in historical status/list records remain valid; listing displays “Unnamed file” without changing response metadata.

All file tools return readable text, a JSON text block and structuredContent; failures set isError. Numeric IDs must be positive safe integers (single-ID tools also accept numeric strings).

ToolParameters and behavior
upload_assetExactly one file_path / file_url; optional quality (480p, 720p, 1080p, 4k), visibility (public/private), private_url_expires_in (60–604800 seconds), data (up to five scalar fields; keys 64/string values 512 UTF-8 bytes, encoded multipart JSON 4096 bytes). Returns acceptance and ready.
get_asset_statusasset_id; processing, visibility, deletion state, byte sizes, savings and readiness.
wait_for_assetasset_id, optional timeout_ms (1–120000, default 120000); bounded polling. Timeout/error retains the ID. MCP request cancellation stops the wait, not the server job. Private readiness requires a fresh signing call.
list_assetsOptional page (default 1), limit (1–100, default 20), visibility, external_id, status (pending, processing, processed, failed, unprocessable), deletion_status (active, deleting, deleted, legacy_deleted), string data filters. Lists uploads in the configured project and returns next_page.
generate_private_urlasset_id, optional expires_in (60–604800 seconds, default 3600), variant (webp/avif, default webp). Application must first authorize access. Expiry does not delete the asset.
get_asset_deletion_statusasset_id; processing/deletion state and recorded storage credits. Completed removal does not prove all caches are cleared.
delete_assetasset_id; permanent deletion, no undo/cancellation. Acceptance starts background cleanup. Requires deletion permission.
bulk_delete_assetsasset_ids (1–100 explicit numeric IDs); per-item outcomes and counts. HTTP success can contain failed items. No delete-all selection.
registeremail, password (minimum 8 characters); creates an account and sends verification email. Refuses a configured runtime.
verify_emailtoken; verifies email and saves credentials if issued. Refuses a configured runtime; never returns raw keys in tool output. Trial or paid-plan limits still apply.

Processing status and deletion status are separate. Permanent deletion removes files later; cached, downloaded and offline copies may remain. Retrying the same old ID cannot delete a replacement with a new ID. Bulk deletion preserves partial failure and does not automatically expand or retry a selection. storage_credited_mb is recorded storage credit in MB, not a cash refund. Other size fields are bytes.

Read tools carry read-only annotations; deletion tools carry destructive annotations. Annotations describe behavior; server authorization and the MCP client's approval controls enforce access.

Keys, errors and remote files

Use a scoped key for one customer/agent runtime. The server enforces identity, allowed file types/visibility and action scopes. Default scopes exclude delete; provisioning must opt into it. Scoped keys cannot call platform administration or URL Prepend/source optimization. Provision identities and keys from your trusted backend with the SDK's client.platform group or the existing platform APIs. No master-key administration tools are added to MCP.

Safe GET requests retry network/429/502/503/504 failures at most twice within a 30-second request deadline and respect Retry-After. Uploads default to a 10-minute deadline; writes are never automatically replayed. Structured errors preserve code, kind, HTTP status and, where relevant, assetId/mayHaveSucceeded. A dispatched write interrupted or returning malformed JSON/data may have succeeded; inspect the outcome before repeating it. Arbitrary errors and raw gateway bodies are not exposed.

file_url downloads on the MCP machine, then uploads a local temporary file. MCP cancellation/disconnection, including stdin EOF, aborts the transfer and is checked again before starting the upload. Before dispatch no asset is created; after dispatch a server-accepted upload cannot be rolled back by client cancellation. It streams to disk with a 2 GiB transport ceiling, five-minute download deadline and at most five redirects. HTTPS cannot downgrade to HTTP. Numeric CIDR checks admit ordinary global IPv6 unicast and conservatively exclude IETF protocol, transition and documentation ranges, including their compressed forms. Each destination resolves to validated allowed addresses used for the connection; private/local destinations require exact hostnames in KOMPRESSR_REMOTE_ALLOWED_HOSTS. Redirect targets are checked again. Sources use no Kompressr credentials. Temporary files are restricted and cleaned up on success/failure. The transport ceiling does not override your plan or disk capacity; remote download and upload have separate deadlines. Server-side URL import is not part of this SDK/MCP integration.

See CHANGELOG.md and the contribution guide. Local HTTP/protocol checks do not certify deployed authentication, processing or CDN behavior. The source verification commands use local fixtures and do not publish packages.

来源:mcp-server/README.md,提交 ac4e44c

工具

10

register

Create an account and send a verification email. The 30-day free trial includes 100 image uploads total, shared across API, SDKs, MCP and dashboard. This allowance does not renew monthly. Cannot replace an already configured runtime.

输入参数email必填password必填

verify_email

Verify an email token and save credentials locally. Refuses to replace an already configured runtime.

输入参数token必填

upload_asset

Upload a supported image, video, PDF, font or text asset. Acceptance is not readiness: wait for processed before sharing. Project-user scoped upload keys restrict uploads to their identity. The 30-day free trial includes 100 image uploads total, shared across API, SDKs, MCP and dashboard. This allowance does not renew monthly.

输入参数dataqualityfile_urlfile_pathvisibilityprivate_url_expires_in

get_asset_status

Inspect processing status and delivery information. Scoped keys only read uploads owned by their identity. A URL is ready only for active processed assets.

输入参数asset_id必填

list_assets

List uploaded files in the configured project, with pagination and processing/deletion filters. A scoped key lists only its identity uploads. KOMPRESSR_PROJECT_ID is required.

输入参数datapagelimitstatusvisibilityexternal_iddeletion_status

generate_private_url

Generate a fresh expiring URL after private upload processing and application access checks. Scoped keys only sign their own identity private uploads. Expiry does not delete the asset.

输入参数variantasset_id必填expires_in

wait_for_asset

Wait within a bounded time budget for an active upload to process. A timeout preserves the asset ID; resume rather than reupload. Private uploads need generate_private_url after readiness.

输入参数asset_id必填timeout_ms

get_asset_deletion_status

Inspect processing/deletion state and storage credits for an asset ID. File removal completion does not certify that all caches have cleared.

输入参数asset_id必填

delete_asset

Permanently delete one explicit asset ID. Irreversible; no restore or cancellation. Scoped keys need explicit delete permission. Acceptance starts background cleanup; cached/offline copies may remain.

输入参数asset_id必填

bulk_delete_assets

Permanently delete 1–100 explicit asset IDs. Inspect each result: a successful HTTP request can contain failed items. Scoped keys require delete permission. No query-based deletion or undo.

输入参数asset_ids必填

版本历史

2
  1. v2.0.3最新Oct 24, 2026
  2. v2.0.2Oct 19, 2026

评分

已满足适用检查项的 90%

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

  • 近 30 天内可连通25 分
  • 已声明认证方式10 分

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

  • 已列出工具必需15 分
  • 描述必需15 分
  • 图标10 分
  • 文档15 分
  • 许可证10 分