关于 Tinypng Mcp Server
Tinypng Mcp Server 是将 TinyPNG 图像压缩接入 MCP 的服务,适合通过 LLM 处理图像的用户。它提供本地文件和远程图像 URL 两种压缩工具。
主要功能
- 01压缩本地图像文件
- 02通过 URL 压缩远程图像
适用场景
- 01压缩本地待处理图像
- 02压缩远程地址中的图像
MCP 相关
该 MCP 服务向 MCP 客户端提供 TinyPNG 图像压缩工具,支持本地文件路径和远程图像 URL。
配置
本地服务的配置在各客户端中通用,复制后粘贴到客户端的 MCP 配置文件即可。
工具
还没有获取到工具列表
本地服务需要在你的电脑上运行后才能读取工具,维护者暂未提供工具列表。
详细介绍
TinyPNG 的 MCP 服务
使用方法
使用 bun 或 node 运行服务
- 安装依赖并构建
pnpm i
pnpm build
- 编辑
mcp.json文件
{
"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"
}
}
}
}
通过 Smithery 安装
要通过 Smithery 为 Claude Desktop 自动安装 TinyPNG MCP Server:
npx -y @smithery/cli install @aiyogg/tinypng-mcp-server --client claude
工具
- 压缩本地图片
{
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'],
},
}
- 压缩远程图片
{
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'],
},
}
评论
支持 Markdown
一个开放协议,规定了 AI 应用如何以统一方式连接外部工具与数据源。客户端负责与模型对话,MCP 服务负责提供工具、资源和提示模板,两者通过标准消息通信,同一个服务可以被不同客户端复用。
