@tinify-ai/mcp-server
MCP server for tinify.ai image optimization. AI-powered upscaling, resizing/cropping, compression, and SEO filename & alt text generation — all in one tool.
README
@tinify-ai/mcp-server
MCP server for tinify.ai image optimization. AI-powered upscaling, resizing/cropping, compression, and SEO filename & alt text generation — all in one tool.
Quick Start
Add to your MCP client config:
{
"mcpServers": {
"tinify": {
"command": "npx",
"args": ["-y", "@tinify-ai/mcp-server@latest"]
}
}
}
No signup required. Works out of the box with 20 free daily credits.
Client-Specific Setup
<details> <summary><strong>Claude Desktop</strong></summary>
Edit ~/Library/Application Support/Claude/claude_desktop_config.json (macOS) or %APPDATA%\Claude\claude_desktop_config.json (Windows):
{
"mcpServers": {
"tinify": {
"command": "npx",
"args": ["-y", "@tinify-ai/mcp-server@latest"]
}
}
}
</details>
<details> <summary><strong>Claude Code</strong></summary>
claude mcp add tinify -- npx -y @tinify-ai/mcp-server@latest
</details>
<details> <summary><strong>Cursor</strong></summary>
Add to .cursor/mcp.json in your project root:
{
"mcpServers": {
"tinify": {
"command": "npx",
"args": ["-y", "@tinify-ai/mcp-server@latest"]
}
}
}
</details>
<details> <summary><strong>Windsurf</strong></summary>
Edit ~/.codeium/windsurf/mcp_config.json:
{
"mcpServers": {
"tinify": {
"command": "npx",
"args": ["-y", "@tinify-ai/mcp-server@latest"]
}
}
}
</details>
<details> <summary><strong>Cline</strong></summary>
Open Cline settings → MCP Servers → Add, then paste:
{
"mcpServers": {
"tinify": {
"command": "npx",
"args": ["-y", "@tinify-ai/mcp-server@latest"]
}
}
}
</details>
<details> <summary><strong>Gemini CLI</strong></summary>
gemini mcp add --transport stdio tinify npx -y @tinify-ai/mcp-server@latest
Or edit ~/.gemini/settings.json (global) or .gemini/settings.json in your project root:
{
"mcpServers": {
"tinify": {
"command": "npx",
"args": ["-y", "@tinify-ai/mcp-server@latest"]
}
}
}
Verify it's running inside Gemini CLI with /mcp list.
</details>
<details> <summary><strong>OpenAI Codex CLI</strong></summary>
codex mcp add tinify -- npx -y @tinify-ai/mcp-server@latest
Or edit ~/.codex/config.toml manually:
[mcp_servers.tinify]
command = "npx"
args = ["-y", "@tinify-ai/mcp-server@latest"]
</details>
Tool: optimize_image
Optimizes an image with smart lossy compression (typically 60-80% size reduction), optional resize/upscale/format conversion, and AI-generated SEO metadata. Accepts absolute local file paths or remote URLs.
Parameters
| Parameter | Type | Required | Default | Description |
|---|---|---|---|---|
input |
string | Yes | — | Absolute local file path or remote URL |
output_path |
string | No | auto | File path or directory (ending in /). If omitted: saves next to original with SEO slug or .tinified suffix |
output_format |
string | No | original | jpg, png, webp, avif, gif, or original |
output_width_px |
int | No | — | Target width in pixels |
output_height_px |
int | No | — | Target height in pixels |
output_upscale_factor |
int | No | — | AI upscale factor: 2 (2×) or 4 (4×) |
output_resize_behavior |
string | No | pad | pad (white padding) or crop (smart crop). Only used when both width and height are set |
output_seo_tag_gen |
bool | No | true | Generate SEO metadata and rename file to SEO slug. Costs 1 extra credit |
output_file_size_limit |
int | No | — | Target maximum output file size in bytes. Server attempts to meet this via additional compression. Not guaranteed |
gif_frame_limit |
int | No | 100 | Max frames to process for animated GIFs (1–100). Reduces credit cost by sampling fewer frames |
confirm_gif_cost |
bool | No | — | Set to true to proceed after reviewing the animated GIF cost warning. Required for animated GIFs |
Resize Behavior
| Dimensions provided | Behavior | output_resize_behavior |
|---|---|---|
| Width only | Proportional scale | N/A |
| Height only | Proportional scale | N/A |
| Width + Height | Exact dimensions, white padding | pad (default) |
| Width + Height | Exact dimensions, smart crop | crop |
Examples
Basic compression — just compress, keep format and dimensions:
{ "input": "/Users/me/photos/hero.png" }
Convert to WebP:
{ "input": "/Users/me/hero.png", "output_format": "webp" }
Resize proportionally — set one dimension, the other scales:
{ "input": "/Users/me/hero.png", "output_width_px": 1200 }
Exact dimensions with padding — white bars fill the gap:
{ "input": "/Users/me/hero.png", "output_width_px": 1080, "output_height_px": 1080 }
Exact dimensions with smart crop:
{ "input": "/Users/me/hero.png", "output_width_px": 1080, "output_height_px": 1080, "output_resize_behavior": "crop" }
AI upscale 4x:
{ "input": "/Users/me/icon.png", "output_upscale_factor": 4 }
From URL, save to directory:
{ "input": "https://example.com/photo.jpg", "output_path": "/Users/me/assets/" }
Skip SEO to save 1 credit:
{ "input": "/Users/me/hero.png", "output_seo_tag_gen": false }
Output
Returns a text summary and structured metadata:
Optimized: /Users/me/photos/modern-office-workspace.webp
Size: 142.3 KB
Compression: 73%
Format: webp
Dimensions: 1920x1080
Alt text: Modern office workspace with laptop and coffee cup on wooden desk
Structured output fields:
{
"output_path": "/Users/me/photos/modern-office-workspace.webp",
"output_size_bytes": 145715,
"output_width_px": 1920,
"output_height_px": 1080,
"output_format": "webp",
"compression_ratio": 0.27,
"seo_alt_text": "Modern office workspace with laptop and coffee cup on wooden desk",
"seo_keywords": ["office", "workspace", "laptop", "desk", "modern"],
"seo_filename": "modern-office-workspace"
}
Supported Formats
| Format | Input | Output | Notes |
|---|---|---|---|
| JPG | Yes | Yes | |
| PNG | Yes | Yes | |
| WebP | Yes | Yes | |
| AVIF | Yes | Yes | |
| GIF | Yes | Yes | Animated GIFs preserved when output is GIF |
| SVG | Yes | Yes | SVG→SVG optimized via SVGO; raster↔SVG conversion supported |
| ICO | Yes | Yes | Smart rebuild: generates 16, 24, 32, 48, 256px favicon set |
| HEIC/HEIF | Yes* | No | Auto-converted to JPG at upload |
| TIFF | Yes* | No | Auto-converted to JPG at upload |
| BMP | Yes* | No | Auto-converted to JPG at upload |
tinify.ai supports high-quality conversion between any input and output format combination. Converting an animated GIF to a non-GIF format (JPG, PNG, WebP, AVIF) preserves only the first frame. Converting an animated GIF to a GIF format supports upscaling/resizing while preserving the animation and quality. You may also reduce animated GIF file size by decreasing the number of output frames.
Max upload file size: 50 MB.
SVG & ICO Examples
# Optimize an SVG file (keeps as vector)
Optimize logo.svg and keep it as SVG
# Convert SVG to raster
Convert icon.svg to a 512x512 PNG
# Trace raster to vector SVG
Convert my logo.png to a vector SVG
# Generate favicon set from any image
Convert logo.png to an ICO favicon
# Generate single-size ICO
Convert logo.png to a 32x32 ICO
# Extract largest icon from ICO
Convert favicon.ico to PNG
How It Works
Local file or URL
→ Upload to Tinify.ai API
→ Smart compression (lossy, typically 60-80% reduction)
→ AI SEO tag generation (alt text, keywords, filename)
→ Optional: resize, upscale, format conversion
→ Download optimized file
→ Save with SEO filename slug (or .tinified suffix if SEO disabled)
All processing happens server-side via the Tinify.ai API. The MCP server is a thin client that orchestrates the pipeline.
Credits
| Guest | Free | Pro | Max | |
|---|---|---|---|---|
| Credits/day or month | 20/day | 50/day | 3,000/month | 10,000/month |
| Images/day (default settings) | ~5 | ~12 | ~750 | ~2,500 |
| Cost per image | 3 credits + 1 SEO | same | same | same |
| Signup required | No | Free signup | Paid | Paid |
Session data is stored locally at ~/.tinify/session.json and persists across invocations.
Account & Credits
Log in to unlock more credits and share them across the web app and MCP server:
Use the login tool to sign in.
Use the status tool to check your current credits.
Use the upgrade tool to open the pricing page.
Use the logout tool to sign out.
login
Opens a browser window to complete login (Google, Facebook, or email/magic link). After approval, your account is linked and credits are shared with the web app.
Login complete: user@example.com (Pro tier, 2,850 of 3,000 credits remaining)
status
Check your current account status and credits before batch processing:
Logged in as user@example.com (Pro tier)
Credits: 2,850 of 3,000 remaining
Resets: 03/01/2026, 12:00 AM PST
logout
Revokes the session and reverts to guest mode (20 credits/day).
upgrade
Opens tinify.ai/pricing in your browser.
Tips for AI Agents
Paste this into your CLAUDE.md or system prompt to help agents use the tool effectively:
## Tinify.ai MCP
Tools: optimize_image, login, logout, status, upgrade
- Use status to check credits before batch processing
- Each optimize_image call costs 3 credits + 1 if SEO enabled (default)
- Guest: 20 credits/day. Free account: 50/day. Pro: 3,000/month.
- Always use absolute file paths, not relative.
- Set only width OR height for proportional resize. Set both for exact dimensions.
- When both dimensions are set, use output_resize_behavior: "crop" for photos, "pad" for logos/icons.
- output_seo_tag_gen (default true) renames the file to an SEO slug and generates alt text + keywords.
- Set output_seo_tag_gen: false to save 1 credit when SEO metadata is not needed.
- GIF is supported for both input and output; animated GIFs stay animated when output_format is "gif".
- Converting an animated GIF to jpg/png/webp/avif preserves only the first frame.
- HEIC, TIFF, BMP inputs are auto-converted to JPG.
- For batch processing, call optimize_image once per file.
- If credits run out, use login to sign in or upgrade to open pricing.
Troubleshooting
Server not appearing in tool list:
- Restart your MCP client after editing the config
- Ensure Node.js >= 18 is installed:
node --version - Try running directly:
npx -y @tinify-ai/mcp-server@latest(should start without errors)
"Insufficient credits" error:
- Use the
statustool to check remaining credits - Use the
logintool to sign in for more credits (free accounts get 50/day) - Use the
upgradetool to see paid plans (Pro: 3,000/month, Max: 10,000/month) - Disable SEO tags (
output_seo_tag_gen: false) to reduce cost to 3 credits/image
Login browser window doesn't open:
- Open this URL manually:
https://tinify.ai/mcp/authorizeand enter the code shown in the terminal - Ensure a browser is installed and accessible
Session token issues:
- Session data is stored at
~/.tinify/session.json - Delete this file to reset and start fresh
- Use
logoutthenloginto re-authenticate
File not found:
- Use absolute paths for local files
- For URLs, ensure the image is publicly accessible
Timeout errors:
- Large images or AI upscaling can take 30-60 seconds
- The server has a 60-second timeout per job
Requirements
- Node.js >= 18
- An MCP-compatible client (Claude Desktop, Claude Code, Cursor, Windsurf, Cline, OpenAI Codex CLI, Gemini CLI, etc.)
License
MIT - see LICENSE.
推荐服务器
Baidu Map
百度地图核心API现已全面兼容MCP协议,是国内首家兼容MCP协议的地图服务商。
Playwright MCP Server
一个模型上下文协议服务器,它使大型语言模型能够通过结构化的可访问性快照与网页进行交互,而无需视觉模型或屏幕截图。
Magic Component Platform (MCP)
一个由人工智能驱动的工具,可以从自然语言描述生成现代化的用户界面组件,并与流行的集成开发环境(IDE)集成,从而简化用户界面开发流程。
Audiense Insights MCP Server
通过模型上下文协议启用与 Audiense Insights 账户的交互,从而促进营销洞察和受众数据的提取和分析,包括人口统计信息、行为和影响者互动。
VeyraX
一个单一的 MCP 工具,连接你所有喜爱的工具:Gmail、日历以及其他 40 多个工具。
graphlit-mcp-server
模型上下文协议 (MCP) 服务器实现了 MCP 客户端与 Graphlit 服务之间的集成。 除了网络爬取之外,还可以将任何内容(从 Slack 到 Gmail 再到播客订阅源)导入到 Graphlit 项目中,然后从 MCP 客户端检索相关内容。
Kagi MCP Server
一个 MCP 服务器,集成了 Kagi 搜索功能和 Claude AI,使 Claude 能够在回答需要最新信息的问题时执行实时网络搜索。
e2b-mcp-server
使用 MCP 通过 e2b 运行代码。
Neon MCP Server
用于与 Neon 管理 API 和数据库交互的 MCP 服务器
Exa MCP Server
模型上下文协议(MCP)服务器允许像 Claude 这样的 AI 助手使用 Exa AI 搜索 API 进行网络搜索。这种设置允许 AI 模型以安全和受控的方式获取实时的网络信息。