
moiri-gamboni/image-reader-mcp
Developer toolsこのページは AI により自動翻訳されています。技術的な詳細は原文をご確認ください。 原文を見る
MCP (Model Context Protocol) サーバ (FastMCP を使用して) は、ローカルのイメージファイルをリストし、コンテンツを読み込みするためのツールを提供します。 LLM の代理店の統合のために設計されている.
概要
FastMCP で構築されたシンプルな MCP サーバーで、以下のようなツールを提供しています。 - 指定したディレクトリに画像ファイルをリストします。 - 特定の画像ファイルを読み、その内容を返します。 このサーバは、以下のツールを提供しています。 ※指定したディレクトリに画像ファイルをリストします。 * ディレクトリパス(文字列):画像のスキャンを行うディレクトリへの絶対パス。 * ディレクトリに表示されている画像のファイル名や、画像が表示されないメッセージのリスト。 .jpg、.jpeg、.png、.gif、.bmp、.webp、.svg * 特定のイメージファイルを読み、その内容を base64 として返します。 * filePath (string): 読み込む画像ファイルへの絶対パス。 * 必須 ディスプレイに適した画像コンテンツを含むオブジェクト(fastmcpからimageContentヘルパーを使用)。 .jpg、.jpeg、.png、.gif、.bmp、.webp、.svg MCP クライアントを構成するには、mcpServers オブジェクトにimageReader エントリを追加します.
概要(AI 翻訳)
FastMCP で構築されたシンプルな MCP サーバーで、以下のようなツールを提供しています。
- 指定したディレクトリに画像ファイルをリストします。
- 特定の画像ファイルを読み、その内容を返します。
ツール
このサーバは、以下のツールを提供しています。
##[list_images
*** 説明:** 指定したディレクトリに画像ファイルをリストします。 *パラメータ:
directoryPath(文字列): ディレクトリへの絶対パスで画像をスキャンします。- 返品: ディレクトリや画像が見つからなかったメッセージのリスト。
***
.jpg, [.jpeg], [.png], [.gif]], [.bmp]], [.webp], [[.svg]]
##[[T9]
*** 説明:** 特定のイメージファイルを読み込み、そのコンテンツを base64 として返します。 *パラメータ:
filePath(文字列): 読み込みする画像ファイルへの絶対パス。- 返品: ディスプレイに適した画像コンテンツを含むオブジェクト(
imageContent] ヘルパーfastmcp]])。 ***.jpg,.jpeg, [.png], [.gif]], [.bmp], [.webp], [.svg]]
セットアップ
MCP クライアントを構成するには、[imageReader] エントリを [mcpServers] オブジェクトに追加します。 こういうものを見るべきです:
このページは AI により自動翻訳されています。技術的な詳細は原文をご確認ください。
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
imageContenthelper fromfastmcp). - 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).
インストール
npx image-reader-mcp設定
{
"mcpServers": {
// ... other servers might be here ...
"imageReader": {
"command": "npx",
"args": ["image-reader-mcp"],
"env": {}
}
}
}