Skip to main content
Glama
satyamkumar420

AI Image Metadata Cleaner

Python MCP SDK Transport C2PA Purge Buy Me A Coffee License

🛡️ AI Image Metadata Cleaner (MCP Server)

High-performance Model Context Protocol (MCP 2.x) server designed to strip AI provenance tags (C2PA, EXIF, XMP, IPTC), disrupt invisible frequency watermarks, and simulate authentic camera sensor physics.


💡 Purpose

Modern generative AI tools (Midjourney, DALL-E, Adobe Firefly, Canva, Stable Diffusion) embed cryptographic provenance manifests (C2PA / JUMBF), invisible spatial watermarks, and prompt parameters into every generated image.

Major platforms like LinkedIn, Twitter/X, and algorithmic newsfeeds automatically read these tags to label, flag, or suppress organic reach of content.

The purpose of AI Image Metadata Cleaner is to give creators and developers complete sovereign control over their media by:

  1. Scrubbing 100% of embedded tracking provenance and generator signatures.

  2. Disrupting invisible frequency-domain watermarks without visual quality loss.

  3. Restoring physical camera realism (CMOS sensor grain, optical PSF) so images blend seamlessly with authentic photography.


Related MCP server: Gemini Watermark Remover

🎯 Real-World Use Cases

Use Case

Description

LinkedIn Posts & Profile Media

Prevent LinkedIn from automatically attaching "AI-generated" labels, reducing reach penalties or triggering account restriction reviews.

Social Media & Content Marketing

Publish AI-assisted blog banners, promotional graphics, and tech memes without algorithmic downranking across platforms.

Privacy & Anti-Fingerprinting

Strip embedded generation prompts, seed parameters, workflow graphs (ComfyUI), and system timestamps before sharing publicly.

Portfolio & Headshot Naturalization

Transform synthetic, plastic-looking portraits into authentic-looking shots by adding realistic CMOS photon grain and lens falloff.

Batch Asset Pipeline Automation

Automatically sanitize entire folders of marketing assets or user uploads via the batch_sanitize_directory tool.


⚡ How Platforms Detect AI Images

  1. C2PA / Content Credentials Metadata: Embedded in JPEG APP11 (JUMBF) segments, PNG c2pa/caPt chunks, and XMP packets declaring synthetic origin.

  2. Invisible / Frequency-Domain Watermarks: Encoded in latent frequency space (e.g. Google SynthID, latent diffusion watermarks).

  3. Statistical AI Footprints: Unnaturally smooth surfaces with 0 variance (absence of camera sensor photon noise) and transposed-convolution grid harmonics.

  4. Suspicious Zero Metadata: Heuristic checkers often flag files with 0 EXIF. Injected authentic camera EXIF (iPhone 15 Pro, Sony A7 IV) passes authenticity audits.


🛠️ MCP Tools

Tool

Type

Description

anti_ai_sanitize

Flagship

Full pipeline: strips C2PA/EXIF, executes 0.3% micro-resample, injects luminance-adaptive CMOS grain, and embeds realistic camera EXIF.

strip_metadata_only

Utility

Fast, lossless metadata stripping (EXIF, XMP, IPTC, C2PA) without altering pixel values.

inspect_image_metadata

Audit

Deep diagnostic inspection scanning for C2PA byte manifests, AI keywords, and risk assessment.

inject_camera_profile

Stealth

Injects authentic camera EXIF into clean JPEG images.

get_camera_profiles

Info

Returns list of supported camera profiles and optical specifications.

batch_sanitize_directory

Automation

Batch-sanitizes an entire directory of images with parallel processing.


📷 Supported Realistic Camera Profiles

  • iphone_15_pro: Apple iPhone 15 Pro (iOS 17.5.1, 24mm f/1.78, ISO 80, 1/120s)

  • sony_a7iv: Sony Alpha A7 IV (FE 24-70mm F2.8 GM II, f/2.8, 50mm, ISO 160)

  • samsung_s24_ultra: Samsung Galaxy S24 Ultra (6.3mm f/1.7, ISO 100)

  • canon_r6: Canon EOS R6 Mark II (RF24-105mm F4 L IS USM, ISO 200)


🚀 Installation & Setup

Requirements

  • Python 3.10+

  • uv (recommended) or pip

# Clone the repository
git clone https://github.com/satyamkumar420/ai-image-meta-cleaner.git
cd ai-image-meta-cleaner

# Create and activate virtual environment
uv venv .venv
source .venv/bin/activate

# Install dependencies
uv pip install -r requirements.txt

Running Tests

pytest -v

⚙️ MCP Configuration

Add this server to your mcp_config.json (Antigravity, Claude Desktop, Cursor):

{
  "mcpServers": {
    "meta-cleaner": {
      "command": "/path/to/ai-image-meta-cleaner/.venv/bin/python",
      "args": [
        "-u",
        "/path/to/ai-image-meta-cleaner/server.py"
      ],
      "env": {
        "PYTHONPATH": "/path/to/ai-image-meta-cleaner"
      }
    }
  }
}

☕ Support & Sponsor

If you find AI Image Metadata Cleaner helpful and want to support its maintenance:

Scan the QR code or click the button above to buy me a coffee! Thank you for your support! ☕✨


📄 License

This project is licensed under the MIT License - see the LICENSE file for details.

Related MCP Connectors

Related MCP Servers