@tinify-dev/mcp
Advanced tools
+11
-5
@@ -612,2 +612,3 @@ #!/usr/bin/env node | ||
| import path from "path"; | ||
| var DOWNLOAD_TIMEOUT_MS = 45e3; | ||
| var SUPPORTED_EXTENSIONS = [ | ||
@@ -717,2 +718,7 @@ ".png", | ||
| } | ||
| if (error instanceof Error && (error.name === "TimeoutError" || error.name === "AbortError")) { | ||
| return errorResult( | ||
| "The image was processed but fetching the result timed out. Please try again." | ||
| ); | ||
| } | ||
| return errorResult( | ||
@@ -812,3 +818,3 @@ `Unexpected error: ${error instanceof Error ? error.message : String(error)}` | ||
| } | ||
| const blob = await client.download(result); | ||
| const blob = await client.download(result, { signal: AbortSignal.timeout(DOWNLOAD_TIMEOUT_MS) }); | ||
| await writeResult(outputPath, blob); | ||
@@ -881,3 +887,3 @@ const pct = changePercent(data.original_bytes, data.result_bytes); | ||
| const data = result.data; | ||
| const blob = await client.download(result); | ||
| const blob = await client.download(result, { signal: AbortSignal.timeout(DOWNLOAD_TIMEOUT_MS) }); | ||
| await writeResult(outputPath, blob); | ||
@@ -945,3 +951,3 @@ return textResult( | ||
| const data = result.data; | ||
| const blob = await client.download(result); | ||
| const blob = await client.download(result, { signal: AbortSignal.timeout(DOWNLOAD_TIMEOUT_MS) }); | ||
| await writeResult(outputPath, blob); | ||
@@ -1014,3 +1020,3 @@ return textResult( | ||
| const data = result.data; | ||
| const blob = await client.download(result); | ||
| const blob = await client.download(result, { signal: AbortSignal.timeout(DOWNLOAD_TIMEOUT_MS) }); | ||
| await writeResult(outputPath, blob); | ||
@@ -1087,3 +1093,3 @@ const dims = data.width !== null && data.height !== null ? ` (${data.width}x${data.height})` : ""; | ||
| var SERVER_NAME = "tinify"; | ||
| var SERVER_VERSION = "0.1.3"; | ||
| var SERVER_VERSION = "0.1.4"; | ||
| var SERVER_TITLE = "Tinify image tools"; | ||
@@ -1090,0 +1096,0 @@ var SERVER_DESCRIPTION = "Compress, resize, crop, and convert images with the Tinify.dev API. Honest results: never returns a larger file."; |
+1
-1
| { | ||
| "name": "@tinify-dev/mcp", | ||
| "version": "0.1.3", | ||
| "version": "0.1.4", | ||
| "description": "MCP server for the Tinify.dev image API: compress, resize, crop, and convert images from Claude, Cursor, or any MCP client.", | ||
@@ -5,0 +5,0 @@ "license": "MIT", |
+2
-2
@@ -10,3 +10,3 @@ { | ||
| }, | ||
| "version": "0.1.3", | ||
| "version": "0.1.4", | ||
| "websiteUrl": "https://tinify.dev/mcp", | ||
@@ -25,3 +25,3 @@ "icons": [ | ||
| "identifier": "@tinify-dev/mcp", | ||
| "version": "0.1.3", | ||
| "version": "0.1.4", | ||
| "transport": { | ||
@@ -28,0 +28,0 @@ "type": "stdio" |
53614
0.88%1187
0.51%