🎯 Code Quality: Phase 2 Batch 1 Complete
This release completes the first batch of Phase 2 complexity reductions, refactoring 2 high-priority functions with a combined -15 complexity point reduction.
🔧 Refactored Functions
1. install.py::configure_paths() - Complexity 15 → 5 (-10 points)
Extracted 4 helper functions for better separation of concerns:
get_platform_base_dir()- Platform-specific directory detectionsetup_storage_directories()- Storage directory creationbuild_mcp_env_config()- Environment configuration builderupdate_claude_config_file()- Claude Desktop config updater
Impact: Main function reduced from 80 → ~30 lines, dramatically improved testability and maintainability.
2. cloudflare.py::_search_by_tags_internal() - Complexity 13 → 8 (-5 points)
Extracted 3 helper functions for tag normalization and query building:
normalize_tags_for_search()- Tag deduplication and normalizationnormalize_operation()- AND/OR operation validationbuild_tag_search_query()- SQL query construction
Impact: Method reduced from 75 → ~45 lines, better code organization.
✨ Gemini Review Improvements
Applied during iterative review cycles:
- Dynamic
PROJECT_ROOTdetection in scripts for portability - Specific exception handling (OSError, IOError, PermissionError)
- Portable documentation paths across platforms
📊 Phase 2 Progress
- Completed: 3 of 10 functions refactored (30%)
- Complexity Reduction: -20 points of -39 target (51% achieved)
- Remaining: 7 functions with implementation plans ready
- Health Score: On track for 75+ target
🔗 Related
- Issue #240 - Code Quality Improvements (Phase 2)
- PR #243 - Phase 2 Batch 1 Implementation
- Previous: v8.34.0 (analytics.py refactored)
📖 Full Changelog
See CHANGELOG.md for complete details.
📦 Installation
pip install mcp-memory-service==8.35.0Or with uv:
uv pip install mcp-memory-service==8.35.0Docker:
docker pull ghcr.io/doobidoo/mcp-memory-service:v8.35.0