TinyPNG
About
Integrates with TinyPNG API to compress and resize both local and remote images with detailed optimization statistics for efficient image processing workflows.
Details
- Author
- aiyogg
- Repository
- aiyogg/tinypng-mcp-server
- GitHub stars
- 2
- Downloads
- 357
- License
- Apache License 2.0
- Categories
- Productivity, Developer Tools, Design, AI, Media, Infrastructure, Frontend, Other
- Tags
- #analytics
Jump to
- Compress local images via absolute file paths
- Compress remote images via URLs
- Optionally specify output path and output format
- Supports multiple image formats (enum SUPPORTED_IMAGE_TYPES)
- Lightweight setup with bun or node
Setting up with Highlight
This MCP is not yet compatible with Highlight’s one-click setup. However, you can still use it with Highlight by following these steps:
- Download and install Highlight from highlightai.com/download
- Navigate to the plugins tab and select "Add Custom Plugin"
-
Configure the plugin with the settings below
Plugin Name
TinyPNGCommand (node, npx, python, etc.)bunArguments-
Argument 1
/path/to/tinypng-mcp-server/src/index.ts
Environment-
TINYPNG_API_KEY
your-tinypng-api-key
Please refer to the README for specific instructions on how to obtain API keys or other required environment variables.
-
Argument 1
- Enable "Start Automatically" if you want the plugin to start when Highlight launches
From the repository
To install TinyPNG MCP Server for Claude Desktop automatically via Smithery:
npx -y @smithery/cli install @aiyogg/tinypng-mcp-server --client claude
compress_local_image
Compress a local image file. Parameters: imagePath (string, required) - The ABSOLUTE path to the image file to compress, outputPath (string) - The ABSOLUTE path to save the compressed image file, outputFormat (string) - The format to save the compressed image file.
compress_remote_image
Compress a remote image file by giving the URL of the image. Parameters: imageUrl (string, required) - The URL of the image file to compress, outputPath (string) - The ABSOLUTE path to save the compressed image file, outputFormat (string) - The format to save the compressed image file.
1. 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'],
},
}
2. 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'],
},
}
Claude Desktop / Cursor
Paste into your MCP client config file to install this server.
{
"mcpServers": {
"tinypng": {
"env": {
"TINYPNG_API_KEY": "your-tinypng-api-key"
},
"args": [
"/path/to/tinypng-mcp-server/src/index.ts"
],
"command": "bun"
}
}
}
Linux
{
"env": {
"TINYPNG_API_KEY": "your-tinypng-api-key"
},
"args": [
"/path/to/tinypng-mcp-server/src/index.ts"
],
"command": "bun"
}
Macos
{
"env": {
"TINYPNG_API_KEY": "your-tinypng-api-key"
},
"args": [
"/path/to/tinypng-mcp-server/src/index.ts"
],
"command": "bun"
}
Windows
{
"env": {
"TINYPNG_API_KEY": "your-tinypng-api-key"
},
"args": [
"/path/to/tinypng-mcp-server/src/index.ts"
],
"command": "bun"
}
MCP server for TinyPNG
<a href="https://glama.ai/mcp/servers/@aiyogg/tinypng-mcp-server">
</a>
Usage
Use bun or node to run the server
1. Install dependencies and build
pnpm i
pnpm build
2. Edit the mcp.json file
{
"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 claude
Tools
1. 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'],
},
}
2. 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'],
},
}
Sign in to leave a review
Use Google, GitHub, or an email account so ratings stay tied to real people.
No reviews posted yet.





