TinyPNG MCP by usefulapi
Compress, resize and convert images with TinyPNG by URL, and check this month's compression count.
¿Debería usar esto?
Calidad y seguridad
Basado en el análisis automatizado de las definiciones de herramientas y el cumplimiento del protocolo.
Costo de contexto
Este es el número aproximado de tokens que se consumen cada vez que las herramientas del servidor se cargan en el contexto de un modelo. Los recuentos más altos reducen la atención disponible para otras tareas.
Instalar
Instalación con un clic
Agrega esto a tu archivo `claude_desktop_config.json`:
{
"mcpServers": {
"tinypng": {
"url": "https://tinypng.usefulapi.io/mcp"
}
}
}Puntos de conexión remotos
https://tinypng.usefulapi.io/mcpstreamable-httpQué puede hacer
Inventario de herramientas
Herramientas (4)
🟡tinypng_compress_image(url)
WRITE (uses quota): ask TinyPNG (Tinify) to fetch a public image by URL and compress it (JPEG, PNG, WebP, AVIF or JPEG XL). Returns the output_url (Tinify's Location address of the compressed image), the compressed size and type, the savings when the input size is known, and the Compression-Count header (compressions used this month). The image is stored by Tinify for about 48 hours; output_url needs your API key, so use tinypng_download_image to get the bytes and tinypng_transform_image to resize, convert or keep metadata. Each compression counts against the monthly quota of your Tinify API key (the free plan includes 500 per month); resizing and converting count one extra compression each. POST /shrink.
Esquema de entrada
{
"type": "object",
"properties": {
"url": {
"type": "string",
"minLength": 8,
"maxLength": 2048,
"description": "Public http(s) URL of the image to compress. Tinify's servers fetch it, so it must be reachable from the internet."
}
},
"required": [
"url"
],
"$schema": "https://json-schema.org/draft/2020-12/schema"
}🟡tinypng_transform_image(output_url, resize_method, resize_width, resize_height, convert_to, ...)
WRITE (uses quota): apply a resize, a format conversion and/or metadata preservation to an image compressed earlier (the output_url from tinypng_compress_image, valid about 48 hours). Returns the resulting type, byte size, width, height and Compression-Count; the image itself is returned too when include_image is true and it is under 1 MB. Resize: method scale (give width OR height), or fit / cover / thumb (give width AND height); images are never scaled up. Convert: one or more of image/webp, image/jpeg, image/png, image/avif, image/jxl (several = the smallest is returned) or */* (the smallest of WebP, JPEG, PNG); converting a transparent image to JPEG needs a background colour. Preserve: copyright, creation, location (location is JPEG only) keeps that metadata, which makes the file slightly larger. Each call is a fresh request: resize and convert each count one extra compression on your monthly Tinify quota, preserve is free. Tinify returns the bytes only (no new URL), so only include_image gives you the transformed file, and only when it is under 1 MB. POST /output/{id}.
Esquema de entrada
{
"type": "object",
"properties": {
"output_url": {
"type": "string",
"minLength": 4,
"maxLength": 500,
"description": "The output_url returned by tinypng_compress_image (https://api.tinify.com/output/<id>), or just the id. Outputs are kept by Tinify for about 48 hours."
},
"resize_method": {
"description": "Resize method. scale: width or height; fit/cover/thumb: width and height.",
"type": "string",
"enum": [
"scale",
"fit",
"cover",
"thumb"
]
},
"resize_width": {
"description": "Target width in pixels.",
"type": "integer",
"minimum": 1,
"maximum": 20000
},
"resize_height": {
"description": "Target height in pixels.",
"type": "integer",
"minimum": 1,
"maximum": 20000
},
"convert_to": {
"description": "Target type(s), e.g. [\"image/webp\"]. Several = the smallest result is returned. [\"*/*\"] = the smallest of WebP, JPEG, PNG.",
"minItems": 1,
"maxItems": 6,
"type": "array",
"items": {
"type": "string",
"enum": [
"image/webp",
"image/jpeg",
"image/png",
"image/avif",
"image/jxl",
"*/*"
]
}
},
"background": {
"description": "Background for transparent areas when converting to a type without transparency (JPEG): \"#rrggbb\", \"white\" or \"black\". Only with convert_to.",
"type": "string",
"pattern": "^(#[0-9a-fA-F]{6}|white|black)$"
},
"preserve": {
"description": "Metadata to keep: copyright, creation, location (JPEG only).",
"minItems": 1,
"maxItems": 3,
"type": "array",
"items": {
"type": "string",
"enum": [
"copyright",
"creation",
"location"
]
}
},
"include_image": {
"description": "Also return the resulting image (only when it is under 1 MB). Default false: sizes only.",
"type": "boolean"
}
},
"required": [
"output_url"
],
"$schema": "https://json-schema.org/draft/2020-12/schema"
}🟢tinypng_download_image(output_url)
Fetch the compressed image of an earlier tinypng_compress_image (its output_url, valid about 48 hours) and return it as an image with its type, byte size, width and height. Images over 1 MB are described but not returned inline. Downloading does not use extra compression quota. GET /output/{id}.
Esquema de entrada
{
"type": "object",
"properties": {
"output_url": {
"type": "string",
"minLength": 4,
"maxLength": 500,
"description": "The output_url returned by tinypng_compress_image (https://api.tinify.com/output/<id>), or just the id. Outputs are kept by Tinify for about 48 hours."
}
},
"required": [
"output_url"
],
"$schema": "https://json-schema.org/draft/2020-12/schema"
}🟢tinypng_get_usage
How many compressions your Tinify API key has used this calendar month (the Compression-Count header), and whether the key is valid. The check sends an empty request that Tinify refuses, so nothing is compressed and no quota is used. Compare with your Tinify plan (the free plan includes 500 per month). POST /shrink with no body.
Esquema de entrada
{
"type": "object",
"properties": {},
"$schema": "https://json-schema.org/draft/2020-12/schema"
}Comunidad
Evidencia