🚀 v8.19.0 - Code Execution Interface API
Revolutionary 75-90% token reduction for all MCP Memory Service operations!
🎯 Key Achievements
Token Reduction (Validated):
- ✅ Session hooks: 75% reduction (3,600 → 900 tokens)
- ✅ Search operations: 85% reduction (2,625 → 385 tokens)
- ✅ Store operations: 90% reduction (150 → 15 tokens)
- ✅ Health checks: 84% reduction (125 → 20 tokens)
Annual Cost Savings:
- 10 users: $23.82/year (158.8M tokens saved)
- 100 users: $238.20/year (1.59B tokens saved)
- 1000 users: $2,382/year (15.9B tokens saved)
📦 What's New
Code Execution Interface API
Direct Python API for token-efficient memory operations:
from mcp_memory_service.api import search, store, health
# Search (85% token reduction)
results = search("architecture decisions", limit=5)
# Store (90% token reduction)
hash = store("Implemented OAuth 2.1", tags=["auth"])
# Health (84% token reduction)
info = health()Session Hook Migration
- ✅ Claude Code session hooks now use code execution by default
- ✅ Automatic MCP fallback (100% reliability)
- ✅ Performance metrics tracking
- ✅ Zero breaking changes
Auto-Enabled by Default
- ✅ New installations automatically use code execution
- ✅ Platform detection (Windows/Unix Python path)
- ✅ Version validation (warns if Python < 3.10)
- ✅ Graceful upgrade path for existing users
📚 Documentation
- 5-Minute Migration Guide - Get started in 5 minutes
- API Reference - Complete API documentation
- Phase 1 Summary - Core infrastructure details
- Phase 2 Summary - Session hook migration details
- Research Document - 10,000+ word technical analysis
🔄 5-Minute Migration
Fresh Install (2 minutes)
git clone https://github.com/doobidoo/mcp-memory-service.git
cd mcp-memory-service
python install.py
# Done! Code execution enabled by default ✅Existing Installation (3 minutes)
cd mcp-memory-service
git pull
python install.py # Or just restart Claude Code
# Done! 75-90% token reduction automatically ✅⚡ Performance Benchmarks
Execution Performance:
- Cold start: 61.1ms (target: <100ms) ✅
- Warm calls: 1.3ms avg (target: <10ms) ✅
- Memory overhead: <10MB ✅
Test Coverage:
- 52 tests total (88% passing)
- Comprehensive API validation
- Cross-platform compatibility verified
🛡️ Backward Compatibility
- ✅ Zero breaking changes - All existing MCP tools continue working
- ✅ Automatic fallback - Falls back to MCP on any code execution failure
- ✅ Opt-out available - Can disable in
~/.claude/hooks/config.json - ✅ 100% reliability - MCP fallback ensures no data loss
🔧 Technical Details
Files Added: 23 files, 6,517 lines
- Core API module (
src/mcp_memory_service/api/) - Session hook migration (
claude-hooks/core/session-start.js) - Comprehensive test suite (
tests/api/,claude-hooks/tests/) - Migration guide and documentation
Platform Support:
- macOS (Python 3.10+)
- Linux (Python 3.10+)
- Windows (Python 3.10+)
API Exports:
search()- Semantic memory searchstore()- Store new memorieshealth()- Service health checkclose()/close_async()- Resource cleanup
🐛 Fixes
- Cross-Platform Compatibility - Replaced hardcoded macOS paths with
get_base_directory() - Async/Await Pattern - Fixed async
health()to properly await storage operations - Resource Management - Added explicit cleanup methods
- Documentation - Fixed Unicode symbols and absolute paths
- ChromaDB Cleanup - Removed obsolete test infrastructure
🙏 Acknowledgments
Thanks to all contributors and users who provided feedback during development!
Special thanks to the Gemini Code Assist team for thorough code review.
Issue: #206
PR: #209
Commit: 7f74e08
Full Changelog: https://github.com/doobidoo/mcp-memory-service/blob/main/CHANGELOG.md#8190---2025-11-07