Skip to main content
Glama

MCP server for TinyPNG

Usage

Use bun or node to run the server

  1. Install dependencies and build

pnpm i
pnpm build
  1. 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'],
  },
}
  1. 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 tools
compress_local_imageC

Compress a local image file

ParametersJSON Schema
NameRequiredDescriptionDefault
imagePathYesThe ABSOLUTE path to the image file to compress
outputFormatNoThe format to save the compressed image file
outputPathNoThe ABSOLUTE path to save the compressed image file
preserveMetadataNoThe metadata to preserve in the image file

TDQS

C2.9/5.0
Behavior2/5

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. It states the tool compresses an image but lacks details on critical behaviors: whether it overwrites files, requires specific permissions, handles errors (e.g., invalid paths), or has performance implications (e.g., processing time). 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.

Conciseness5/5

Is the description appropriately sized, front-loaded, and free of redundancy?

The description is a single, efficient sentence with no wasted words. It front-loads the core purpose ('Compress a local image file') without unnecessary elaboration, making it easy to parse quickly.

Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.

Completeness2/5

Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?

For a tool with 4 parameters, no annotations, and no output schema, the description is incomplete. It doesn't address behavioral aspects like file handling, error conditions, or output details (e.g., what the tool returns), leaving significant gaps for an agent to understand and invoke it correctly.

Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.

Parameters3/5

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 four parameters. The description adds no parameter-specific information beyond implying 'local image file' relates to 'imagePath'. It doesn't explain interactions between parameters (e.g., how 'outputFormat' affects compression) or usage nuances, meeting the baseline for high schema coverage.

Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.

Purpose4/5

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'), distinguishing it from sibling tools like 'compress_remote_image' (local vs. remote) and 'resize_image' (compress vs. resize). However, it doesn't specify what compression entails (e.g., quality reduction, format conversion) beyond the basic verb.

Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.

Usage Guidelines2/5

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. It doesn't mention when to choose 'compress_local_image' over 'compress_remote_image' (e.g., for local vs. remote files) or 'resize_image' (e.g., for size reduction vs. dimension changes), nor does it specify prerequisites like file accessibility or format 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

ParametersJSON Schema
NameRequiredDescriptionDefault
imageUrlYesThe URL of the image file to compress
outputFormatNoThe format to save the compressed image file
outputPathNoThe ABSOLUTE path to save the compressed image file

TDQS

C2.9/5.0
Behavior2/5

Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?

With no annotations provided, the description carries full burden but offers minimal behavioral insight. It mentions compression but doesn't disclose quality loss, file size reduction expectations, network timeout behavior, authentication needs for remote URLs, or error handling. This is inadequate for a tool that processes external resources.

Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.

Conciseness5/5

Is the description appropriately sized, front-loaded, and free of redundancy?

The description is a single, efficient sentence with zero wasted words. It's front-loaded with the core purpose and appropriately sized for the tool's complexity.

Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.

Completeness2/5

Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?

For a tool that fetches and processes remote images with 3 parameters and no annotations or output schema, the description is insufficient. It lacks critical context about compression behavior, error scenarios, output expectations, and sibling tool differentiation, leaving significant gaps for an AI agent.

Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.

Parameters3/5

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 parameters. The description adds no additional meaning beyond implying 'imageUrl' is required, which is already clear from the schema. Baseline 3 is appropriate when schema does the heavy lifting.

Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.

Purpose4/5

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 ('remote image file'), specifying it works on images accessible via URL. It distinguishes from 'compress_local_image' by specifying 'remote' but doesn't explicitly differentiate from 'resize_image' beyond the core action.

Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.

Usage Guidelines2/5

Does the description explain when to use this tool, when not to, or what alternatives exist?

No guidance is provided on when to use this tool versus alternatives like 'compress_local_image' or 'resize_image'. The description only states what it does, not when it's appropriate or what prerequisites exist for remote image access.

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

ParametersJSON Schema
NameRequiredDescriptionDefault
heightYesThe height to resize the image to
imagePathYesThe ABSOLUTE path to the image file to resize
methodNoThe method describes the way your image will be resized.fit
outputPathNoThe ABSOLUTE path to save the resized image file
widthYesThe width to resize the image to

TDQS

C2.9/5.0
Behavior2/5

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. 'Resize an image file' implies a mutation operation but doesn't specify whether it modifies the original file or creates a new one, what formats are supported, error conditions, or performance characteristics. It lacks critical context for safe and effective use.

Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.

Conciseness5/5

Is the description appropriately sized, front-loaded, and free of redundancy?

The description is a single, efficient sentence that directly states the tool's function without unnecessary words. It's appropriately sized and front-loaded, making it easy for an agent to parse quickly.

Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.

Completeness2/5

Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?

For a mutation tool with 5 parameters, no annotations, and no output schema, the description is insufficient. It doesn't explain what the tool returns, how it handles errors, or the relationship between input and output files. Given the complexity and lack of structured data, more contextual information is needed.

Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.

Parameters3/5

Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?

Schema description coverage is 100%, so parameters are well-documented in the schema itself. The description adds no additional parameter information beyond the basic action. This meets the baseline of 3 since the schema does the heavy lifting, but the description doesn't enhance understanding of parameter interactions or constraints.

Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.

Purpose4/5

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 verb ('resize') and resource ('image file'), making the purpose immediately understandable. However, it doesn't differentiate from sibling tools like 'compress_local_image' or 'compress_remote_image' which serve different purposes (compression vs resizing), so it doesn't fully distinguish from alternatives.

Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.

Usage Guidelines2/5

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 its siblings. There's no mention of alternatives, prerequisites, or specific contexts where resizing is appropriate compared to compression tools. The agent must infer usage from tool names alone.

Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.

TDQS

B3.2/5.0
Disambiguation4/5

The tools are mostly distinct with clear purposes: compress_local_image and compress_remote_image handle compression for different image sources, while resize_image performs a different operation. However, the two compression tools could potentially be confused by an agent since they serve similar functions (compression) but differ only in input source, which might lead to misselection if the agent doesn't carefully parse the descriptions.

Naming Consistency5/5

All tool names follow a consistent verb_noun pattern using snake_case, with clear action-object naming: compress_local_image, compress_remote_image, and resize_image. The naming is predictable and readable throughout the set.

Tool Count3/5

With only 3 tools, the server feels somewhat thin for an image processing domain, as it covers only compression and resizing. While the tools are focused, the count is borderline low, potentially missing other common operations like format conversion, cropping, or filtering that agents might expect.

Completeness3/5

The tool surface covers basic image operations (compression and resizing) but has notable gaps for a complete image processing workflow. Missing operations include format conversion, cropping, filtering, or metadata handling, which could cause agent failures when trying to perform common image tasks beyond the provided scope.

Maintenance

ActivityInactive
ResponsivenessSyncing

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

Related MCP Servers

Latest Blog Posts

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/zhendi/tinypng-mcp-server'

If you have feedback or need assistance with the MCP directory API, please join our Discord server