Skip to main content
Glama
@filesniff/mcp
by Peth-Dev

@filesniff/mcp — Local File Inspection & Provenance MCP Server

@filesniff/mcp is a zero-dependency Node 22+ Model Context Protocol (MCP) server over stdio. It exposes the exact same bounded, local-only ES modules used by File Sniff Online:

  • assets/js/checker/detector.mjs — Magic-byte file identification and ZIP central-directory inspection (sniff_file)

  • static/js/provenance/documents.mjs — Office .docx, .xlsx, and .pptx XML provenance, AI/automation clues, hidden worksheets, fonts, colours, and workflow hints (inspect_office_document)

  • assets/js/image/container.mjs — Lossless container-level EXIF, GPS, XMP, IPTC, thumbnail, and trailer removal for JPEG, PNG, and WebP (strip_image_metadata)


Requirements

  • Node.js 22+ (zero external npm packages required)


Related MCP server: doc-redactor

Configuration

Option 1: Remote Streamable HTTP MCP (Zero Install, Header-Only)

Connect any Streamable HTTP MCP client directly to https://www.filesniff.dev/mcp (or https://www.filesniff.dev/api/mcp):

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

The remote endpoint enforces a strict 4 KiB request limit (max 512 sample bytes) so full files are never uploaded, and exposes:

  • identify_magic_bytes — Identify a format and extension mismatch from up to 512 leading bytes in hex or base64.

  • lookup_file_format — Look up magic-byte signatures, MIME types, and File Sniff browser tools/guides for any format or extension.

  • explain_provenance_marker — Explain IPTC DigitalSourceType values (trainedAlgorithmicMedia, compositeWithTrainedAlgorithmicMedia, algorithmicallyEnhanced) and C2PA Content Credentials.

Option 2: Local stdio MCP (Full Local Disk Inspection)

For Claude Desktop, Cursor, or Claude Code (mcpServers) when inspecting full local files on disk:

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

Exposed Tools

1. sniff_file

Inspects up to the first 64 KiB (plus any ZIP central directory) of a local file and compares its detected type against its filename extension.

  • Input: { "path": "/path/to/holiday.pdf" }

  • Returns: detectedName, detectedExtension, mime, comparison (match | mismatch | neutral + label such as .pdf → .mp4), note, and first 64 bytes as uppercase hex.

2. inspect_office_document

Inspects a local .docx, .xlsx, or .pptx file without executing macros or fetching external links.

  • Input: { "path": "/path/to/workbook.xlsx" }

  • Returns: format, headline, detail, ai (explicit AI tool references in metadata), automation (openpyxl, python-docx, etc.), metadata, propertyGuide, sheets (including hidden / veryHidden), fonts, colours, authoring, relationships, and hints.

3. strip_image_metadata

Losslessly strips identifying metadata segments from a JPEG, PNG, or WebP file by copying allowlisted pixel and colour chunks verbatim.

  • Input:

    {
      "inputPath": "/path/to/photo.jpg",
      "outputPath": "/path/to/photo-clean.jpg",
      "keepColour": true,
      "keepOrientation": true,
      "keepCredentials": false
    }
  • Returns: format, originalBytes, cleanBytes, bytesSaved, orientationBefore, orientationAfter, removedCount, and removed segment list.


Running Tests

node --test tests/mcp.test.mjs

Available Tools

3 tools
inspect_office_documentA

Inspect a local Office document (.docx, .xlsx, .pptx) or PDF (.pdf) for document properties, explicit AI/automation metadata clues (such as ChatGPT, openpyxl, ReportLab or WeasyPrint), hidden Excel worksheets, fonts, colours, and package workflow hints.

Inputs: path (required).

sniff_fileA

Identify a local file from its binary magic bytes and container structure without trusting its filename extension. Detects mismatches (e.g. an MP4 disguised as a PDF or a Word document saved as .zip).

Inputs: path (required).

strip_image_metadataA

Losslessly strip identifying metadata (EXIF, GPS, XMP, IPTC, comments, thumbnails, trailers) from a JPEG, PNG, or WebP file without re-encoding pixel data.

Inputs: inputPath (required), outputPath (required), keepColour, keepCredentials, +1 more.

Tool Schema Changelog

Recent tool additions, removals, and schema changes observed during successful MCP inspections.

Loading tool schema changelog…

    TDQS

    A3.9/5.0

    Scored across 3 tools

    Disambiguation5/5

    Each tool has a clearly distinct purpose: sniff_file identifies file types, inspect_office_document inspects document metadata, and strip_image_metadata removes image metadata. The boundaries are clear despite sniff_file being broad, because it does not overlap with metadata inspection or stripping.

    Naming Consistency5/5

    All three tools follow a consistent snake_case verb_noun pattern: sniff_file, inspect_office_document, strip_image_metadata. The naming is predictable and readable.

    Tool Count5/5

    Three tools are well-scoped for a focused file-inspection and metadata-privacy server. Each tool earns its place without redundancy or excessive surface area.

    Completeness3/5

    The set covers file-type identification, Office/PDF inspection, and image metadata stripping, but has notable gaps: no generic image metadata inspection before stripping, no metadata stripping for PDF/Office documents, and no batch or directory-level operations. These gaps limit end-to-end workflows for the apparent domain.

    Maintenance

    ActivityMaintained
    ResponsivenessNo recent community issues

    Related MCP Connectors

    Related MCP Servers

    • F
      license
      Not graded
      quality
      D
      maintenance
      Enables local, read-only extraction of text and structure from PDF, DOCX, PPTX, SVG, and PNG files, including OCR for images, directory tree and metadata reporting, with strict path isolation and audit logging.
      -
    • A
      license
      A
      quality
      D
      maintenance
      Provides a local-first MCP server for multi-format document redaction, enabling detection of sensitive content, physical removal from PDFs, DOCX, XLSX, PPTX, and text files, and forensic audit with zero network calls.
      7
      AGPL 3.0
    • F
      license
      B
      quality
      B
      maintenance
      Enables local, offline document extraction and manipulation—PDF first but also HTML, DOCX, XLSX, PPTX, EML, EPUB, Markdown, and plain text—through tools for probing, locating, extracting, converting, assembling, OCR, protecting, and redacting documents, with nothing leaving the machine.
      7
      -
    • A
      license
      Not graded
      quality
      B
      maintenance
      Enables Claude Desktop to redact and count personal data in PDFs and images, strip hidden metadata from photos, anonymize Word and text files, prepare watermarked ID copies, and compare contract versions using only user-approved local folders. All processing runs offline on the user's computer, creating new copies instead of modifying or deleting the originals.
      Apache 2.0