exif-mcp
An MCP server that allows LLMs (or humans) to read image metadata on-demand, entirely offline. Based on the excellent exifr library it's exremely fast and does not rely on any external tools.
Usecases:
- Analyze image metadata and visualize it
- Perform analysis of your image library: what are my most used cameras? Lens distribution? Which dates of the week I take most pictures on? Most favorite locations?
- Debugging image manipulation code.
Ths tool is used extensively by the reverse geolocation service PlaceSpotter for development and testing.
Overview
exif-mcp
is a Model Context Protocol (MCP) server that provides tools for extracting various metadata segments from images. Built with TypeScript, it leverages the excellent exifr library to parse metadata from images in common formats like JPEG, PNG, TIFF, and HEIC. This allows this service to parse image metadata without executing any external tools which allows it to be both highly efficient and secure.
Features
- Local operation: Works completely offline with no remote network required
- Multiple segments: Extracts EXIF, GPS, XMP, ICC, IPTC, JFIF, and IHDR metadata
- Various input formats: Supports JPEG, TIFF, HEIC/AVIF, and PNG
- Flexible image sources: Read from file system, URLs, base64 data, or buffers
- Specialized tools: Get orientation, rotation info, GPS coordinates, and thumbnails
Installation
Usage
Claude Desktop
Put this into Claude config file (claude_desktop_config.json):
Restart Claude. Now you can ask Claude to inspect images for you or e.g. find files taken with specific camera. This works best in combination with filesystem MCP tools so Claude can find files and list directories.
Starting the server
The server uses the StdioServerTransport
from the MCP SDK, making it compatible with any MCP client that supports STDIO transport.
You can use mcp-proxy to enable remote access.
Available Tools
The following tools are provided by the server:
Tool name | Description |
---|---|
read-metadata | Reads all or specified metadata segments |
read-exif | Reads EXIF data specifically |
read-xmp | Reads XMP data |
read-icc | Reads ICC color profile data |
read-iptc | Reads IPTC metadata |
read-jfif | Reads JFIF segment data |
read-ihdr | Reads IHDR segment data |
orientation | Gets image orientation (1-8) |
rotation-info | Gets rotation and flip information |
gps-coordinates | Extracts GPS coordinates |
thumbnail | Extracts embedded thumbnail |
Debugging with MCP Inspector
- Start the inspector:
npx @modelcontextprotocol/inspector node dist/server.js
- Connect to it with MCP Inspector using the STDIO transport
- Call a tool, e.g.,
read-metadata
with parameter: - You cal also use MCP inspector command line like this:
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="[]"
Image Source Types
The server supports multiple ways to provide image data:
Development
Running Tests
Project Structure
Error Handling
The server provides standardized error handling for common issues:
- Unsupported formats or missing metadata
- Network fetch failures
- Oversized payloads
- Internal exifr errors
License
BSD 2-clause
Acknowledgements
- exifr - Extremely fast and robust EXIF parsing library
hybrid server
The server is able to function both locally and remotely, depending on the configuration or use case.
Tools
离线 MCP 服务器允许 LLM 或人类使用 exifr 库从图像中提取和分析元数据,无需外部工具即可支持各种图像格式和元数据段。
Related Resources
Related MCP Servers
- AsecurityAlicenseAqualityAn intelligent MCP server with a fully automated batch pipeline for web-ready images. Features include noise reduction, auto levels/curves, JPEG artifact removal, 4K resizing, smart sharpening with shadow/highlight enhancement, and advanced WebP conversion.Last updated -5MIT License
- -securityAlicense-qualityAn 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 -8MIT License
- AsecurityAlicenseAqualityThis MCP server aids users in searching and analyzing their photo library by location, labels, and people, offering functionalities like photo analysis and fuzzy matching for enhanced photo management.Last updated -21MIT License
- AsecurityFlicenseAqualityA simple and efficient MCP server that provides Base64 encoding and decoding functionality for both text and images with support for Data URL format.Last updated -43