Skip to main content
Glama

이미지 도구 MCP

대장간 배지

URL과 로컬 파일 소스를 모두 지원하며 이미지 크기를 검색하고 이미지를 압축하는 모델 컨텍스트 프로토콜(MCP) 서비스입니다.

중국어(중국어)

특징

  • URL에서 이미지 크기 검색

  • 로컬 파일에서 이미지 크기 가져오기

  • TinyPNG API를 사용하여 URL에서 이미지 압축

  • TinyPNG API를 사용하여 로컬 이미지 압축

  • 이미지를 다양한 형식(webp, jpeg/jpg, png)으로 변환합니다.

  • 너비, 높이, 유형, MIME 유형 및 압축 정보를 반환합니다.

예시 결과

예제 결과 1예제 결과 2

figma url에서 다운로드하고 압축하세요예제 결과 3

Related MCP server: File Converter MCP Server

용법

MCP 서비스로 사용

이 서비스는 5가지 도구 기능을 제공합니다.

  1. get_image_size - 원격 이미지의 크기 가져오기

  2. get_local_image_size - 로컬 이미지의 크기 가져오기

  3. compress_image_from_url - TinyPNG API를 사용하여 원격 이미지 압축

  4. compress_local_image - TinyPNG API를 사용하여 로컬 이미지 압축

  5. figma - Figma API에서 이미지 링크를 가져와 TinyPNG API를 사용하여 압축합니다.

클라이언트 통합

이 MCP 서비스를 사용하려면 MCP 클라이언트에서 연결해야 합니다. 다양한 클라이언트와 통합하는 방법의 예는 다음과 같습니다.

Claude Desktop과 함께 사용

  1. claude.ai/download 에서 Claude Desktop을 설치하세요

  2. TinyPNG API 키 받기: TinyPNG를 방문하여 API 키를 받으세요.

  3. 다음 구성 파일을 편집하여 Claude Desktop이 이 MCP 서버를 사용하도록 구성합니다.

지엑스피1

  1. Claude Desktop을 다시 시작하세요

  2. Claude에게 이미지 크기를 알려달라고 요청하세요: " https://example.com/image.jpg 이 이미지의 크기를 알려주시겠습니까?"

  3. Claude에게 이미지를 압축해 달라고 요청하세요: " https://example.com/image.jpg 이미지를 압축해 주시겠습니까?"

  4. Claude에게 로컬 이미지를 압축해 달라고 요청하세요: "이 이미지를 압축할 수 있나요: D:/path/to/image.png"

  5. Claude에게 로컬 이미지 폴더를 압축하도록 요청하세요: "이 폴더를 압축할 수 있나요: D:/imageFolder"

  6. Claude에게 Figma API에서 이미지 링크를 가져오도록 요청하세요: "Figma API에서 이미지 링크를 가져올 수 있나요? https://www.figma.com/file/XXXXXXX "

MCP 클라이언트 라이브러리와 함께 사용

import { McpClient } from "@modelcontextprotocol/client"; // Initialize the client const client = new McpClient({ transport: "stdio" // or other transport options }); // Connect to the server await client.connect(); // Get image dimensions from URL const urlResult = await client.callTool("get_image_size", { options: { imageUrl: "https://example.com/image.jpg" } }); console.log(JSON.parse(urlResult.content[0].text)); // Output: { width: 800, height: 600, type: "jpg", mime: "image/jpeg" } // Get image dimensions from local file const localResult = await client.callTool("get_local_image_size", { options: { imagePath: "D:/path/to/image.png" } }); console.log(JSON.parse(localResult.content[0].text)); // Output: { width: 1024, height: 768, type: "png", mime: "image/png", path: "D:/path/to/image.png" } // Compress image from URL const compressUrlResult = await client.callTool("compress_image_from_url", { options: { imageUrl: "https://example.com/image.jpg", outputFormat: "webp" // Optional: convert to webp, jpeg/jpg, or png } }); console.log(JSON.parse(compressUrlResult.content[0].text)); // Output: { originalSize: 102400, compressedSize: 51200, compressionRatio: "50.00%", tempFilePath: "/tmp/compressed_1615456789.webp", format: "webp" } // Compress local image const compressLocalResult = await client.callTool("compress_local_image", { options: { imagePath: "D:/path/to/image.png", outputPath: "D:/path/to/compressed.webp", // Optional outputFormat: "image/webp" // Optional: convert to image/webp, image/jpeg, or image/png } }); console.log(JSON.parse(compressLocalResult.content[0].text)); // Output: { originalSize: 102400, compressedSize: 51200, compressionRatio: "50.00%", outputPath: "D:/path/to/compressed.webp", format: "webp" } // Fetch image links from Figma API const figmaResult = await client.callTool("figma", { options: { figmaUrl: "https://www.figma.com/file/XXXXXXX" } }); console.log(JSON.parse(figmaResult.content[0].text)); // Output: { imageLinks: ["https://example.com/image1.jpg", "https://example.com/image2.jpg"] } ### Tool Schemas #### get_image_size ```typescript { options: { imageUrl: string // URL of the image to retrieve dimensions for } }

로컬 이미지 크기 가져오기

{ options: { imagePath: string; // Absolute path to the local image file } }

URL에서 이미지 압축

{ options: { imageUrl: string // URL of the image to compress outputFormat?: "image/webp" | "image/jpeg" | "image/jpg" | "image/png" // Optional output format } }

로컬 이미지 압축

{ options: { imagePath: string // Absolute path to the local image file outputPath?: string // Optional absolute path for the compressed output image outputFormat?: "image/webp" | "image/jpeg" | "image/jpg" | "image/png" // Optional output format } }

피그마

{ options: { figmaUrl: string; // URL of the Figma file to fetch image links from } }

변경 사항

  • 2025-05-12: 2배 이미지 크기 조정을 포함한 추가 매개변수를 지원하도록 Figma API를 업데이트했습니다.

기술 구현

이 프로젝트는 다음 라이브러리를 기반으로 구축되었습니다.

  • probe-image-size - 이미지 차원 감지용

  • tinify - TinyPNG API를 통한 이미지 압축

  • figma-api - Figma API에서 이미지 링크를 가져오는 데 사용

환경 변수

  • TINIFY_API_KEY - 이미지 압축 기능에 필요합니다. TinyPNG 에서 API 키를 받으세요.

    • 제공되지 않으면 압축 도구( compress_image_from_urlcompress_local_image )가 등록되지 않습니다.

  • FIGMA_API_TOKEN - Figma API에서 이미지 링크를 가져오는 데 필요합니다. Figma 에서 API 토큰을 받으세요.

    • 제공되지 않을 경우 Figma 도구( figma )가 등록되지 않습니다.

참고: 기본 이미지 크기 도구( get_image_sizeget_local_image_size )는 API 키와 관계없이 항상 사용할 수 있습니다.

특허

MIT

One-click Deploy
A
security – no known vulnerabilities
A
license - permissive license
A
quality - confirmed to work

Latest Blog Posts

MCP directory API

We provide all the information about MCP servers via our MCP API.

curl -X GET 'https://glama.ai/api/mcp/v1/servers/kshern/image-tools-mcp'

If you have feedback or need assistance with the MCP directory API, please join our Discord server