@tinify-dev/mcp
Advanced tools
+24
-0
@@ -10,2 +10,26 @@ # Changelog | ||
| ## [0.1.6] - 2026-08-05 | ||
| ### Added | ||
| - ChatGPT attachment inputs on every hosted image tool using the documented | ||
| `openai/fileParams` file object contract. | ||
| - Temporary MCP `resource_link` results so ChatGPT can present the processed | ||
| image without moving megabytes of base64 through the model context. | ||
| - Bounded attachment downloads: HTTPS only, public DNS only, no redirects, | ||
| 30-second timeout, MIME checks, and the upstream 40 MB size limit. | ||
| - Per-tool OAuth metadata and the `tinify:use` scope for the hosted server. | ||
| - An environment-backed `/.well-known/openai-apps-challenge` endpoint for | ||
| OpenAI domain verification without checking a portal token into source. | ||
| ### Changed | ||
| - The hosted tools now accept exactly one of `image` (ChatGPT attachment) or | ||
| `image_base64` (portable fallback). Existing base64 callers still receive | ||
| `structuredContent.image_base64`. | ||
| - OAuth authorization codes, access tokens, and refresh tokens are bound to | ||
| the advertised MCP resource and cannot be exchanged for another resource. | ||
| - Hosted tool descriptions now state their private Tinify operation and | ||
| temporary result-link behavior for OpenAI review. | ||
| ## [0.1.5] - 2026-07-26 | ||
@@ -12,0 +36,0 @@ |
+2
-2
@@ -1126,5 +1126,5 @@ #!/usr/bin/env node | ||
| var SERVER_NAME = "tinify"; | ||
| var SERVER_VERSION = "0.1.5"; | ||
| var SERVER_VERSION = "0.1.6"; | ||
| var SERVER_TITLE = "Tinify image tools"; | ||
| var SERVER_DESCRIPTION = "Compress, resize, crop, and convert images with the Tinify.dev API. Honest results: never returns a larger file."; | ||
| var SERVER_DESCRIPTION = "Compress, resize, crop, and convert images with the Tinify.dev API. Returns exact sizes and reports when a result is larger."; | ||
| var SERVER_WEBSITE_URL = "https://tinify.dev/mcp"; | ||
@@ -1131,0 +1131,0 @@ var SERVER_ICON_URL = "https://tinify.dev/tinify-icon.png"; |
+6
-3
| { | ||
| "name": "@tinify-dev/mcp", | ||
| "version": "0.1.5", | ||
| "description": "MCP server for the Tinify.dev image API: compress, resize, crop, and convert images from Claude, Cursor, or any MCP client.", | ||
| "version": "0.1.6", | ||
| "description": "MCP server for the Tinify.dev image API: compress, resize, crop, and convert images from ChatGPT, Claude, Cursor, or any MCP client.", | ||
| "license": "MIT", | ||
@@ -38,2 +38,4 @@ "author": "Stian Larsen", | ||
| "webp", | ||
| "chatgpt", | ||
| "openai", | ||
| "claude", | ||
@@ -49,3 +51,4 @@ "cursor" | ||
| "test:watch": "vitest", | ||
| "smoke": "node scripts/stdio-smoke.mjs" | ||
| "smoke": "node scripts/stdio-smoke.mjs", | ||
| "build:mcpb": "tsup --config tsup.mcpb.config.ts" | ||
| }, | ||
@@ -52,0 +55,0 @@ "dependencies": { |
+35
-2
| # @tinify-dev/mcp | ||
| MCP (Model Context Protocol) server for the [Tinify.dev](https://tinify.dev/developers) image API. Lets Claude, Cursor, and any other MCP client compress, resize, crop, and convert local images — with honest results. | ||
| MCP (Model Context Protocol) server for the [Tinify.dev](https://tinify.dev/developers) image API. Lets ChatGPT, Claude, Cursor, and other MCP clients compress, resize, crop, and convert images — with honest results. | ||
@@ -78,4 +78,21 @@ ```text | ||
| Because the hosted server has no access to your filesystem, the image tools take base64 instead of paths: send `image_base64` (optionally with `filename`), and the result comes back as base64 in `structuredContent.image_base64` plus a text summary with byte counts. Inputs are capped at ~28 MB decoded (the 40 MB API limit minus base64 overhead); URLs are not accepted - the server never fetches remote content. `get_usage` is identical to the local version. Nothing is written to disk on either side. | ||
| ### ChatGPT developer-mode connection | ||
| 1. In ChatGPT, open **Settings → Security and login** and enable **Developer mode**. | ||
| 2. Open [ChatGPT Plugins](https://chatgpt.com/plugins), select the plus button, and add `https://api.tinify.dev/mcp`. | ||
| 3. Complete **Connect Tinify** with a Tinify API key. | ||
| 4. Add the connection from the conversation's tools menu, attach a PNG/JPEG/WebP/AVIF, and ask: | ||
| ```text | ||
| Use Tinify to compress this image for the web. Show the original size, | ||
| result size, and percentage saved. | ||
| ``` | ||
| The hosted server cannot access local paths, so each image tool accepts exactly one of: | ||
| - `image` — the ChatGPT attachment object. ChatGPT fills this automatically because the descriptor advertises `openai/fileParams`. | ||
| - `image_base64` — a portable fallback for other MCP clients, capped at ~28 MB decoded. | ||
| ChatGPT attachment downloads are HTTPS-only, reject private/reserved network targets and redirects, time out after 30 seconds, and are capped at the Tinify API's 40 MB limit. Successful operations return exact byte metrics and a temporary MCP result link. Existing base64 callers also receive `structuredContent.image_base64` for backwards compatibility. `get_usage` is identical to the local version. Nothing is written to the user's filesystem. | ||
| Try it with curl: | ||
@@ -93,2 +110,18 @@ | ||
| ### One server, two transport adapters | ||
| This repository intentionally supports both OpenAI and Claude: | ||
| - The shared tool names, Tinify client, result metrics, errors, and annotations are platform-neutral. | ||
| - The stdio adapter uses absolute local paths and writes files for desktop/CLI clients such as Claude, Cursor, and Codex. | ||
| - The hosted adapter uses ChatGPT file attachments or base64 and returns temporary result links because hosted servers cannot read a user's filesystem. | ||
| An OpenAI-only repository would duplicate the Tinify logic and make behavior drift more likely. OpenAI-specific descriptor metadata stays as a small additive layer in the hosted adapter; a separate repository is not needed. | ||
| For public OpenAI submission, set the portal-provided domain token as | ||
| `OPENAI_APPS_CHALLENGE_TOKEN` in `/etc/tinify/mcp-http.env` and deploy the | ||
| matching nginx location from `deploy/nginx-location.conf`. The endpoint returns | ||
| only that token at `/.well-known/openai-apps-challenge`; do not commit the real | ||
| portal token. | ||
| ## Tools | ||
@@ -95,0 +128,0 @@ |
+2
-2
@@ -10,3 +10,3 @@ { | ||
| }, | ||
| "version": "0.1.5", | ||
| "version": "0.1.6", | ||
| "websiteUrl": "https://tinify.dev/mcp", | ||
@@ -25,3 +25,3 @@ "icons": [ | ||
| "identifier": "@tinify-dev/mcp", | ||
| "version": "0.1.5", | ||
| "version": "0.1.6", | ||
| "transport": { | ||
@@ -28,0 +28,0 @@ "type": "stdio" |
59399
5.44%201
19.64%