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 分