assetdiet-mcp

v0.1.4
assetdiet-mcp Checked 3 days ago Published 1 month ago

Full-repository asset intelligence, optimization and MCP server for AI coding assistants

assetdiet-mcp is the self-contained distribution package of AssetDiet. It exposes both the developer command-line interface (assetdiet) and the stdio Model Context Protocol server for AI coding assistants like Cursor, Claude Desktop, Claude Code, Windsurf, and Codex. Configure your installed assistants with interactive verification and automatic .bak backups: To preview proposed configuration changes without touching files on disk:

Summary extracted from the README.

assetdiet-mcp

Local-first CLI and Model Context Protocol (MCP) server for auditing, optimizing, and safely managing images, SVGs, videos, and 3D assets in codebases.

CI License: MIT Node.js MCP Tools Privacy


Overview

assetdiet-mcp is the self-contained distribution package of AssetDiet. It exposes both the developer command-line interface (assetdiet) and the stdio Model Context Protocol server for AI coding assistants like Cursor, Claude Desktop, Claude Code, Windsurf, and Codex.

Core Philosophy

“Many heavy assets go in. Lean, verified assets come out.”

  • 100% Local: All processing runs on your local machine using embedded native libraries (libvips) and WebAssembly. No files are uploaded to external APIs or remote buckets.
  • Zero Telemetry: No tracking beacons, analytics, or phone-home requests.
  • Byte-for-Byte Rollback: Automatic pre-optimization backups in .assetdiet/backups/ and atomic journaled recovery via assetdiet restore.

Quick Start

1. Setup with Your AI Coding Assistant

Configure your installed assistants with interactive verification and automatic .bak backups:

npx -y assetdiet-mcp setup

To preview proposed configuration changes without touching files on disk:

npx -y assetdiet-mcp setup --dry-run

2. Run Diagnostics

Verify that your system meets all engine requirements and inspect detected coding assistants:

npx -y assetdiet-mcp doctor

3. Read-Only Codebase Audit

Analyze assets in your project and calculate potential byte savings without modifying files:

npx -y assetdiet-mcp audit . --policy safe

4. Optimize with Rollback Protection

npx -y assetdiet-mcp optimize . --policy safe

To rollback anytime:

npx -y assetdiet-mcp restore --run <runId>

Supported Formats & Engines

  • Images (.png, .jpg, .webp, .avif, .tiff, .gif): Powered by Sharp (libvips).
  • Vectors (.svg): Powered by SVGO.
  • 3D Models (.glb, .gltf): Powered by glTF-Transform.
  • Video (.mp4, .webm): Direct subprocess execution with host FFmpeg / FFprobe (safely skipped if missing).
  • Fonts (.woff2, .woff, .ttf, .otf): Header metadata parsing & duplicate family detection.


License

MIT © 2026 AssetDiet Contributors