IP

ia-programming/mcp-images

Developer tools

このページは AI により自動翻訳されています。技術的な詳細は原文をご確認ください。 原文を見る

22 stars 8 forks 品質 82 トレンド 14MIT

#MCP-Images パワフルな画像処理サーバーをお探しですか? MCP Server-Image は、数行のコードで、エンタープライズレベルの画像処理を実現します.

概要

URL、ローカルファイルパス、numpy配列から画像の取得と処理を行うためのツールを提供するモデルコンテキストプロトコル(MCP)サーバー。 サーバには、MIME タイプのベース64エンコードされた文字列として画像を返す fetch images というツールが含まれています。 このプロジェクトが役に立つと今後のプロジェクトをサポートしたい場合は、コーヒーの購入を検討してください! お客様のサポートにより、革新的なAIソリューションを構築し続けます。 あなたの貢献は、インテリジェントでユーザーフレンドリーなアプリケーションを作成するために私たちの情熱を燃やすための長い道を行く. - URL(http/https)から画像をフェッチ - ローカルファイルパスから画像を読み込む - 大規模なローカル画像の自動画像圧縮(>1MB)の特別処理 - 複数の画像の並列処理 - 異なるファイルの拡張子のためのプロパーMIMEタイプマッピング - 包括的なエラー処理とロギング - Python 3.10 + - uvパッケージマネージャ(推奨)1. このリポジトリをクローンする 2.

概要(AI 翻訳)

URL、ローカルファイルパス、numpy配列から画像の取得と処理を行うためのツールを提供するモデルコンテキストプロトコル(MCP)サーバー。 サーバには、MIME タイプのベース64エンコードされた文字列として画像を返す fetch images というツールが含まれています。

サポート

このプロジェクトが役に立つと今後のプロジェクトをサポートしたい場合は、コーヒーの購入を検討してください! お客様のサポートにより、革新的なAIソリューションを構築し続けます。

あなたの貢献は、インテリジェントでユーザーフレンドリーなアプリケーションを作成するために私たちの情熱を燃やすための長い道を行く.

コンテンツの表

  • 特徴
  • 前提条件
  • インストール
  • サーバーの実行
  • 直接方法
  • Windsurf/Cursor の構成
  • 利用可能なツール
  • 使用例
  • デバッグ
  • 貢献
  • ライセンス

##特徴

  • URLから画像をフェッチする(http/https)
  • ローカルファイルパスから画像をロードする
  • 大規模なローカル画像の特化処理
  • 大型画像の自動画像圧縮(>1MB)
  • 複数の画像の並列処理
  • 異なるファイル拡張子のための適切なMIMEタイプマッピング
  • 包括的なエラー処理とロギング

前提条件

  • Python 3.10 +
  • uvパッケージマネージャ(推奨)

インストール

このページは AI により自動翻訳されています。技術的な詳細は原文をご確認ください。

README

以下は原文 README の抜粋です。原文を見る。

MCP Server - Image

A Model Context Protocol (MCP) server that lets an AI assistant look at images. Its fetch_images tool loads images from URLs or local file paths and returns them in a form LLM clients can display, downscaling and recompressing them when needed so they fit client limits.

Support Us

If you find this project helpful and would like to support future projects, consider buying us a coffee! Your support helps us continue building innovative AI solutions.

Your contributions go a long way in fueling our passion for creating intelligent and user-friendly applications.

Table of Contents

Features

  • Fetch images from http(s) URLs (redirects followed) and local paths, including ~/... and file:// URIs
  • Detects the real format from the file contents, so wrong extensions and application/octet-stream responses (e.g. Telegram’s file API) still work
  • Reads JPEG, PNG, GIF, WebP, BMP, TIFF, ICO, PPM, TGA and AVIF; returns JPEG, PNG, GIF and WebP as-is when they are small enough and converts the rest to PNG or JPEG. Other formats are refused (EPS, for instance, would run Ghostscript)
  • Downscales to 1568px on the longer edge; all images in one call share a ~700 KB budget (about 930 KB once base64-encoded), under the ~1 MB tool-result limit Claude Desktop is reported to enforce
  • Keeps transparency (PNG) when possible, applies EXIF rotation, and converts palette, 1-bit and 16-bit images without losing their tones
  • Optional SVG support: small icons are rendered large enough to read, and an SVG cannot pull in other local files or URLs
  • Processes up to 20 sources per call in parallel; a failed source returns a message saying why, in its position in the list

Prerequisites

  • Python 3.11+
  • uv (recommended)
  • For SVG support only: the native Cairo library
    • Debian/Ubuntu: sudo apt install libcairo2
    • macOS: brew install cairo (on Apple Silicon, also set DYLD_FALLBACK_LIBRARY_PATH=/opt/homebrew/lib for the server)
    • Windows: install the GTK3 runtime. Its default folder (C:\Program Files\GTK3-Runtime Win64\bin) is found automatically; for another location, or another app that bundles libcairo-2.dll, set CAIROCFFI_DLL_DIRECTORIES to that folder

Installation

git clone https://github.com/IA-Programming/mcp-images.git
cd mcp-images
uv sync                # core
GitHub で README 全文を見る

インストール

uvx --from git+https://github.com/IA-Programming/mcp-images mcp-image
MCP 初心者?mcpskill.org のガイドから始めましょう →

設定

{ "mcpServers": { "image": { "command": "uv", "args": ["run", "--directory", "/path/to/mcp-images", "--extra", "svg", "mcp-image"] } } }