🎩 You're Invited:Meet the Socket team at Black Hat in Las Vegas, August 3-6.RSVP
Sign In

@tinify-dev/mcp

Package Overview
Dependencies
Maintainers
1
Versions
8
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@tinify-dev/mcp - npm Package Compare versions

Comparing version
0.1.1
to
0.1.2
+44
-10
dist/index.js

@@ -773,3 +773,10 @@ #!/usr/bin/env node

},
outputSchema: imageOutputShape
outputSchema: imageOutputShape,
annotations: {
title: "Compress image",
readOnlyHint: false,
destructiveHint: false,
idempotentHint: false,
openWorldHint: true
}
},

@@ -846,3 +853,10 @@ makeHandler(client) {

},
outputSchema: imageOutputShape
outputSchema: imageOutputShape,
annotations: {
title: "Convert image format",
readOnlyHint: false,
destructiveHint: false,
idempotentHint: false,
openWorldHint: true
}
},

@@ -902,3 +916,10 @@ makeHandler(client) {

},
outputSchema: imageOutputShape
outputSchema: imageOutputShape,
annotations: {
title: "Crop image",
readOnlyHint: false,
destructiveHint: false,
idempotentHint: false,
openWorldHint: true
}
},

@@ -959,3 +980,10 @@ makeHandler(client) {

},
outputSchema: imageOutputShape
outputSchema: imageOutputShape,
annotations: {
title: "Resize image",
readOnlyHint: false,
destructiveHint: false,
idempotentHint: false,
openWorldHint: true
}
},

@@ -1021,2 +1049,9 @@ makeHandler(client) {

request_id: z5.string()
},
annotations: {
title: "Get usage",
readOnlyHint: true,
destructiveHint: false,
idempotentHint: true,
openWorldHint: true
}

@@ -1051,3 +1086,4 @@ },

var SERVER_NAME = "tinify";
var SERVER_VERSION = "0.1.0";
var SERVER_VERSION = "0.1.2";
var STDIO_INSTRUCTIONS = "Tools for the Tinify.dev image API: compress, resize, crop, and convert local images, plus account usage. Image paths must be absolute. Results are written as <name>.min.<ext> next to the input unless output_path is given; source files are never overwritten silently.";
var allTools = [

@@ -1060,10 +1096,8 @@ compressImageTool,

];
function createServer(client) {
function createServer(client, tools = allTools, instructions = STDIO_INSTRUCTIONS) {
const server = new McpServer(
{ name: SERVER_NAME, version: SERVER_VERSION },
{
instructions: "Tools for the Tinify.dev image API: compress, resize, crop, and convert local images, plus account usage. Image paths must be absolute. Results are written as <name>.min.<ext> next to the input unless output_path is given; source files are never overwritten silently."
}
{ instructions }
);
for (const tool of allTools) {
for (const tool of tools) {
server.registerTool(

@@ -1070,0 +1104,0 @@ tool.name,

+3
-1
{
"name": "@tinify-dev/mcp",
"version": "0.1.1",
"version": "0.1.2",
"description": "MCP server for the Tinify.dev image API: compress, resize, crop, and convert images from Claude, Cursor, or any MCP client.",

@@ -35,2 +35,4 @@ "license": "MIT",

"build": "tsup",
"build:remote": "tsup --config tsup.remote.config.ts",
"start:remote": "node dist-remote/http.cjs",
"typecheck": "tsc --noEmit",

@@ -37,0 +39,0 @@ "test": "vitest run",

@@ -63,2 +63,25 @@ # @tinify-dev/mcp

## Remote server (hosted)
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:
```text
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:
```sh
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.
## Tools

@@ -104,1 +127,37 @@

MIT © Stian Larsen
## One-click / one-line installs
**Cursor**: [Add to Cursor](cursor://anysphere.cursor-deeplink/mcp/install?name=tinify&config=eyJjb21tYW5kIjoibnB4IiwiYXJncyI6WyIteSIsIkB0aW5pZnktZGV2L21jcCJdLCJlbnYiOnsiVElOSUZZX0FQSV9LRVkiOiJZT1VSX0FQSV9LRVkifX0=) - then set your real key in Cursor's MCP settings.
**VS Code**:
```sh
code --add-mcp '{"name":"tinify","command":"npx","args":["-y","@tinify-dev/mcp"],"env":{"TINIFY_API_KEY":"tnf_live_..."}}'
```
**Codex CLI**:
```sh
codex mcp add tinify --env TINIFY_API_KEY=tnf_live_... -- npx -y @tinify-dev/mcp
```
or in `~/.codex/config.toml`:
```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

@@ -9,3 +9,3 @@ {

},
"version": "0.1.1",
"version": "0.1.2",
"websiteUrl": "https://tinify.dev/developers",

@@ -17,3 +17,3 @@ "packages": [

"identifier": "@tinify-dev/mcp",
"version": "0.1.1",
"version": "0.1.2",
"transport": {

@@ -20,0 +20,0 @@ "type": "stdio"