exif-mcp

exif-mcp

Offline MCP server for fast, flexible image metadata extraction.

24
Stars
6
Forks
24
Watchers
1
Issues
exif-mcp is an MCP server enabling on-demand reading of image metadata for LLMs or human users, operating fully offline. Built with TypeScript and utilizing the exifr library, it rapidly extracts multiple metadata segments from images without relying on external tools. The server exposes a standardized set of tools for accessing EXIF, GPS, XMP, ICC, IPTC, and other metadata. It supports various input formats and is designed for secure and efficient integration with Model Context Protocol workflows.

Key Features

Operates entirely offline with no external dependencies
Extracts multiple image metadata segments (EXIF, GPS, XMP, ICC, IPTC, JFIF, IHDR)
Supports JPEG, TIFF, PNG, HEIC, and AVIF formats
Flexible input sources: file system, URLs, base64, buffers
Provides standardized tool interface for MCP clients
Compatible with Claude Desktop and MCP Inspector
Fast and secure metadata parsing using exifr library
Orientation and rotation information extraction
GPS coordinate extraction
Embedded thumbnail retrieval

Use Cases

Analyze and visualize image metadata for research or personal archives
Develop and debug image manipulation pipelines
Support LLM-powered tools in understanding image content and history
Perform statistical analysis of camera and lens usage
Identify popular shooting dates and locations within a photo library
Enable reverse geolocation tasks based on image metadata
Securely inspect image files for provenance and authenticity
Integrate with model context tools to enrich AI prompts with metadata detail
Automate the extraction of orientation information for display or conversion tasks
Extract and process embedded thumbnails for quick image previews

README

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

csh
# 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

Usage

Claude Desktop

Put this into Claude config file (claude_desktop_config.json):

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

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

csh
# Start the server
npm start

# For development with auto-reload
npm run dev

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

  1. Start the inspector: npx @modelcontextprotocol/inspector node dist/server.js
  2. Connect to it with MCP Inspector using the STDIO transport
  3. Call a tool, e.g., read-metadata with parameter:
    json
    {
      "image": {
        "kind": "path",
        "path": "/path/to/image.jpg"
      }
    }
    
  4. 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:

typescript
// 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..."
}

Development

Running Tests

bash
# Run tests
npm test

# Run tests with watch mode
npm run test:watch

Project Structure

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

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

Star History

Star History Chart

Repository Owner

stass
stass

User

Repository Details

Language TypeScript
Default Branch master
Size 15 KB
Contributors 1
License BSD 2-Clause "Simplified" License
MCP Verified Nov 12, 2025

Programming Languages

TypeScript
100%

Tags

Join Our Newsletter

Stay updated with the latest AI tools, news, and offers by subscribing to our weekly newsletter.

We respect your privacy. Unsubscribe at any time.

Related MCPs

Discover similar Model Context Protocol servers

  • MCP Server Giphy

    MCP Server Giphy

    MCP-compatible Giphy API server for AI models to search and retrieve GIFs.

    MCP Server Giphy provides an MCP-compliant server interface for accessing GIFs from the Giphy API, specifically tailored for seamless integration with AI models. It supports content filtering, multiple retrieval methods (search, trending, random), and optimized response formats with comprehensive metadata. The server enables AI applications to search, retrieve, and utilize GIF content efficiently, and is easily configurable with tools like Claude Desktop.

    • 22
    • MCP
    • magarcia/mcp-server-giphy
  • Exa MCP Server

    Exa MCP Server

    Fast, efficient web and code context for AI coding assistants.

    Exa MCP Server provides a Model Context Protocol (MCP) server interface that connects AI assistants to Exa AI’s powerful search capabilities, including code, documentation, and web search. It enables coding agents to retrieve precise, token-efficient context from billions of sources such as GitHub, StackOverflow, and documentation sites, reducing hallucinations in coding agents. The platform supports integration with popular tools like Cursor, Claude, and VS Code through standardized MCP configuration, offering configurable access to various research and code-related tools via HTTP.

    • 3,224
    • MCP
    • exa-labs/exa-mcp-server
  • MCP OpenNutrition

    MCP OpenNutrition

    Provides local, privacy-preserving access to a comprehensive food and nutrition database via the Model Context Protocol.

    MCP OpenNutrition is a Model Context Protocol (MCP) server offering access to a large, authoritative nutrition database with over 300,000 food items sourced from trusted public datasets. It enables searching by name, browsing, detailed nutritional lookups by ID, and barcode scanning, all running locally for privacy and low latency. The tool is designed for seamless integration with AI systems that follow the MCP standard, such as Claude/Cline, to enhance food and nutrition query capabilities.

    • 134
    • MCP
    • deadletterq/mcp-opennutrition
  • JSON MCP Filter

    JSON MCP Filter

    MCP server for JSON schema generation, smart filtering, and secure chunked data extraction.

    JSON MCP Filter is an MCP-compliant server offering robust JSON schema generation and field-level filtering tools for both local files and remote HTTP/HTTPS endpoints. Leveraging quicktype for precise TypeScript type creation, it supports advanced features such as smart shape-based filtering, auto-chunking of large datasets, and memory-safe processing. Designed for seamless integration with popular MCP clients, it excels at extracting and preparing relevant JSON data for large language model contexts.

    • 17
    • MCP
    • kehvinbehvin/json-mcp-filter
  • PDF Tools MCP

    PDF Tools MCP

    Comprehensive PDF manipulation via MCP protocol.

    PDF Tools MCP provides an extensive suite of PDF manipulation operations using the Model Context Protocol framework. It supports both local and remote PDF tasks, such as rendering pages, merging, extracting metadata, retrieving text, and combining documents. The tool registers endpoints through the MCP protocol, enabling seamless server-based PDF processing for various clients. Built with Python, it emphasizes secure handling and compatibility with Claude Desktop via the Smithery ecosystem.

    • 31
    • MCP
    • danielkennedy1/pdf-tools-mcp
  • mcp-server-webcrawl

    mcp-server-webcrawl

    Advanced search and retrieval for web crawler data via MCP.

    mcp-server-webcrawl provides an AI-oriented server that enables advanced filtering, analysis, and search over data from various web crawlers. Designed for seamless integration with large language models, it supports boolean search, filtering by resource types and HTTP status, and is compatible with popular crawling formats. It facilitates AI clients, such as Claude Desktop, with prompt routines and customizable workflows, making it easy to manage, query, and analyze archived web content. The tool supports integration with multiple crawler outputs and offers templates for automated routines.

    • 32
    • MCP
    • pragmar/mcp-server-webcrawl
  • Didn't find tool you were looking for?

    Be as detailed as possible for better results