@tinify-ai/mcp-server 1.0.2 → 1.0.4
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +19 -11
- package/dist/api/process.d.ts +1 -1
- package/dist/api/process.d.ts.map +1 -1
- package/dist/index.js +1 -1
- package/dist/index.js.map +1 -1
- package/dist/tools/optimize.d.ts +1 -1
- package/dist/tools/optimize.d.ts.map +1 -1
- package/package.json +12 -5
package/README.md
CHANGED
|
@@ -4,7 +4,7 @@
|
|
|
4
4
|
[](https://opensource.org/licenses/MIT)
|
|
5
5
|
[](https://modelcontextprotocol.io)
|
|
6
6
|
|
|
7
|
-
MCP server for [
|
|
7
|
+
MCP server for [tinify.ai](https://tinify.ai) image optimization. AI-powered upscaling, resizing/cropping, compression, and SEO tag generation — all in one tool.
|
|
8
8
|
|
|
9
9
|
## Quick Start
|
|
10
10
|
|
|
@@ -15,7 +15,7 @@ Add to your MCP client config:
|
|
|
15
15
|
"mcpServers": {
|
|
16
16
|
"tinify": {
|
|
17
17
|
"command": "npx",
|
|
18
|
-
"args": ["-y", "@tinify-ai/mcp-server"]
|
|
18
|
+
"args": ["-y", "@tinify-ai/mcp-server@latest"]
|
|
19
19
|
}
|
|
20
20
|
}
|
|
21
21
|
}
|
|
@@ -35,7 +35,7 @@ Edit `~/Library/Application Support/Claude/claude_desktop_config.json` (macOS) o
|
|
|
35
35
|
"mcpServers": {
|
|
36
36
|
"tinify": {
|
|
37
37
|
"command": "npx",
|
|
38
|
-
"args": ["-y", "@tinify-ai/mcp-server"]
|
|
38
|
+
"args": ["-y", "@tinify-ai/mcp-server@latest"]
|
|
39
39
|
}
|
|
40
40
|
}
|
|
41
41
|
}
|
|
@@ -46,7 +46,7 @@ Edit `~/Library/Application Support/Claude/claude_desktop_config.json` (macOS) o
|
|
|
46
46
|
<summary><strong>Claude Code</strong></summary>
|
|
47
47
|
|
|
48
48
|
```bash
|
|
49
|
-
claude mcp add tinify -- npx -y @tinify-ai/mcp-server
|
|
49
|
+
claude mcp add tinify -- npx -y @tinify-ai/mcp-server@latest
|
|
50
50
|
```
|
|
51
51
|
</details>
|
|
52
52
|
|
|
@@ -60,7 +60,7 @@ Add to `.cursor/mcp.json` in your project root:
|
|
|
60
60
|
"mcpServers": {
|
|
61
61
|
"tinify": {
|
|
62
62
|
"command": "npx",
|
|
63
|
-
"args": ["-y", "@tinify-ai/mcp-server"]
|
|
63
|
+
"args": ["-y", "@tinify-ai/mcp-server@latest"]
|
|
64
64
|
}
|
|
65
65
|
}
|
|
66
66
|
}
|
|
@@ -77,7 +77,7 @@ Edit `~/.codeium/windsurf/mcp_config.json`:
|
|
|
77
77
|
"mcpServers": {
|
|
78
78
|
"tinify": {
|
|
79
79
|
"command": "npx",
|
|
80
|
-
"args": ["-y", "@tinify-ai/mcp-server"]
|
|
80
|
+
"args": ["-y", "@tinify-ai/mcp-server@latest"]
|
|
81
81
|
}
|
|
82
82
|
}
|
|
83
83
|
}
|
|
@@ -86,7 +86,7 @@ Edit `~/.codeium/windsurf/mcp_config.json`:
|
|
|
86
86
|
|
|
87
87
|
## Tool: `optimize_image`
|
|
88
88
|
|
|
89
|
-
Optimizes an image with smart defaults:
|
|
89
|
+
Optimizes an image with smart defaults: AI-powered upscaling, resizing/cropping, compression, and SEO tag generation — all in one image optimization tool.
|
|
90
90
|
|
|
91
91
|
### Parameters
|
|
92
92
|
|
|
@@ -94,7 +94,7 @@ Optimizes an image with smart defaults: TinyPNG compression + SEO tag generation
|
|
|
94
94
|
|-----------|------|----------|---------|-------------|
|
|
95
95
|
| `input` | string | Yes | — | Local file path or remote URL |
|
|
96
96
|
| `output_path` | string | No | auto | Where to save the result |
|
|
97
|
-
| `output_format` | string | No | original |
|
|
97
|
+
| `output_format` | string | No | original | jpg, png, webp, avif, or original |
|
|
98
98
|
| `output_width_px` | int | No | — | Target width in pixels |
|
|
99
99
|
| `output_height_px` | int | No | — | Target height in pixels |
|
|
100
100
|
| `output_upscale_factor` | float | No | — | Scale factor (2.0, 4.0) |
|
|
@@ -141,9 +141,15 @@ Structured metadata is also returned with `seo_keywords`, `seo_filename`, and fu
|
|
|
141
141
|
|
|
142
142
|
| Format | Input | Output |
|
|
143
143
|
|--------|-------|--------|
|
|
144
|
-
|
|
|
144
|
+
| JPG | Yes | Yes |
|
|
145
145
|
| PNG | Yes | Yes |
|
|
146
146
|
| WebP | Yes | Yes |
|
|
147
|
+
| AVIF | Yes | Yes |
|
|
148
|
+
| HEIC/HEIF | Yes* | No |
|
|
149
|
+
| TIFF | Yes* | No |
|
|
150
|
+
| BMP | Yes* | No |
|
|
151
|
+
|
|
152
|
+
*Automatically converted to JPG at upload time.
|
|
147
153
|
|
|
148
154
|
Max file size: 50 MB.
|
|
149
155
|
|
|
@@ -152,7 +158,7 @@ Max file size: 50 MB.
|
|
|
152
158
|
```
|
|
153
159
|
Local file or URL
|
|
154
160
|
→ Upload to Tinify API
|
|
155
|
-
→
|
|
161
|
+
→ Smart compression (smart lossy, typically 60-80% reduction)
|
|
156
162
|
→ AI SEO tag generation (alt text, keywords, filename)
|
|
157
163
|
→ Optional: resize, upscale, format conversion
|
|
158
164
|
→ Download optimized file
|
|
@@ -172,12 +178,14 @@ All processing happens server-side via the [Tinify API](https://tinify.ai). The
|
|
|
172
178
|
|
|
173
179
|
Session tokens are stored locally at `~/.tinify/session.json` and persist across invocations.
|
|
174
180
|
|
|
181
|
+
Need more credits? See plans at [tinify.ai](https://tinify.ai/#pricing).
|
|
182
|
+
|
|
175
183
|
## Troubleshooting
|
|
176
184
|
|
|
177
185
|
**Server not appearing in tool list:**
|
|
178
186
|
- Restart your MCP client after editing the config
|
|
179
187
|
- Ensure Node.js >= 18 is installed: `node --version`
|
|
180
|
-
- Try running directly: `npx -y @tinify-ai/mcp-server` (should start without errors)
|
|
188
|
+
- Try running directly: `npx -y @tinify-ai/mcp-server@latest` (should start without errors)
|
|
181
189
|
|
|
182
190
|
**"Insufficient credits" error:**
|
|
183
191
|
- Free tier allows 20 credits/day (resets daily)
|
package/dist/api/process.d.ts
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"process.d.ts","sourceRoot":"","sources":["../../src/api/process.ts"],"names":[],"mappings":"AAEA,MAAM,WAAW,kBAAkB;IACjC,aAAa,CAAC,EAAE,UAAU,GAAG,
|
|
1
|
+
{"version":3,"file":"process.d.ts","sourceRoot":"","sources":["../../src/api/process.ts"],"names":[],"mappings":"AAEA,MAAM,WAAW,kBAAkB;IACjC,aAAa,CAAC,EAAE,UAAU,GAAG,KAAK,GAAG,KAAK,GAAG,MAAM,GAAG,MAAM,CAAC;IAC7D,qBAAqB,CAAC,EAAE,MAAM,CAAC;IAC/B,YAAY,CAAC,EAAE,MAAM,CAAC;IACtB,aAAa,CAAC,EAAE,MAAM,CAAC;IACvB,kBAAkB,CAAC,EAAE,OAAO,CAAC;IAC7B,kBAAkB,CAAC,EAAE,KAAK,GAAG,MAAM,CAAC;IACpC,kBAAkB,CAAC,EAAE,OAAO,CAAC;IAC7B,iBAAiB,CAAC,EAAE,OAAO,CAAC;CAC7B;AAED,UAAU,aAAa;IACrB,OAAO,EAAE,MAAM,CAAC;IAChB,WAAW,EAAE,MAAM,EAAE,CAAC;IACtB,QAAQ,EAAE,kBAAkB,CAAC;IAC7B,YAAY,EAAE,MAAM,GAAG,IAAI,CAAC;CAC7B;AAED,UAAU,OAAO;IACf,EAAE,EAAE,MAAM,CAAC;IACX,YAAY,EAAE,MAAM,CAAC;IACrB,MAAM,EAAE,MAAM,CAAC;CAChB;AAED,MAAM,WAAW,aAAa;IAC5B,OAAO,EAAE,OAAO,CAAC;IACjB,IAAI,EAAE,OAAO,EAAE,CAAC;IAChB,YAAY,EAAE,MAAM,CAAC;IACrB,iBAAiB,EAAE,MAAM,CAAC;CAC3B;AAED,wBAAsB,iBAAiB,CAAC,MAAM,EAAE,aAAa,GAAG,OAAO,CAAC,aAAa,CAAC,CAiCrF"}
|
package/dist/index.js
CHANGED
|
@@ -10,7 +10,7 @@ const server = new McpServer({
|
|
|
10
10
|
});
|
|
11
11
|
server.registerTool("optimize_image", {
|
|
12
12
|
title: "Optimize Image",
|
|
13
|
-
description: "Optimize an image with smart defaults:
|
|
13
|
+
description: "Optimize an image with smart defaults: AI-powered upscaling, resizing/cropping, compression, and SEO tag generation — all in one image optimization tool. " +
|
|
14
14
|
"Accepts local file paths or remote URLs. Returns the optimized file path and metadata.",
|
|
15
15
|
inputSchema: {
|
|
16
16
|
input: z
|
package/dist/index.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":";AAEA,OAAO,EAAE,SAAS,EAAE,MAAM,yCAAyC,CAAC;AACpE,OAAO,EAAE,oBAAoB,EAAE,MAAM,2CAA2C,CAAC;AACjF,OAAO,KAAK,CAAC,MAAM,KAAK,CAAC;AACzB,OAAO,EAAE,aAAa,EAAE,MAAM,qBAAqB,CAAC;AACpD,OAAO,EAAE,iBAAiB,EAAE,MAAM,aAAa,CAAC;AAEhD,MAAM,MAAM,GAAG,IAAI,SAAS,CAAC;IAC3B,IAAI,EAAE,QAAQ;IACd,OAAO,EAAE,OAAO;CACjB,CAAC,CAAC;AAEH,MAAM,CAAC,YAAY,CACjB,gBAAgB,EAChB;IACE,KAAK,EAAE,gBAAgB;IACvB,WAAW,EACT,
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":";AAEA,OAAO,EAAE,SAAS,EAAE,MAAM,yCAAyC,CAAC;AACpE,OAAO,EAAE,oBAAoB,EAAE,MAAM,2CAA2C,CAAC;AACjF,OAAO,KAAK,CAAC,MAAM,KAAK,CAAC;AACzB,OAAO,EAAE,aAAa,EAAE,MAAM,qBAAqB,CAAC;AACpD,OAAO,EAAE,iBAAiB,EAAE,MAAM,aAAa,CAAC;AAEhD,MAAM,MAAM,GAAG,IAAI,SAAS,CAAC;IAC3B,IAAI,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AC,iBAAiB,KAAK,IAAI;gBAC/B,CAAC,CAAC,gBAAgB,CAAC,MAAM,CAAC,iBAAiB,GAAG,GAAG,CAAC,CAAC,OAAO,CAAC,CAAC,CAAC,GAAG;gBAChE,CAAC,CAAC,IAAI;YACR,MAAM,CAAC,aAAa,CAAC,CAAC,CAAC,WAAW,MAAM,CAAC,aAAa,EAAE,CAAC,CAAC,CAAC,IAAI;YAC/D,MAAM,CAAC,eAAe,IAAI,MAAM,CAAC,gBAAgB;gBAC/C,CAAC,CAAC,eAAe,MAAM,CAAC,eAAe,IAAI,MAAM,CAAC,gBAAgB,EAAE;gBACpE,CAAC,CAAC,IAAI;YACR,MAAM,CAAC,YAAY,CAAC,CAAC,CAAC,aAAa,MAAM,CAAC,YAAY,EAAE,CAAC,CAAC,CAAC,IAAI;SAChE;aACE,MAAM,CAAC,OAAO,CAAC;aACf,IAAI,CAAC,IAAI,CAAC,CAAC;QAEd,OAAO;YACL,OAAO,EAAE,CAAC,EAAE,IAAI,EAAE,MAAe,EAAE,IAAI,EAAE,OAAO,EAAE,CAAC;YACnD,iBAAiB,EAAE,MAAM;SAC1B,CAAC;IACJ,CAAC;IAAC,OAAO,KAAK,EAAE,CAAC;QACf,OAAO,iBAAiB,CAAC,KAAK,CAAC,CAAC;IAClC,CAAC;AACH,CAAC,CACF,CAAC;AAEF,MAAM,SAAS,GAAG,IAAI,oBAAoB,EAAE,CAAC;AAC7C,MAAM,MAAM,CAAC,OAAO,CAAC,SAAS,CAAC,CAAC"}
|
package/dist/tools/optimize.d.ts
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
export interface OptimizeImageParams {
|
|
2
2
|
input: string;
|
|
3
3
|
output_path?: string;
|
|
4
|
-
output_format?: "original" | "
|
|
4
|
+
output_format?: "original" | "jpg" | "png" | "webp" | "avif";
|
|
5
5
|
output_width_px?: number;
|
|
6
6
|
output_height_px?: number;
|
|
7
7
|
output_upscale_factor?: number;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"optimize.d.ts","sourceRoot":"","sources":["../../src/tools/optimize.ts"],"names":[],"mappings":"AAWA,MAAM,WAAW,mBAAmB;IAClC,KAAK,EAAE,MAAM,CAAC;IACd,WAAW,CAAC,EAAE,MAAM,CAAC;IACrB,aAAa,CAAC,EAAE,UAAU,GAAG,
|
|
1
|
+
{"version":3,"file":"optimize.d.ts","sourceRoot":"","sources":["../../src/tools/optimize.ts"],"names":[],"mappings":"AAWA,MAAM,WAAW,mBAAmB;IAClC,KAAK,EAAE,MAAM,CAAC;IACd,WAAW,CAAC,EAAE,MAAM,CAAC;IACrB,aAAa,CAAC,EAAE,UAAU,GAAG,KAAK,GAAG,KAAK,GAAG,MAAM,GAAG,MAAM,CAAC;IAC7D,eAAe,CAAC,EAAE,MAAM,CAAC;IACzB,gBAAgB,CAAC,EAAE,MAAM,CAAC;IAC1B,qBAAqB,CAAC,EAAE,MAAM,CAAC;IAC/B,kBAAkB,CAAC,EAAE,KAAK,GAAG,MAAM,CAAC;IACpC,kBAAkB,CAAC,EAAE,OAAO,CAAC;IAC7B,kBAAkB,CAAC,EAAE,OAAO,CAAC;IAC7B,OAAO,CAAC,EAAE,MAAM,CAAC;IACjB,SAAS,CAAC,EAAE,MAAM,CAAC;CACpB;AAED,MAAM,WAAW,mBAAmB;IAClC,CAAC,GAAG,EAAE,MAAM,GAAG,OAAO,CAAC;IACvB,WAAW,EAAE,MAAM,CAAC;IACpB,iBAAiB,EAAE,MAAM,CAAC;IAC1B,eAAe,EAAE,MAAM,GAAG,IAAI,CAAC;IAC/B,gBAAgB,EAAE,MAAM,GAAG,IAAI,CAAC;IAChC,aAAa,EAAE,MAAM,GAAG,IAAI,CAAC;IAC7B,iBAAiB,EAAE,MAAM,GAAG,IAAI,CAAC;IACjC,YAAY,EAAE,MAAM,GAAG,IAAI,CAAC;IAC5B,YAAY,EAAE,MAAM,EAAE,GAAG,IAAI,CAAC;IAC9B,YAAY,EAAE,MAAM,GAAG,IAAI,CAAC;CAC7B;AAED,wBAAsB,aAAa,CACjC,MAAM,EAAE,mBAAmB,GAC1B,OAAO,CAAC,mBAAmB,CAAC,CA8F9B"}
|
package/package.json
CHANGED
|
@@ -1,10 +1,11 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@tinify-ai/mcp-server",
|
|
3
|
-
"version": "1.0.
|
|
3
|
+
"version": "1.0.4",
|
|
4
4
|
"description": "MCP server for Tinify image optimization — one tool, max optimization",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"bin": {
|
|
7
|
-
"tinify-ai-mcp-server": "dist/index.js"
|
|
7
|
+
"tinify-ai-mcp-server": "dist/index.js",
|
|
8
|
+
"mcp-server": "dist/index.js"
|
|
8
9
|
},
|
|
9
10
|
"main": "dist/index.js",
|
|
10
11
|
"files": [
|
|
@@ -17,17 +18,23 @@
|
|
|
17
18
|
"start": "node dist/index.js",
|
|
18
19
|
"test": "vitest run",
|
|
19
20
|
"test:watch": "vitest",
|
|
21
|
+
"test:live": "node scripts/live-test.mjs",
|
|
20
22
|
"typecheck": "tsc --noEmit",
|
|
21
23
|
"prepublishOnly": "npm run test && npm run build"
|
|
22
24
|
},
|
|
23
25
|
"keywords": [
|
|
24
26
|
"mcp",
|
|
27
|
+
"mcp-server",
|
|
25
28
|
"model-context-protocol",
|
|
26
|
-
"tinify-ai",
|
|
27
29
|
"image-optimization",
|
|
28
|
-
"compression",
|
|
30
|
+
"image-compression",
|
|
31
|
+
"image-resize",
|
|
32
|
+
"image-upscale",
|
|
29
33
|
"seo",
|
|
30
|
-
"
|
|
34
|
+
"webp",
|
|
35
|
+
"ai-image",
|
|
36
|
+
"claude",
|
|
37
|
+
"tinify"
|
|
31
38
|
],
|
|
32
39
|
"license": "MIT",
|
|
33
40
|
"repository": {
|