exif-mcp

BSD 2-Clause "Simplified" License

Integrations

  • Licensed under BSD 2-clause, allowing users to modify and distribute the software under the terms of this permissive license.

  • Hosted on GitHub where users can clone the repository to install and use the exif-mcp server.

  • Extracts EXIF, GPS, XMP, ICC, IPTC, JFIF metadata from JPEG images, providing tools for analyzing orientation, rotation info, GPS coordinates, and thumbnails.

exif-mcp

LLM(または人間)がオンデマンドで、完全にオフラインで画像メタデータを読み取ることができるMCPサーバーです。優れたexifrライブラリをベースにしており、非常に高速で、外部ツールに依存しません。

ユースケース:

  • 画像のメタデータを分析して視覚化する
  • 画像ライブラリを分析します。最もよく使用するカメラはどれですか?レンズの分布は?最もよく写真を撮る曜日は?最も好きな場所は?
  • 画像操作コードのデバッグ。

このツールは、リバースジオロケーションサービスPlaceSpotterによって開発およびテストのために広く使用されています。

概要

exif-mcp画像から様々なメタデータセグメントを抽出するためのツールを提供する、モデルコンテキストプロトコル(MCP)サーバーです。TypeScriptで構築されており、優れたexifrライブラリを活用して、JPEG、PNG、TIFF、HEICなどの一般的な形式の画像からメタデータを解析します。これにより、このサービスは外部ツールを実行することなく画像メタデータを解析できるため、非常に効率的かつ安全です。

特徴

  • ローカル操作: リモートネットワークを必要とせず、完全にオフラインで動作します
  • 複数のセグメント: EXIF、GPS、XMP、ICC、IPTC、JFIF、IHDR メタデータを抽出します
  • さまざまな入力形式: JPEG、TIFF、HEIC/AVIF、PNG をサポート
  • 柔軟な画像ソース: ファイルシステム、URL、base64データ、バッファから読み取ります
  • 特殊ツール: 方向、回転情報、GPS 座標、サムネイルを取得します

インストール

# Clone the repository git clone https://github.com/stass/exif-mcp.git cd exif-mcp # Install dependencies npm install # Build the project npm run build

使用法

クロードデスクトップ

これを Claude 構成ファイル (claude_desktop_config.json) に追加します。

"mcpServers": { "exif-mcp": { "command": "node", "args": [ "/path/to/exif-mcp/dist/server.js" ] } },

Claudeを再起動してください。これで、Claudeに画像の検査や、例えば特定のカメラで撮影されたファイルを検索するよう指示できます。これは、ファイルシステムMCPツールと組み合わせることで、Claudeがファイルを検索したりディレクトリを一覧表示したりするのに最も効果的です。

サーバーの起動

# Start the server npm start # For development with auto-reload npm run dev

サーバーは MCP SDK のStdioServerTransportを使用するため、STDIO トランスポートをサポートするすべての MCP クライアントと互換性があります。

mcp-proxy を使用してリモート アクセスを有効にすることができます。

利用可能なツール

サーバーによって提供されるツールは次のとおりです。

ツール名説明
read-metadataすべてのメタデータセグメントまたは指定されたメタデータセグメントを読み取ります
read-exifEXIFデータを具体的に読み取ります
read-xmpXMPデータを読み取ります
read-iccICCカラープロファイルデータを読み取ります
read-iptcIPTCメタデータを読み取る
read-jfifJFIFセグメントデータを読み取る
read-ihdrIHDRセグメントデータを読み取ります
orientation画像の向きを取得します(1~8)
rotation-info回転と反転の情報を取得します
gps-coordinatesGPS座標を抽出します
thumbnail埋め込まれたサムネイルを抽出します

MCP Inspectorによるデバッグ

  1. インスペクターを起動します: npx @modelcontextprotocol/inspector node dist/server.js
  2. STDIOトランスポートを使用してMCP Inspectorで接続します。
  3. ツール (例: パラメータ付きread-metadataを呼び出します。
    { "image": { "kind": "path", "path": "/path/to/image.jpg" } }
  4. 次のように、MCP インスペクターのコマンド ラインを使用することもできます: npx @modelcontextprotocol/inspector --cli node dist/server.js --method tools/call --tool-name read-exif --tool-arg image='{"kind": "path", "path": "/path/to/image.jpeg"}' --tool-arg pick="[]"

画像ソースの種類

サーバーは、画像データを提供する複数の方法をサポートしています。

// From local file system { "kind": "path", "path": "/path/to/image.jpg" } // From URL (http, https, or file://) { "kind": "url", "url": "https://example.com/image.jpg" } // From base64 data (raw or data URI) { "kind": "base64", "data": "data:image/jpeg;base64,/9j/4AAQSkZ..." } // From base64 buffer { "kind": "buffer", "buffer": "/9j/4AAQSkZ..." }

発達

テストの実行

# Run tests npm test # Run tests with watch mode npm run test:watch

プロジェクト構造

exif-mcp/ ├── src/ │ ├── server.ts # Main entry point │ ├── tools/ │ │ ├── index.ts # Tool registration │ │ ├── loaders.ts # Image loading utilities │ │ └── segments.ts # exifr options builders │ └── types/ │ └── image.ts # Type definitions ├── tests/ # Test files └── README.md

エラー処理

サーバーは、一般的な問題に対して標準化されたエラー処理を提供します。

  • サポートされていない形式またはメタデータがありません
  • ネットワーク取得の失敗
  • 特大のペイロード
  • 内部exifrエラー

ライセンス

BSD 2節

謝辞

  • exifr - 非常に高速で堅牢な EXIF 解析ライブラリ

You must be authenticated.

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

外部ツールなしでさまざまな画像形式とメタデータ セグメントをサポートし、LLM または人間が exifr ライブラリを使用して画像からメタデータを抽出および分析できるようにするオフライン MCP サーバーです。

  1. 概要
    1. 特徴
  2. インストール
    1. 使用法
      1. クロードデスクトップ
      2. サーバーの起動
      3. 利用可能なツール
      4. MCP Inspectorによるデバッグ
      5. 画像ソースの種類
    2. 発達
      1. テストの実行
      2. プロジェクト構造
    3. エラー処理
      1. ライセンス
        1. 謝辞

          Related MCP Servers

          • -
            security
            A
            license
            -
            quality
            An MCP server for analyzing images using OpenRouter vision models, offering capabilities like automatic image resizing, model configuration, and handling custom queries about images.
            Last updated -
            5
            JavaScript
            MIT License
          • A
            security
            A
            license
            A
            quality
            Image Tools MCP is a Model Context Protocol (MCP) service that retrieves image dimensions and compresses images from URLs and local files using the TinyPNG API. It supports converting images to formats like webp, jpeg/jpg, and png, providing detailed information on width, height, type, and compressi
            Last updated -
            4
            11
            3
            JavaScript
            MIT License
            • Apple
          • A
            security
            F
            license
            A
            quality
            A MCP server that allows searching for files in the filesystem based on path fragments, returning file metadata including name, path, size, and creation date.
            Last updated -
            1
            Python
            • Apple
          • -
            security
            A
            license
            -
            quality
            MCP server that enables LLMs to interact with Tripadvisor API, supporting location data, reviews, and photos through standardized MCP interfaces
            Last updated -
            Python
            MIT License
            • Linux
            • Apple

          View all related MCP servers

          ID: 5hxbqhlnlk