Server data from the Official MCP Registry
Compress, resize, crop, and convert images with the Tinify.dev API from any MCP client.
Compress, resize, crop, and convert images with the Tinify.dev API from any MCP client.
This MCP server is well-designed with strong security practices. Authentication is properly required via environment variables, input validation is comprehensive, and file operations are carefully guarded against overwrites. The codebase exhibits excellent error handling and honest behavior (e.g., refusing to silently write byte-identical files). Minor observations around logging and error message detail do not materially impact security. Supply chain analysis found 2 known vulnerabilities in dependencies (2 critical, 0 high severity). Package verification found 1 issue.
7 files analyzed · 6 issues found
Security scores are indicators to help you make informed decisions, not guarantees. Always review permissions before connecting any MCP server.
This plugin requests these system permissions. Most are normal for its category.
Set these up before or after installing:
Environment variable: TINIFY_API_KEY
Environment variable: TINIFY_BASE_URL
Add this to your MCP configuration file:
{
"mcpServers": {
"dev-tinify-mcp": {
"env": {
"TINIFY_API_KEY": "your-tinify-api-key-here",
"TINIFY_BASE_URL": "your-tinify-base-url-here"
},
"args": [
"-y",
"@tinify-dev/mcp"
],
"command": "npx"
}
}
}From the project's GitHub README.
MCP (Model Context Protocol) server for the Tinify.dev image API. Lets Claude, Cursor, and any other MCP client compress, resize, crop, and convert local images — with honest results.
You: compress the screenshots in ~/Desktop/launch/
Claude: 312.4 KB → 97.1 KB (-68.9%), wrote /Users/you/Desktop/launch/hero.min.png
84.2 KB → 84.2 KB — logo.png is already as small as Tinify.dev can make it
(optimized: false), so no file was written.
optimized: false) instead of writing a byte-identical "optimized" copy.<name>.min.<ext> beside the input, or to an explicit output_path. Replacing a file requires overwrite: true.structuredContent on every call, so agents can do math instead of parsing prose.Not affiliated with TinyPNG. This server talks to the Tinify.dev API.
Add to claude_desktop_config.json (Settings → Developer → Edit Config):
{
"mcpServers": {
"tinify": {
"command": "npx",
"args": ["-y", "@tinify-dev/mcp"],
"env": { "TINIFY_API_KEY": "tnf_live_..." }
}
}
}
claude mcp add tinify -e TINIFY_API_KEY=tnf_live_... -- npx -y @tinify-dev/mcp
Create .cursor/mcp.json in your project (or ~/.cursor/mcp.json globally):
{
"mcpServers": {
"tinify": {
"command": "npx",
"args": ["-y", "@tinify-dev/mcp"],
"env": { "TINIFY_API_KEY": "tnf_live_..." }
}
}
}
The same five tools are available as a hosted streamable-HTTP MCP server - no install, works from ChatGPT connectors, the claude.ai directory, and any registry that expects a URL:
Endpoint: https://api.tinify.dev/mcp
Auth: Authorization: Bearer tnf_live_... (or tnf_test_...)
Because the hosted server has no access to your filesystem, the image tools take base64 instead of paths: send image_base64 (optionally with filename), and the result comes back as base64 in structuredContent.image_base64 plus a text summary with byte counts. Inputs are capped at ~28 MB decoded (the 40 MB API limit minus base64 overhead); URLs are not accepted - the server never fetches remote content. get_usage is identical to the local version. Nothing is written to disk on either side.
Try it with curl:
curl -s https://api.tinify.dev/mcp \
-H "Authorization: Bearer tnf_live_..." \
-H "Content-Type: application/json" \
-H "Accept: application/json, text/event-stream" \
-d '{"jsonrpc":"2.0","id":1,"method":"initialize","params":{"protocolVersion":"2025-03-26","capabilities":{},"clientInfo":{"name":"curl","version":"0"}}}'
For local files, prefer the stdio server above - it reads and writes them directly with no base64 round-trip and no 28 MB cap.
| Tool | Arguments | Does |
|---|---|---|
compress_image | path (absolute), output_path?, quality_mode? (balanced/best_quality/lossless), target_size_kb? (beta), overwrite? | Compresses PNG/JPEG/WebP/AVIF. Writes <name>.min.<ext> beside the input. When the API returns optimized: false, nothing is written (unless you asked for an explicit output_path). |
resize_image | path, width?/height?/scale? (at least one), keep_aspect_ratio?, output_path?, overwrite? | Resizes and writes the result. |
crop_image | path, x, y, width, height, output_path?, overwrite? | Crops to a rectangle and writes the result. |
convert_image | path, format (avif/webp/jpeg/png), quality_mode?, output_path?, overwrite? | Converts formats (beta — the endpoint is rolling out server-side). Default output: <name>.min.<new-ext>. |
get_usage | — | Plan, billing period, operations used and remaining. |
All image tools require absolute paths (MCP servers run with an unpredictable working directory) and pre-check the 40 MB API limit locally. API errors come back as readable tool errors with the error code and request_id to quote to support.
env block of your MCP config.invalid_api_key — the key is wrong or revoked; create a new one at tinify.dev/developers.quota_exhausted (429) — the monthly quota is used up; run get_usage to see the period end./Users/you/img.png, not ./img.png.~/Library/Logs/Claude/mcp-server-tinify.log.MIT © Stian Larsen
Cursor: Add to Cursor - then set your real key in Cursor's MCP settings.
VS Code:
code --add-mcp '{"name":"tinify","command":"npx","args":["-y","@tinify-dev/mcp"],"env":{"TINIFY_API_KEY":"tnf_live_..."}}'
Codex CLI:
codex mcp add tinify --env TINIFY_API_KEY=tnf_live_... -- npx -y @tinify-dev/mcp
or in ~/.codex/config.toml:
[mcp_servers.tinify]
command = "npx"
args = ["-y", "@tinify-dev/mcp"]
[mcp_servers.tinify.env]
TINIFY_API_KEY = "tnf_live_..."
Claude Code plugin (MCP + image-optimization skill):
/plugin marketplace add Stianlars1/tinify-claude-plugin
/plugin install tinify@tinify
More: https://tinify.dev/mcp
Be the first to review this server!
by Modelcontextprotocol · Developer Tools
Web content fetching and conversion for efficient LLM usage
by Toleno · Developer Tools
Toleno Network MCP Server — Manage your Toleno mining account with Claude AI using natural language.
by mcp-marketplace · Developer Tools
Create, build, and publish Python MCP servers to PyPI — conversationally.