Published · Updated

File Sniff MCP Server: Magic-Byte & AI Provenance Tools for Claude, Cursor & AI Agents

AI coding assistants and desktop agents frequently run into binary files they cannot reliably inspect in text context: an unknown download with the wrong extension, an Office .xlsx workbook with hidden sheets, or an image carrying embedded EXIF, XMP or C2PA AI Content Credentials.

File Sniff provides two Model Context Protocol (MCP) servers—a zero-install Remote Streamable HTTP endpoint and a local stdio server—built on the same zero-dependency ES modules that power File Sniff’s browser tools.

Option 1: Zero-Install Remote HTTP MCP (https://www.filesniff.dev/mcp)

The remote server uses the MCP Streamable HTTP transport (2025-03-26 and 2024-11-05) and requires no installation, API keys, or local dependencies.

To preserve File Sniff’s no-file-upload privacy guarantee, the remote endpoint enforces a strict 4 KiB request limit and 512-byte header cap: it inspects magic-byte headers and metadata markers only, never full files.

Claude Code CLI

claude mcp add --transport http filesniff https://www.filesniff.dev/mcp

Cursor / Windsurf / Streamable HTTP Clients (mcp.json)

{
  "mcpServers": {
    "filesniff": {
      "type": "http",
      "url": "https://www.filesniff.dev/mcp"
    }
  }
}

Remote Tools Exposed

ToolWhat it does
identify_magic_bytesAccepts up to 512 leading bytes (hex or base64) plus an optional filename, identifies the true format from magic bytes, flags extension mismatches (such as an .mp4 named .pdf or a winmail.dat TNEF stream), and returns matching File Sniff tool URLs.
lookup_file_formatLooks up magic-byte signatures, container structures, MIME types, and File Sniff guides for any extension, format name, or hex prefix (heic, winmail.dat, docx, webp, FF D8 FF).
explain_provenance_markerExplains IPTC DigitalSourceType declarations (trainedAlgorithmicMedia, compositeWithTrainedAlgorithmicMedia, algorithmicallyEnhanced, digitalCapture) and C2PA Content Credentials verification rules.

Option 2: Local stdio MCP (@filesniff/mcp) for Full On-Disk Files

When your agent needs to inspect an entire file on your disk or write a cleaned image without uploading bytes over the network, clone Peth-Dev/filesniff-mcp and run the local stdio server (server.mjs, Node.js 22+, zero npm dependencies).

Claude Desktop / Cursor (mcpServers)

{
  "mcpServers": {
    "filesniff-local": {
      "command": "node",
      "args": ["/absolute/path/to/filesniff-mcp/server.mjs"]
    }
  }
}

Local Tools Exposed

ToolWhat it does
sniff_fileReads up to the first 64 KiB and any ZIP central directory of a local file path to identify its real format, container subtype (.docx, .xlsx, .pptx), and extension match status.
inspect_office_documentInspects local .docx, .xlsx and .pptx files for core/app/custom XML properties, explicit AI or automation clues (ChatGPT, openpyxl, python-docx), hidden worksheets, fonts, and theme colours.
strip_image_metadataLosslessly strips EXIF, GPS, XMP, IPTC, thumbnails, comments, and trailers from a local JPEG, PNG or WebP file by copying allowlisted pixel chunks byte-for-byte.

When to Use Browser Tools vs. MCP