MG

moiri-gamboni/image-reader-mcp

Developer tools

이 페이지는 AI로 자동 번역되었습니다. 기술적인 세부 사항은 원문을 확인하세요. 원문 보기

13 stars 5 forks 품질 50 트렌드 20GPL-3.0

An MCP (Model Context Protocol) server (using FastMCP) to provide tools for listing local image files and reading their content. Designed for LLM agent integration.

개요

A simple MCP server built with FastMCP that provides tools to: - List image files in a specified directory. - Read a specific image file and return its content. This server provides the following tools: * List image files in a specified directory. * * directoryPath (string): The absolute path to the directory to scan for images. * A list of image filenames found in the directory or a message indicating no images were found. * .jpg, .jpeg, .png, .gif, .bmp, .webp, .svg * Reads a specific image file and returns its content as base64. * * filePath (string): The absolute path to the image file to read. * An object containing the image content suitable for display (using imageContent helper from fastmcp). * .jpg, .jpeg, .png, .gif, .bmp, .webp, .svg To configure an MCP client, add the imageReader entry to the mcpServers object.

README

Image Reader MCP Server

A simple MCP server built with FastMCP that provides tools to:

  • List image files in a specified directory.
  • Read a specific image file and return its content.

Tools

This server provides the following tools:

list_images

  • Description: List image files in a specified directory.
  • Parameters:
    • directoryPath (string): The absolute path to the directory to scan for images.
  • Returns: A list of image filenames found in the directory or a message indicating no images were found.
  • Supported Extensions: .jpg, .jpeg, .png, .gif, .bmp, .webp, .svg

read_image

  • Description: Reads a specific image file and returns its content as base64.
  • Parameters:
    • filePath (string): The absolute path to the image file to read.
  • Returns: An object containing the image content suitable for display (using imageContent helper from fastmcp).
  • Supported Extensions: .jpg, .jpeg, .png, .gif, .bmp, .webp, .svg

Setup

To configure an MCP client, add the imageReader entry to the mcpServers object. It should look something like this:

{
  "mcpServers": {
    // ... other servers might be here ...
    "imageReader": {
      "command": "npx",
      "args": ["image-reader-mcp"],
      "env": {}
    }
  }
}

Important Note: When using this server with Cursor, it currently seems to function only when Claude Sonnet is selected (other models don’t seem to have vision enabled).

GitHub에서 전체 README 보기

설치

npx image-reader-mcp
MCP 초보자라면? mcpskill.org 가이드부터 시작하세요 →

설정

{ "mcpServers": { // ... other servers might be here ... "imageReader": { "command": "npx", "args": ["image-reader-mcp"], "env": {} } } }