Gets image dimensions from URLs or local files and compresses or converts images to WebP, JPEG or PNG via the TinyPNG API.
接入配置
选择客户端,复制配置,再按项目文档补齐环境变量。
claude mcp add image-tools --env FIGMA_API_TOKEN='<FIGMA_API_TOKEN>' --env TINIFY_API_KEY='<TINIFY_API_KEY>' -- npx image-tools-mcp~/.codex/config.toml
[mcp_servers.image-tools]
command = "npx"
args = ["image-tools-mcp"]
env = { FIGMA_API_TOKEN = "<FIGMA_API_TOKEN>", TINIFY_API_KEY = "<TINIFY_API_KEY>" }
# codex mcp add image-tools --env FIGMA_API_TOKEN='<FIGMA_API_TOKEN>' --env TINIFY_API_KEY='<TINIFY_API_KEY>' -- npx image-tools-mcp~/.cursor/mcp.json
{
"mcpServers": {
"image-tools": {
"command": "npx",
"args": [
"image-tools-mcp"
],
"env": {
"FIGMA_API_TOKEN": "<FIGMA_API_TOKEN>",
"TINIFY_API_KEY": "<TINIFY_API_KEY>"
}
}
}
}.vscode/mcp.json
{
"servers": {
"image-tools": {
"type": "stdio",
"command": "npx",
"args": [
"image-tools-mcp"
],
"env": {
"FIGMA_API_TOKEN": "<FIGMA_API_TOKEN>",
"TINIFY_API_KEY": "<TINIFY_API_KEY>"
}
}
}
}~/.gemini/settings.json
{
"mcpServers": {
"image-tools": {
"command": "npx",
"args": [
"image-tools-mcp"
],
"env": {
"FIGMA_API_TOKEN": "<FIGMA_API_TOKEN>",
"TINIFY_API_KEY": "<TINIFY_API_KEY>"
}
}
}
}claude_desktop_config.json
{
"mcpServers": {
"image-tools": {
"command": "npx",
"args": [
"image-tools-mcp"
],
"env": {
"FIGMA_API_TOKEN": "<FIGMA_API_TOKEN>",
"TINIFY_API_KEY": "<TINIFY_API_KEY>"
}
}
}
}.trae/mcp.json
{
"mcpServers": {
"image-tools": {
"command": "npx",
"args": [
"image-tools-mcp"
],
"env": {
"FIGMA_API_TOKEN": "<FIGMA_API_TOKEN>",
"TINIFY_API_KEY": "<TINIFY_API_KEY>"
}
}
}
}需要的环境变量
FIGMA_API_TOKENTINIFY_API_KEY
把占位值换成你自己的密钥;不要把密钥提交到代码仓库。