home / mcp / tinify mcp server
Provides batch image compression, resizing, and format conversion using TinyPNG API via MCP.
Configuration
View docs{
"mcpServers": {
"alvinnn1-tinify-mcp": {
"command": "npx",
"args": [
"-y",
"mcp-tinify-image"
],
"env": {
"TINIFY_API_KEY": "YOUR_TINIFY_API_KEY"
}
}
}
}This TinyPNG MCP Server provides image optimization capabilities by leveraging the TinyPNG API through the MCP (Model Context Protocol). You can batch-compress images, convert formats, resize, and override originals to save storage, all controllable via MCP clients or command-line tools.
You interact with the Tinify MCP server through an MCP client. You configure the client to run the server locally as a stdio (local) process, or connect remotely via HTTP if available. The server exposes three core tools to process images: bulk compression, resizing, and format conversion. Use these tools to automate image optimization in your workflows.
Key setup steps include attaching your TinyPNG API key securely, launching the MCP server helper, and invoking the appropriate tool for your task. The configurable MCP entry points are designed to integrate with your existing MCP client ecosystem, so you can orchestrate image processing as part of larger pipelines.
The provided configuration example shows how to register the MCP server client locally. You place your API key in the environment for safe access by the server runner.
{
"mcpServers": {
"tinify_image": {
"command": "npx",
"args": [
"-y",
"mcp-tinify-image"
],
"env": {
"TINIFY_API_KEY": "YOUR_TINIFY_API_KEY"
}
}
}
}Prerequisites you need before installing and running the MCP server: Node.js installed on your system, with a recommended version of 20 or newer.
Step 1 – Ensure you have Node.js installed. You can download and install Node.js from the official sources for your operating system.
Step 2 – Obtain your TinyPNG API key. Create a TinyPNG Developer account and generate a free API key (up to 500 compressions per month). Keep this key secure as you will supply it to the MCP client.
Step 3 – Create your MCP client configuration. Save the following configuration in your MCP setup so your client can start the Tinify MCP server with the required key.
{
"mcpServers": {
"tinify_image": {
"command": "npx",
"args": [
"-y",
"mcp-tinify-image"
],
"env": {
"TINIFY_API_KEY": "YOUR_TINIFY_API_KEY"
}
}
}
}You can rely on three core tools to process images: minify_image, resize_image, and convert_image. Each tool is designed to handle common image workflows efficiently, with support for nested directories and multiple formats.
Security: manage your API key via environment variables and avoid embedding sensitive values in source files. TheTinify MCP runner reads the API key from the environment variable and uses it to authenticate with TinyPNG.
Batch compresses all supported images within a directory, including nested structures, reducing file size and saving storage.
Resizes a specific image according to the chosen method (fit, scale, cover, thumb) to create thumbnails or device-appropriate sizes.
Converts an image to another supported format (PNG, JPEG, WebP, AVIF), with optional background color and custom output path.