github doobidoo/mcp-memory-service v8.62.4
v8.62.4 - CRITICAL: SQLite-Vec KNN Syntax Fix

latest releases: v10.38.3, v10.38.2, v10.38.1...
3 months ago

🔴 CRITICAL BUGFIX: Semantic Search Failure

Impact: Complete failure of semantic search operations on sqlite-vec and hybrid backends (affects majority of installations)

What Was Broken

Semantic search operations (retrieve_memory, recall_memory) completely failed with:

sqlite3.OperationalError: A LIMIT or 'k = ?' constraint is required on vec0 knn queries

Root Cause

SQLite-Vec v0.1.0+ introduced a breaking change requiring k = ? parameter syntax for KNN queries. The service was still using the deprecated LIMIT ? syntax.

What's Fixed

  • ✅ Updated SqliteVecMemoryStorage.retrieve() to use k = ? parameter
  • ✅ Updated SqliteVecMemoryStorage.recall() to use k = ? parameter
  • ✅ Added integration tests (test_retrieve_knn_syntax, test_recall_knn_syntax) for regression prevention
  • ✅ All semantic search operations restored to full functionality

Files Changed

  • src/mcp_memory_service/storage/sqlite_vec_memory_storage.py (lines 245, 340)
  • tests/integration/test_sqlite_vec_storage.py (new integration tests)

Severity & Impact

  • Severity: Critical (P0)
  • Affected Users: All users on sqlite-vec or hybrid backends (majority of installations)
  • Regression Risk: Low - Integration tests now validate KNN syntax explicitly
  • Upgrade Note: No action required - fix is backward compatible

Thanks

🙏 @feroult (Fernando Ultremare) - For identifying the issue and providing the critical fix

Related

  • PR #308: Fix sqlite-vec KNN syntax error (merged)
  • Issue #309: Documentation and CHANGELOG updates (this release)
  • SQLite-Vec v0.1.0: Breaking change introduced k = ? requirement

Installation

pip install --upgrade mcp-memory-service

Or with uv (recommended):

uvx --from mcp-memory-service memory --version

Full Changelog: v8.62.3...v8.62.4

Note: PyPI publishing is handled automatically by GitHub Actions. Please wait ~2-3 minutes for the package to be available on PyPI.

Don't miss a new mcp-memory-service release

NewReleases is sending notifications on new releases.