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. 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? Debu
Add this skill
npx mdskills install stass/exif-mcpWell-documented offline image metadata extraction with comprehensive tools and clear setup
1# exif-mcp23An 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.45Usecases:6* Analyze image metadata and visualize it7* 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?8* Debugging image manipulation code.910Ths tool is used extensively by the reverse geolocation service [PlaceSpotter](https://www.placespotter.com/) for development and testing.1112## Overview1314`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](https://github.com/MikeKovarik/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.1516### Features1718- **Local operation**: Works completely offline with no remote network required19- **Multiple segments**: Extracts EXIF, GPS, XMP, ICC, IPTC, JFIF, and IHDR metadata20- **Various input formats**: Supports JPEG, TIFF, HEIC/AVIF, and PNG21- **Flexible image sources**: Read from file system, URLs, base64 data, or buffers22- **Specialized tools**: Get orientation, rotation info, GPS coordinates, and thumbnails2324## Installation2526```csh27# Clone the repository28git clone https://github.com/stass/exif-mcp.git29cd exif-mcp3031# Install dependencies32npm install3334# Build the project35npm run build36```3738## Usage39### Claude Desktop4041Put this into Claude config file (claude_desktop_config.json):42```json43"mcpServers": {44 "exif-mcp": {45 "command": "node",46 "args": [47 "/path/to/exif-mcp/dist/server.js"48 ]49 }50 },51```5253Restart 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.5455### Starting the server5657```csh58# Start the server59npm start6061# For development with auto-reload62npm run dev63```6465The server uses the `StdioServerTransport` from the MCP SDK, making it compatible with any MCP client that supports STDIO transport.6667You can use mcp-proxy to enable remote access.6869### Available Tools7071The following tools are provided by the server:7273| Tool name | Description |74|-----------|-------------|75| `read-metadata` | Reads all or specified metadata segments |76| `read-exif` | Reads EXIF data specifically |77| `read-xmp` | Reads XMP data |78| `read-icc` | Reads ICC color profile data |79| `read-iptc` | Reads IPTC metadata |80| `read-jfif` | Reads JFIF segment data |81| `read-ihdr` | Reads IHDR segment data |82| `orientation` | Gets image orientation (1-8) |83| `rotation-info` | Gets rotation and flip information |84| `gps-coordinates` | Extracts GPS coordinates |85| `thumbnail` | Extracts embedded thumbnail |8687### Debugging with MCP Inspector88891. Start the inspector: `npx @modelcontextprotocol/inspector node dist/server.js`902. Connect to it with MCP Inspector using the STDIO transport913. Call a tool, e.g., `read-metadata` with parameter:92 ```json93 {94 "image": {95 "kind": "path",96 "path": "/path/to/image.jpg"97 }98 }99 ```1004. 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="[]"`101102### Image Source Types103104The server supports multiple ways to provide image data:105106```typescript107// From local file system108{109 "kind": "path",110 "path": "/path/to/image.jpg"111}112113// From URL (http, https, or file://)114{115 "kind": "url",116 "url": "https://example.com/image.jpg"117}118119// From base64 data (raw or data URI)120{121 "kind": "base64",122 "data": "data:image/jpeg;base64,/9j/4AAQSkZ..."123}124125// From base64 buffer126{127 "kind": "buffer",128 "buffer": "/9j/4AAQSkZ..."129}130```131132## Development133134### Running Tests135136```bash137# Run tests138npm test139140# Run tests with watch mode141npm run test:watch142```143144### Project Structure145146```147exif-mcp/148├── src/149│ ├── server.ts # Main entry point150│ ├── tools/151│ │ ├── index.ts # Tool registration152│ │ ├── loaders.ts # Image loading utilities153│ │ └── segments.ts # exifr options builders154│ └── types/155│ └── image.ts # Type definitions156├── tests/ # Test files157└── README.md158```159160## Error Handling161162The server provides standardized error handling for common issues:163164- Unsupported formats or missing metadata165- Network fetch failures166- Oversized payloads167- Internal exifr errors168169## License170171BSD 2-clause172173## Acknowledgements174175- [exifr](https://github.com/MikeKovarik/exifr) - Extremely fast and robust EXIF parsing library176
Full transparency — inspect the skill content before installing.