EXIF Metadata MCP server

Extracts and analyzes image metadata offline from JPEG, PNG, TIFF, and HEIC formats, providing tools for reading EXIF, GPS, XMP, and other data segments without external dependencies.
Back to servers
Setup instructions
Provider
Stass
Release date
May 03, 2025
Language
TypeScript
Stats
15 stars

exif-mcp is a Model Context Protocol (MCP) server that allows you to extract and analyze image metadata offline. Built on the exifr library, it enables reading EXIF data, GPS coordinates, color profiles and other metadata from images without relying on external tools or network connections.

Installation

To install and set up the exif-mcp server:

# 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

Configuring with Claude Desktop

To integrate with Claude Desktop, add the following to your Claude configuration file (claude_desktop_config.json):

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

Restart Claude after making these changes. You can then ask Claude to inspect images or find files taken with specific cameras.

Starting the Server Manually

# 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 server provides several specialized tools for metadata extraction:

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

You can use the MCP Inspector tool for debugging:

# Start the inspector
npx @modelcontextprotocol/inspector node dist/server.js

Connect to it with MCP Inspector using the STDIO transport, then call a tool, such as read-metadata:

{
  "image": {
    "kind": "path",
    "path": "/path/to/image.jpg"
  }
}

Alternatively, use the MCP inspector command line:

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="[]"

Supported Image Source Types

The server supports multiple ways to provide image data:

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

Error Handling

The server provides standardized error handling for common issues:

  • Unsupported formats or missing metadata
  • Network fetch failures
  • Oversized payloads
  • Internal exifr errors

How to install this MCP server

For Claude Code

To add this MCP server to Claude Code, run this command in your terminal:

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

See the official Claude Code MCP documentation for more details.

For Cursor

There are two ways to add an MCP server to Cursor. The most common way is to add the server globally in the ~/.cursor/mcp.json file so that it is available in all of your projects.

If you only need the server in a single project, you can add it to the project instead by creating or adding it to the .cursor/mcp.json file.

Adding an MCP server to Cursor globally

To add a global MCP server go to Cursor Settings > Tools & Integrations and click "New MCP Server".

When you click that button the ~/.cursor/mcp.json file will be opened and you can add your server like this:

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

Adding an MCP server to a project

To add an MCP server to a project you can create a new .cursor/mcp.json file or add it to the existing one. This will look exactly the same as the global MCP server example above.

How to use the MCP server

Once the server is installed, you might need to head back to Settings > MCP and click the refresh button.

The Cursor agent will then be able to see the available tools the added MCP server has available and will call them when it needs to.

You can also explicitly ask the agent to use the tool by mentioning the tool name and describing what the function does.

For Claude Desktop

To add this MCP server to Claude Desktop:

1. Find your configuration file:

  • macOS: ~/Library/Application Support/Claude/claude_desktop_config.json
  • Windows: %APPDATA%\Claude\claude_desktop_config.json
  • Linux: ~/.config/Claude/claude_desktop_config.json

2. Add this to your configuration file:

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

3. Restart Claude Desktop for the changes to take effect

Want to 10x your AI skills?

Get a free account and learn to code + market your apps using AI (with or without vibes!).

Nah, maybe later