tinypng-mcp-server
## MCP server for TinyPNG
[](https://smithery.ai/server/@aiyogg/tinypng-mcp-server) [](https://mseep.ai/app/aiyogg-tinypng-mcp-server)
<a href="https://glama.ai/mcp/servers/@aiyogg/tinypng-mcp-server">
<img width="380" height="200" src="https://glama.ai/mcp/servers/@aiyogg/tinypng-mcp-server/badge" alt="tinypng-mcp-server MCP server" />
</a>
### Usage
### Use `bun` or `node` to run the server
1. Install dependencies and build
```bash
pnpm i
pnpm build
```
2. Edit the `mcp.json` file
```json
{
"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](https://smithery.ai/server/@aiyogg/tinypng-mcp-server):
```bash
npx -y @smithery/cli install @aiyogg/tinypng-mcp-server --client claude
```
### Tools
1. Compress local image
```js
{
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
```js
{
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'],
},
}
```TDQS
Scored across 3 tools
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.