tinypng-mcp-server
This server provides image compression and manipulation using the TinyPNG API. It supports:
Compress local images: Reduce file size of local image files using absolute file paths while maintaining quality
Compress remote images: Compress images from URLs by downloading and processing them
Resize images: Change dimensions using various methods (scale, fit, cover, thumb) with specified width and height parameters
Format conversion: Convert between formats (JPEG, PNG, WebP, AVIF) during compression
Metadata preservation: Optionally preserve copyright, creation date, and location metadata during local image compression
Custom output paths: Save processed images to specified locations with custom filenames, or use auto-generated default paths
Click on "Install Server".
Wait a few minutes for the server to deploy. Once ready, it will show a "Started" state.
In the chat, type
@followed by the MCP server name and your instructions, e.g., "@tinypng-mcp-servercompress this local image at /Users/alex/Pictures/logo.png"
That's it! The server will respond to your query, and you can continue using it as needed.
Here is a step-by-step guide with screenshots.
MCP server for TinyPNG
Usage
Use bun or node to run the server
Install dependencies and build
pnpm i
pnpm buildEdit the
mcp.jsonfile
{
"mcpServers": {
"tinypng": {
"command": "bun", // or "node"
"args": ["/path/to/tinypng-mcp-server/src/index.ts"], // or "dist/index.js"
"env": {
"TINYPNG_API_KEY": "your-tinypng-api-key"
}
}
}
}Installing via Smithery
To install TinyPNG MCP Server for Claude Desktop automatically via Smithery:
npx -y @smithery/cli install @aiyogg/tinypng-mcp-server --client claudeTools
Compress local image
{
name: 'compress_local_image',
description: 'Compress a local image file',
inputSchema: {
type: 'object',
properties: {
imagePath: {
type: 'string',
description: 'The ABSOLUTE path to the image file to compress',
example: '/Users/user/Downloads/image.jpg',
},
outputPath: {
type: 'string',
description: 'The ABSOLUTE path to save the compressed image file',
example: '/Users/user/Downloads/image_compressed.jpg',
},
outputFormat: {
type: 'string',
description: 'The format to save the compressed image file',
enum: SUPPORTED_IMAGE_TYPES,
example: 'image/jpeg',
},
},
required: ['imagePath'],
},
}Compress remote image
{
name: 'compress_remote_image',
description: 'Compress a remote image file by giving the URL of the image',
inputSchema: {
type: 'object',
properties: {
imageUrl: {
type: 'string',
description: 'The URL of the image file to compress',
example: 'https://example.com/image.jpg',
},
outputPath: {
type: 'string',
description: 'The ABSOLUTE path to save the compressed image file',
example: '/Users/user/Downloads/image_compressed.jpg',
},
outputFormat: {
type: 'string',
description: 'The format to save the compressed image file',
enum: SUPPORTED_IMAGE_TYPES,
example: 'image/jpeg',
},
},
required: ['imageUrl'],
},
}Available Tools
3 toolscompress_local_imageC
Compress a local image file
| Name | Required | Description | Default |
|---|---|---|---|
| imagePath | Yes | The ABSOLUTE path to the image file to compress | |
| outputPath | No | The ABSOLUTE path to save the compressed image file | |
| outputFormat | No | The format to save the compressed image file | |
| preserveMetadata | No | The metadata to preserve in the image file |
TDQS
Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?
With no annotations provided, the description carries full burden but only states the basic action. It doesn't disclose behavioral traits like whether the operation is destructive (overwrites files), requires specific permissions, has performance implications, or what happens on failure. This is inadequate for a mutation tool with zero annotation coverage.
Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.
Is the description appropriately sized, front-loaded, and free of redundancy?
The description is a single, efficient sentence with zero wasted words. It's perfectly front-loaded with the core action and resource, making it immediately scannable and understandable without unnecessary elaboration.
Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.
Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?
For a mutation tool with 4 parameters, no annotations, and no output schema, the description is insufficient. It doesn't explain what 'compress' means operationally (e.g., quality reduction, format conversion), what the output looks like, or error conditions. The agent lacks critical context for proper tool invocation.
Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.
Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?
Schema description coverage is 100%, so parameters are fully documented in the schema. The description adds no additional parameter semantics beyond what's already in the structured data, maintaining the baseline score of 3 where schema does the heavy lifting.
Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.
Does the description clearly state what the tool does and how it differs from similar tools?
The description clearly states the action ('compress') and resource ('a local image file'), making the purpose immediately understandable. It distinguishes from 'compress_remote_image' by specifying 'local' but doesn't explicitly differentiate from 'resize_image' which might also involve compression.
Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.
Does the description explain when to use this tool, when not to, or what alternatives exist?
The description provides no guidance on when to use this tool versus alternatives like 'compress_remote_image' or 'resize_image'. There's no mention of prerequisites, use cases, or when not to use this tool, leaving the agent without contextual decision-making support.
Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.
compress_remote_imageC
Compress a remote image file by giving the URL of the image
| Name | Required | Description | Default |
|---|---|---|---|
| imageUrl | Yes | The URL of the image file to compress | |
| outputPath | No | The ABSOLUTE path to save the compressed image file | |
| outputFormat | No | The format to save the compressed image file |
TDQS
Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?
With no annotations provided, the description carries full burden for behavioral disclosure. It states the tool compresses a remote image but doesn't mention what compression entails (e.g., quality loss, file size reduction), whether it requires internet access to fetch the image, what happens if the URL is invalid, or what the output looks like (e.g., success/failure indicators). This leaves significant gaps for a tool that performs file operations.
Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.
Is the description appropriately sized, front-loaded, and free of redundancy?
The description is a single, efficient sentence that directly states the tool's purpose without any fluff. It's appropriately sized and front-loaded, with every word contributing to understanding the core functionality.
Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.
Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?
Given the tool's complexity (file processing with three parameters, no annotations, and no output schema), the description is incomplete. It doesn't explain what 'compress' means operationally, what the output entails, or potential errors. For a tool that modifies files and has no structured output documentation, more context is needed to guide effective use.
Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.
Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?
Schema description coverage is 100%, so the schema fully documents all three parameters (imageUrl, outputPath, outputFormat) with descriptions and examples. The description adds no additional parameter semantics beyond what's in the schema, meeting the baseline for high coverage.
Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.
Does the description clearly state what the tool does and how it differs from similar tools?
The description clearly states the verb 'compress' and the resource 'remote image file', specifying it works on images accessible via URL. It distinguishes from the sibling 'compress_local_image' by specifying 'remote', but doesn't differentiate from 'resize_image' which is a different operation.
Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.
Does the description explain when to use this tool, when not to, or what alternatives exist?
No guidance on when to use this tool versus alternatives is provided. The description doesn't mention when to choose this over 'compress_local_image' (for local files) or 'resize_image' (for resizing rather than compression), nor does it provide any context about prerequisites or constraints.
Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.
resize_imageC
Resize an image file
| Name | Required | Description | Default |
|---|---|---|---|
| imagePath | Yes | The ABSOLUTE path to the image file to resize | |
| outputPath | No | The ABSOLUTE path to save the resized image file | |
| method | No | The method describes the way your image will be resized. | fit |
| width | Yes | The width to resize the image to | |
| height | Yes | The height to resize the image to |
TDQS
Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?
With no annotations provided, the description carries the full burden of behavioral disclosure. 'Resize an image file' implies a transformation operation but reveals nothing about whether this modifies the original file, creates a new file, what file formats are supported, potential quality loss, or error conditions. This is inadequate for a tool with 5 parameters and no output schema.
Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.
Is the description appropriately sized, front-loaded, and free of redundancy?
The description is perfectly concise at just 4 words ('Resize an image file'). It's front-loaded with the core purpose and contains no unnecessary information, making it highly efficient for agent comprehension.
Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.
Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?
For a tool with 5 parameters, no annotations, and no output schema, the description is insufficiently complete. It doesn't explain what the tool returns, what happens to the original file, supported image formats, or any behavioral characteristics. The agent would need to guess about important operational details.
Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.
Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?
The schema description coverage is 100%, so the schema already fully documents all 5 parameters. The description adds no additional parameter information beyond what's in the schema, which meets the baseline expectation when schema coverage is complete.
Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.
Does the description clearly state what the tool does and how it differs from similar tools?
The description 'Resize an image file' clearly states the action (resize) and resource (image file), making the purpose immediately understandable. However, it doesn't differentiate this tool from its sibling tools (compress_local_image, compress_remote_image), which perform compression rather than resizing operations.
Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.
Does the description explain when to use this tool, when not to, or what alternatives exist?
The description provides no guidance on when to use this tool versus alternatives. There's no mention of its sibling tools or any other context that would help an agent decide between resizing and compression operations, leaving the agent without usage direction.
Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.
Tool Schema Changelog
Recent tool additions, removals, and schema changes observed during successful MCP inspections. Dates show when Glama detected each change.
3 tool updates
- First observed
compress_local_image - First observed
compress_remote_image - First observed
resize_image
TDQS
Each tool has a clearly distinct purpose: compress_local_image handles local files, compress_remote_image handles URLs, and resize_image performs a different operation entirely. There is no overlap or ambiguity between these three functions.
All tools follow a consistent verb_noun pattern with snake_case naming: compress_local_image, compress_remote_image, and resize_image. The naming is predictable and uniform throughout the set.
With 3 tools, this server is well-scoped for its purpose of image processing with TinyPNG. Each tool earns its place by covering distinct aspects: local compression, remote compression, and resizing. This is an appropriate number for the domain.
The tool surface covers the core operations for image compression and resizing with TinyPNG, handling both local and remote sources. A minor gap might be the lack of a tool for batch processing or metadata retrieval, but agents can work around this with sequential calls.
Maintenance
Resources
Unclaimed servers have limited discoverability.
Looking for Admin?
If you are the server author, to access and configure the admin panel.
Related MCP Connectors
Convert images to PNG, JPEG, WebP, or AVIF through one public remote MCP tool.
Image processing over MCP: compress and split images, generate images and QR codes.
41
Related MCP Servers
- AlicenseCqualityDmaintenanceImage Tools MCP is a Model Context Protocol (MCP) service that retrieves image dimensions and compresses images from URLs and local files using the TinyPNG API. It supports converting images to formats like webp, jpeg/jpg, and png, providing detailed information on width, height, type, and compressi21010MIT
- AlicenseCqualityCmaintenanceMCP server for local compression of various image formats11833MIT
- AlicenseBqualityDmaintenance🧙🏻 Integrated TinyPNG MCP server, quickly use TinyPNG through LLMs.39Apache 2.0
- AlicenseNot gradedqualityBmaintenanceMCP implementation for connecting to the Mochify image processing API to convert, compress and resize images.1MIT
Latest Blog Posts
- Who's Calling? MCP Hosts Are an Identity Blind Spot (And the Spec Knows It)By Om-Shree-0709 on .mcpAgent IdentityOAuth 2.1
- Your AI Chatbot Just Exposed Your CEO's Salary to an InternBy Om-Shree-0709 on .Agent IdentityMCP SecurityOAuth Delegation
- Why MCP Servers Need Execution Sandboxing (And Why Your Current Stack Isn't Enough)By Om-Shree-0709 on .Agentic AiPrompt InjectionWebAssembly
MCP directory API
We provide all the information about MCP servers via our MCP API.
curl -X GET 'https://glama.ai/api/mcp/v1/servers/aiyogg/tinypng-mcp-server'
If you have feedback or need assistance with the MCP directory API, please join our Discord server