Skip to content

Releases: PCIRCLE-AI/toonify-mcp

v0.6.0 — Pipeline Architecture + Code Compression

02 Apr 19:54
83370d1

Choose a tag to compare

Pipeline Architecture + Code Compression

Toonify MCP now compresses source code in addition to structured data — reducing token usage on TypeScript, Python, and Go files that previously got 0% optimization.

Highlights

  • Pipeline engine — modular Detector → Router → Compressor → Evaluator architecture, extensible via Compressor interface
  • Code compression — 6 heuristic layers from safe to aggressive:
    1. Merge consecutive blank lines
    2. Remove inline comments
    3. Remove comment-only lines (preserves TODO/FIXME, JSDoc/docstring summaries)
    4. Shorten deep import paths
    5. Summarize consecutive imports (>500 tokens)
    6. Collapse repetitive patterns (>500 tokens)
  • Hook upgraded — PostToolUse hook now detects and compresses source code (Layers 1-4)
  • Full backwards compatibility — all external APIs unchanged, TokenOptimizer refactored to facade

Benchmark Results

Content Type v0.5.0 v0.6.0
JSON ~48% ~48% (unchanged)
CSV ~25% ~25% (unchanged)
YAML ~40% ~40% (unchanged)
TypeScript 0% 36.8%
Python 0% 47.9%
Go 0% 31.9%

Quality

  • 196 tests (up from 157), all passing
  • 16-dimension comprehensive code review passed
  • Zero as any / @ts-ignore in codebase

Install / Upgrade

cd toonify-mcp
git pull
npm install
npm run build
npm install -g .

Or via marketplace: claude plugin marketplace add PCIRCLE-AI/toonify-mcp

v0.5.0 — Quality, Security & Accuracy Update

02 Apr 16:00
e96b8fc

Choose a tag to compare

What's New

Plugin & Marketplace

  • PostToolUse hook fully implemented — auto-optimizes Read, Grep, Glob, WebFetch results
  • Marketplace install fixedclaude plugin marketplace add PCIRCLE-AI/toonify-mcp works correctly

Accuracy

  • Token counting uses raw tiktoken BPE — no inflated language multipliers
  • Benchmark-verified savings: avg 48%, median 53%, range 25-66%
  • YAML detection hardened — no longer misdetects plain text as YAML
  • CSV parser handles quoted fields ("Smith, John")

Security & Reliability

  • 10 security vulnerabilities fixed (yaml DoS, picomatch ReDoS, qs bypass)
  • DoS protection: 10MB input size limit, safe RegExp pre-compilation
  • Path traversal protection on persistent cache paths
  • Atomic file writes prevent data corruption
  • WASM resource cleanup on process shutdown
  • Async disk I/O — no event loop blocking
  • All async persistence errors properly handled

Tooling

  • TypeScript 6.0, MCP SDK 1.29, Jest 30
  • 157 tests (up from 75), all modules covered
  • Version read from package.json at runtime (no hardcoded strings)

Install

git clone https://github.com/PCIRCLE-AI/toonify-mcp.git
cd toonify-mcp
npm install && npm run build
npm install -g .

# Plugin mode (automatic)
claude plugin add toonify-mcp

# Or marketplace
claude plugin marketplace add PCIRCLE-AI/toonify-mcp

v0.4.0 - Enhanced Caching with Critical Bug Fixes

25 Dec 22:35

Choose a tag to compare

🚀 What's New in v0.4.0

✨ Enhanced Caching System

  • LRU Cache with Least Recently Used eviction strategy
  • TTL Expiration (default: 1 hour)
  • Optional Disk Persistence for cross-session cache reuse
  • 50-500x Performance Improvement on cache hits (0.1ms vs 5-50ms)

🛠️ Critical Bug Fixes (6 issues)

  • ✅ Fixed race conditions in PersistentCache with operation serialization
  • ✅ Fixed excessive disk I/O with batched writes (90%+ reduction)
  • ✅ Optimized updateStats() from O(n) to O(1)
  • ✅ Fixed false cache hits by including metadata in keys
  • ✅ Added missing config validation
  • ✅ Added error handling to all MCP cache tools

🧪 Test Improvements

  • ✅ All 122 tests passing (was 105)
  • ✅ Fixed 8 test issues
  • ✅ Zero TypeScript errors

📦 New MCP Tools

  • clear_cache - Clear all cached optimization results
  • get_cache_stats - Get detailed cache statistics
  • cleanup_expired_cache - Remove expired entries

📚 Documentation

  • New docs/CACHE.md with comprehensive cache documentation
  • Updated README with cache management section
  • Added Taiwan attribution statement

🎯 Performance Metrics

  • Cache hit: ~0.1ms (instant return)
  • Cache miss: ~5-50ms (optimization + store)
  • Memory usage: ~2-5 KB per entry, ~1-2.5 MB for 500 entries

See CHANGELOG.md for complete details.


Full Changelog: v0.3.0...v0.4.0