spatial-memory-mcp 1.6.1__tar.gz → 1.7.0__tar.gz

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.

Potentially problematic release.


This version of spatial-memory-mcp might be problematic. Click here for more details.

Files changed (150) hide show
  1. {spatial_memory_mcp-1.6.1 → spatial_memory_mcp-1.7.0}/.gitignore +1 -0
  2. {spatial_memory_mcp-1.6.1 → spatial_memory_mcp-1.7.0}/CHANGELOG.md +46 -0
  3. {spatial_memory_mcp-1.6.1 → spatial_memory_mcp-1.7.0}/MARKETING.md +1 -1
  4. {spatial_memory_mcp-1.6.1 → spatial_memory_mcp-1.7.0}/PKG-INFO +2 -2
  5. {spatial_memory_mcp-1.6.1 → spatial_memory_mcp-1.7.0}/README.md +1 -1
  6. spatial_memory_mcp-1.7.0/docs/CONFIGURATION.md +245 -0
  7. spatial_memory_mcp-1.7.0/docs/TECHNICAL_HIGHLIGHTS.md +803 -0
  8. {spatial_memory_mcp-1.6.1 → spatial_memory_mcp-1.7.0}/pyproject.toml +1 -1
  9. spatial_memory_mcp-1.7.0/scripts/test_auto_decay.py +288 -0
  10. {spatial_memory_mcp-1.6.1 → spatial_memory_mcp-1.7.0}/spatial_memory/__init__.py +1 -1
  11. {spatial_memory_mcp-1.6.1 → spatial_memory_mcp-1.7.0}/spatial_memory/__main__.py +3 -3
  12. {spatial_memory_mcp-1.6.1 → spatial_memory_mcp-1.7.0}/spatial_memory/adapters/lancedb_repository.py +2 -0
  13. {spatial_memory_mcp-1.6.1 → spatial_memory_mcp-1.7.0}/spatial_memory/config.py +38 -1
  14. {spatial_memory_mcp-1.6.1 → spatial_memory_mcp-1.7.0}/spatial_memory/core/__init__.py +2 -2
  15. {spatial_memory_mcp-1.6.1 → spatial_memory_mcp-1.7.0}/spatial_memory/core/consolidation_strategies.py +0 -1
  16. {spatial_memory_mcp-1.6.1 → spatial_memory_mcp-1.7.0}/spatial_memory/core/database.py +14 -11
  17. {spatial_memory_mcp-1.6.1 → spatial_memory_mcp-1.7.0}/spatial_memory/core/db_indexes.py +2 -1
  18. {spatial_memory_mcp-1.6.1 → spatial_memory_mcp-1.7.0}/spatial_memory/core/db_migrations.py +0 -1
  19. {spatial_memory_mcp-1.6.1 → spatial_memory_mcp-1.7.0}/spatial_memory/core/db_search.py +4 -1
  20. {spatial_memory_mcp-1.6.1 → spatial_memory_mcp-1.7.0}/spatial_memory/core/embeddings.py +2 -2
  21. {spatial_memory_mcp-1.6.1 → spatial_memory_mcp-1.7.0}/spatial_memory/core/file_security.py +0 -1
  22. {spatial_memory_mcp-1.6.1 → spatial_memory_mcp-1.7.0}/spatial_memory/core/models.py +31 -0
  23. {spatial_memory_mcp-1.6.1 → spatial_memory_mcp-1.7.0}/spatial_memory/core/response_types.py +3 -0
  24. {spatial_memory_mcp-1.6.1 → spatial_memory_mcp-1.7.0}/spatial_memory/factory.py +37 -0
  25. {spatial_memory_mcp-1.6.1 → spatial_memory_mcp-1.7.0}/spatial_memory/ports/repositories.py +0 -1
  26. {spatial_memory_mcp-1.6.1 → spatial_memory_mcp-1.7.0}/spatial_memory/server.py +113 -41
  27. {spatial_memory_mcp-1.6.1 → spatial_memory_mcp-1.7.0}/spatial_memory/services/__init__.py +3 -3
  28. spatial_memory_mcp-1.7.0/spatial_memory/services/decay_manager.py +406 -0
  29. {spatial_memory_mcp-1.6.1 → spatial_memory_mcp-1.7.0}/spatial_memory/services/export_import.py +10 -8
  30. {spatial_memory_mcp-1.6.1 → spatial_memory_mcp-1.7.0}/spatial_memory/services/lifecycle.py +11 -8
  31. {spatial_memory_mcp-1.6.1 → spatial_memory_mcp-1.7.0}/spatial_memory/services/spatial.py +5 -2
  32. {spatial_memory_mcp-1.6.1 → spatial_memory_mcp-1.7.0}/spatial_memory/services/utility.py +17 -3
  33. spatial_memory_mcp-1.7.0/tests/integration/test_auto_decay.py +435 -0
  34. spatial_memory_mcp-1.7.0/tests/unit/test_decay_manager.py +584 -0
  35. {spatial_memory_mcp-1.6.1 → spatial_memory_mcp-1.7.0}/.env.example +0 -0
  36. {spatial_memory_mcp-1.6.1 → spatial_memory_mcp-1.7.0}/CLAUDE.md +0 -0
  37. {spatial_memory_mcp-1.6.1 → spatial_memory_mcp-1.7.0}/CONTRIBUTING.md +0 -0
  38. {spatial_memory_mcp-1.6.1 → spatial_memory_mcp-1.7.0}/ISSUES-TRACKER.md +0 -0
  39. {spatial_memory_mcp-1.6.1 → spatial_memory_mcp-1.7.0}/LICENSE +0 -0
  40. {spatial_memory_mcp-1.6.1 → spatial_memory_mcp-1.7.0}/LIFECYCLE_PHASE_PLAN.md +0 -0
  41. {spatial_memory_mcp-1.6.1 → spatial_memory_mcp-1.7.0}/PHASE4B_PLAN.md +0 -0
  42. {spatial_memory_mcp-1.6.1 → spatial_memory_mcp-1.7.0}/PHASE4_PLAN.md +0 -0
  43. {spatial_memory_mcp-1.6.1 → spatial_memory_mcp-1.7.0}/PHASE5_UTILITIES_PLAN.md +0 -0
  44. {spatial_memory_mcp-1.6.1 → spatial_memory_mcp-1.7.0}/SECURITY.md +0 -0
  45. {spatial_memory_mcp-1.6.1 → spatial_memory_mcp-1.7.0}/SPATIAL-MEMORY-ARCHITECTURE-DIAGRAMS.md +0 -0
  46. {spatial_memory_mcp-1.6.1 → spatial_memory_mcp-1.7.0}/SPATIAL-MEMORY-MCP-SERVER-PLAN (1).md +0 -0
  47. {spatial_memory_mcp-1.6.1 → spatial_memory_mcp-1.7.0}/docs/API.md +0 -0
  48. {spatial_memory_mcp-1.6.1 → spatial_memory_mcp-1.7.0}/docs/BENCHMARKS.md +0 -0
  49. {spatial_memory_mcp-1.6.1 → spatial_memory_mcp-1.7.0}/docs/MCP_SERVER_INSTRUCTIONS.md +0 -0
  50. {spatial_memory_mcp-1.6.1 → spatial_memory_mcp-1.7.0}/docs/METRICS.md +0 -0
  51. {spatial_memory_mcp-1.6.1 → spatial_memory_mcp-1.7.0}/docs/troubleshooting.md +0 -0
  52. {spatial_memory_mcp-1.6.1 → spatial_memory_mcp-1.7.0}/examples/demo_config_logging.py +0 -0
  53. {spatial_memory_mcp-1.6.1 → spatial_memory_mcp-1.7.0}/scripts/benchmark.py +0 -0
  54. {spatial_memory_mcp-1.6.1 → spatial_memory_mcp-1.7.0}/scripts/inspect_db.py +0 -0
  55. {spatial_memory_mcp-1.6.1 → spatial_memory_mcp-1.7.0}/scripts/populate_test_data.py +0 -0
  56. {spatial_memory_mcp-1.6.1 → spatial_memory_mcp-1.7.0}/scripts/test_all_tools.py +0 -0
  57. {spatial_memory_mcp-1.6.1 → spatial_memory_mcp-1.7.0}/spatial_memory/adapters/__init__.py +0 -0
  58. {spatial_memory_mcp-1.6.1 → spatial_memory_mcp-1.7.0}/spatial_memory/core/cache.py +0 -0
  59. {spatial_memory_mcp-1.6.1 → spatial_memory_mcp-1.7.0}/spatial_memory/core/circuit_breaker.py +0 -0
  60. {spatial_memory_mcp-1.6.1 → spatial_memory_mcp-1.7.0}/spatial_memory/core/connection_pool.py +0 -0
  61. {spatial_memory_mcp-1.6.1 → spatial_memory_mcp-1.7.0}/spatial_memory/core/db_idempotency.py +0 -0
  62. {spatial_memory_mcp-1.6.1 → spatial_memory_mcp-1.7.0}/spatial_memory/core/db_versioning.py +0 -0
  63. {spatial_memory_mcp-1.6.1 → spatial_memory_mcp-1.7.0}/spatial_memory/core/errors.py +0 -0
  64. {spatial_memory_mcp-1.6.1 → spatial_memory_mcp-1.7.0}/spatial_memory/core/filesystem.py +0 -0
  65. {spatial_memory_mcp-1.6.1 → spatial_memory_mcp-1.7.0}/spatial_memory/core/health.py +0 -0
  66. {spatial_memory_mcp-1.6.1 → spatial_memory_mcp-1.7.0}/spatial_memory/core/helpers.py +0 -0
  67. {spatial_memory_mcp-1.6.1 → spatial_memory_mcp-1.7.0}/spatial_memory/core/import_security.py +0 -0
  68. {spatial_memory_mcp-1.6.1 → spatial_memory_mcp-1.7.0}/spatial_memory/core/lifecycle_ops.py +0 -0
  69. {spatial_memory_mcp-1.6.1 → spatial_memory_mcp-1.7.0}/spatial_memory/core/logging.py +0 -0
  70. {spatial_memory_mcp-1.6.1 → spatial_memory_mcp-1.7.0}/spatial_memory/core/metrics.py +0 -0
  71. {spatial_memory_mcp-1.6.1 → spatial_memory_mcp-1.7.0}/spatial_memory/core/rate_limiter.py +0 -0
  72. {spatial_memory_mcp-1.6.1 → spatial_memory_mcp-1.7.0}/spatial_memory/core/security.py +0 -0
  73. {spatial_memory_mcp-1.6.1 → spatial_memory_mcp-1.7.0}/spatial_memory/core/spatial_ops.py +0 -0
  74. {spatial_memory_mcp-1.6.1 → spatial_memory_mcp-1.7.0}/spatial_memory/core/tracing.py +0 -0
  75. {spatial_memory_mcp-1.6.1 → spatial_memory_mcp-1.7.0}/spatial_memory/core/utils.py +0 -0
  76. {spatial_memory_mcp-1.6.1 → spatial_memory_mcp-1.7.0}/spatial_memory/core/validation.py +0 -0
  77. {spatial_memory_mcp-1.6.1 → spatial_memory_mcp-1.7.0}/spatial_memory/migrations/__init__.py +0 -0
  78. {spatial_memory_mcp-1.6.1 → spatial_memory_mcp-1.7.0}/spatial_memory/ports/__init__.py +0 -0
  79. {spatial_memory_mcp-1.6.1 → spatial_memory_mcp-1.7.0}/spatial_memory/py.typed +0 -0
  80. {spatial_memory_mcp-1.6.1 → spatial_memory_mcp-1.7.0}/spatial_memory/services/memory.py +0 -0
  81. {spatial_memory_mcp-1.6.1 → spatial_memory_mcp-1.7.0}/spatial_memory/tools/__init__.py +0 -0
  82. {spatial_memory_mcp-1.6.1 → spatial_memory_mcp-1.7.0}/spatial_memory/tools/definitions.py +0 -0
  83. {spatial_memory_mcp-1.6.1 → spatial_memory_mcp-1.7.0}/spatial_memory/verify.py +0 -0
  84. {spatial_memory_mcp-1.6.1 → spatial_memory_mcp-1.7.0}/stubs/hdbscan/__init__.pyi +0 -0
  85. {spatial_memory_mcp-1.6.1 → spatial_memory_mcp-1.7.0}/stubs/lancedb/__init__.pyi +0 -0
  86. {spatial_memory_mcp-1.6.1 → spatial_memory_mcp-1.7.0}/stubs/lancedb/index.pyi +0 -0
  87. {spatial_memory_mcp-1.6.1 → spatial_memory_mcp-1.7.0}/stubs/lancedb/rerankers.pyi +0 -0
  88. {spatial_memory_mcp-1.6.1 → spatial_memory_mcp-1.7.0}/stubs/lancedb/table.pyi +0 -0
  89. {spatial_memory_mcp-1.6.1 → spatial_memory_mcp-1.7.0}/stubs/mcp/__init__.pyi +0 -0
  90. {spatial_memory_mcp-1.6.1 → spatial_memory_mcp-1.7.0}/stubs/mcp/server/__init__.pyi +0 -0
  91. {spatial_memory_mcp-1.6.1 → spatial_memory_mcp-1.7.0}/stubs/mcp/server/stdio.pyi +0 -0
  92. {spatial_memory_mcp-1.6.1 → spatial_memory_mcp-1.7.0}/stubs/mcp/types.pyi +0 -0
  93. {spatial_memory_mcp-1.6.1 → spatial_memory_mcp-1.7.0}/stubs/openai/__init__.pyi +0 -0
  94. {spatial_memory_mcp-1.6.1 → spatial_memory_mcp-1.7.0}/stubs/pyarrow/__init__.pyi +0 -0
  95. {spatial_memory_mcp-1.6.1 → spatial_memory_mcp-1.7.0}/stubs/pyarrow/parquet.pyi +0 -0
  96. {spatial_memory_mcp-1.6.1 → spatial_memory_mcp-1.7.0}/stubs/sklearn/__init__.pyi +0 -0
  97. {spatial_memory_mcp-1.6.1 → spatial_memory_mcp-1.7.0}/stubs/sklearn/metrics/__init__.pyi +0 -0
  98. {spatial_memory_mcp-1.6.1 → spatial_memory_mcp-1.7.0}/stubs/umap/__init__.pyi +0 -0
  99. {spatial_memory_mcp-1.6.1 → spatial_memory_mcp-1.7.0}/tests/__init__.py +0 -0
  100. {spatial_memory_mcp-1.6.1 → spatial_memory_mcp-1.7.0}/tests/conftest.py +0 -0
  101. {spatial_memory_mcp-1.6.1 → spatial_memory_mcp-1.7.0}/tests/integration/__init__.py +0 -0
  102. {spatial_memory_mcp-1.6.1 → spatial_memory_mcp-1.7.0}/tests/integration/conftest.py +0 -0
  103. {spatial_memory_mcp-1.6.1 → spatial_memory_mcp-1.7.0}/tests/integration/test_backup_restore.py +0 -0
  104. {spatial_memory_mcp-1.6.1 → spatial_memory_mcp-1.7.0}/tests/integration/test_concurrent_writes.py +0 -0
  105. {spatial_memory_mcp-1.6.1 → spatial_memory_mcp-1.7.0}/tests/integration/test_cross_process_locking.py +0 -0
  106. {spatial_memory_mcp-1.6.1 → spatial_memory_mcp-1.7.0}/tests/integration/test_database.py +0 -0
  107. {spatial_memory_mcp-1.6.1 → spatial_memory_mcp-1.7.0}/tests/integration/test_database_safeguards.py +0 -0
  108. {spatial_memory_mcp-1.6.1 → spatial_memory_mcp-1.7.0}/tests/integration/test_embeddings.py +0 -0
  109. {spatial_memory_mcp-1.6.1 → spatial_memory_mcp-1.7.0}/tests/integration/test_enterprise_features.py +0 -0
  110. {spatial_memory_mcp-1.6.1 → spatial_memory_mcp-1.7.0}/tests/integration/test_indexing.py +0 -0
  111. {spatial_memory_mcp-1.6.1 → spatial_memory_mcp-1.7.0}/tests/integration/test_mcp_server.py +0 -0
  112. {spatial_memory_mcp-1.6.1 → spatial_memory_mcp-1.7.0}/tests/integration/test_namespace_ops.py +0 -0
  113. {spatial_memory_mcp-1.6.1 → spatial_memory_mcp-1.7.0}/tests/integration/test_phase5_tools.py +0 -0
  114. {spatial_memory_mcp-1.6.1 → spatial_memory_mcp-1.7.0}/tests/integration/test_security_edge_cases.py +0 -0
  115. {spatial_memory_mcp-1.6.1 → spatial_memory_mcp-1.7.0}/tests/integration/test_server_v153.py +0 -0
  116. {spatial_memory_mcp-1.6.1 → spatial_memory_mcp-1.7.0}/tests/integration/test_ttl_snapshots.py +0 -0
  117. {spatial_memory_mcp-1.6.1 → spatial_memory_mcp-1.7.0}/tests/test_config.py +0 -0
  118. {spatial_memory_mcp-1.6.1 → spatial_memory_mcp-1.7.0}/tests/test_connection_pool.py +0 -0
  119. {spatial_memory_mcp-1.6.1 → spatial_memory_mcp-1.7.0}/tests/test_health.py +0 -0
  120. {spatial_memory_mcp-1.6.1 → spatial_memory_mcp-1.7.0}/tests/test_helpers.py +0 -0
  121. {spatial_memory_mcp-1.6.1 → spatial_memory_mcp-1.7.0}/tests/test_logging.py +0 -0
  122. {spatial_memory_mcp-1.6.1 → spatial_memory_mcp-1.7.0}/tests/test_metrics.py +0 -0
  123. {spatial_memory_mcp-1.6.1 → spatial_memory_mcp-1.7.0}/tests/test_models.py +0 -0
  124. {spatial_memory_mcp-1.6.1 → spatial_memory_mcp-1.7.0}/tests/test_rate_limiter.py +0 -0
  125. {spatial_memory_mcp-1.6.1 → spatial_memory_mcp-1.7.0}/tests/test_validation.py +0 -0
  126. {spatial_memory_mcp-1.6.1 → spatial_memory_mcp-1.7.0}/tests/unit/__init__.py +0 -0
  127. {spatial_memory_mcp-1.6.1 → spatial_memory_mcp-1.7.0}/tests/unit/test_cache.py +0 -0
  128. {spatial_memory_mcp-1.6.1 → spatial_memory_mcp-1.7.0}/tests/unit/test_circuit_breaker.py +0 -0
  129. {spatial_memory_mcp-1.6.1 → spatial_memory_mcp-1.7.0}/tests/unit/test_config_phase5.py +0 -0
  130. {spatial_memory_mcp-1.6.1 → spatial_memory_mcp-1.7.0}/tests/unit/test_errors_phase5.py +0 -0
  131. {spatial_memory_mcp-1.6.1 → spatial_memory_mcp-1.7.0}/tests/unit/test_export_import_service.py +0 -0
  132. {spatial_memory_mcp-1.6.1 → spatial_memory_mcp-1.7.0}/tests/unit/test_export_ops.py +0 -0
  133. {spatial_memory_mcp-1.6.1 → spatial_memory_mcp-1.7.0}/tests/unit/test_file_security.py +0 -0
  134. {spatial_memory_mcp-1.6.1 → spatial_memory_mcp-1.7.0}/tests/unit/test_filesystem.py +0 -0
  135. {spatial_memory_mcp-1.6.1 → spatial_memory_mcp-1.7.0}/tests/unit/test_hybrid_search_ops.py +0 -0
  136. {spatial_memory_mcp-1.6.1 → spatial_memory_mcp-1.7.0}/tests/unit/test_import_ops.py +0 -0
  137. {spatial_memory_mcp-1.6.1 → spatial_memory_mcp-1.7.0}/tests/unit/test_import_security.py +0 -0
  138. {spatial_memory_mcp-1.6.1 → spatial_memory_mcp-1.7.0}/tests/unit/test_lancedb_repository_phase5.py +0 -0
  139. {spatial_memory_mcp-1.6.1 → spatial_memory_mcp-1.7.0}/tests/unit/test_lifecycle_ops.py +0 -0
  140. {spatial_memory_mcp-1.6.1 → spatial_memory_mcp-1.7.0}/tests/unit/test_lifecycle_service.py +0 -0
  141. {spatial_memory_mcp-1.6.1 → spatial_memory_mcp-1.7.0}/tests/unit/test_memory_service.py +0 -0
  142. {spatial_memory_mcp-1.6.1 → spatial_memory_mcp-1.7.0}/tests/unit/test_models_phase5.py +0 -0
  143. {spatial_memory_mcp-1.6.1 → spatial_memory_mcp-1.7.0}/tests/unit/test_process_lock.py +0 -0
  144. {spatial_memory_mcp-1.6.1 → spatial_memory_mcp-1.7.0}/tests/unit/test_security_facade.py +0 -0
  145. {spatial_memory_mcp-1.6.1 → spatial_memory_mcp-1.7.0}/tests/unit/test_spatial_ops.py +0 -0
  146. {spatial_memory_mcp-1.6.1 → spatial_memory_mcp-1.7.0}/tests/unit/test_spatial_service.py +0 -0
  147. {spatial_memory_mcp-1.6.1 → spatial_memory_mcp-1.7.0}/tests/unit/test_stats_ops.py +0 -0
  148. {spatial_memory_mcp-1.6.1 → spatial_memory_mcp-1.7.0}/tests/unit/test_tracing.py +0 -0
  149. {spatial_memory_mcp-1.6.1 → spatial_memory_mcp-1.7.0}/tests/unit/test_utility_service.py +0 -0
  150. {spatial_memory_mcp-1.6.1 → spatial_memory_mcp-1.7.0}/tests/unit/test_utils.py +0 -0
@@ -138,6 +138,7 @@ cython_debug/
138
138
  # OS
139
139
  .DS_Store
140
140
  Thumbs.db
141
+ nul
141
142
 
142
143
  # Project specific
143
144
  *.lancedb/
@@ -11,6 +11,52 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
11
11
  - Medium severity architectural improvements (MED-ARCH-001 through MED-ARCH-004)
12
12
  - Migration system (MED-DB-005)
13
13
 
14
+ ## [1.7.0] - 2026-02-02
15
+
16
+ ### Added
17
+ - **Auto-Decay Feature**: Automatic time-based importance decay during recall operations
18
+ - Memories automatically lose importance over time if not accessed (exponential decay)
19
+ - `effective_importance` field added to `recall` and `hybrid_recall` responses
20
+ - Results re-ranked by `similarity × effective_importance` to favor recent memories
21
+ - Background persistence thread batches and saves decay updates to database
22
+ - Configurable via environment variables:
23
+ - `SPATIAL_MEMORY_AUTO_DECAY_ENABLED` (default: true)
24
+ - `SPATIAL_MEMORY_AUTO_DECAY_PERSIST_ENABLED` (default: true)
25
+ - `SPATIAL_MEMORY_AUTO_DECAY_PERSIST_BATCH_SIZE` (default: 100)
26
+ - `SPATIAL_MEMORY_AUTO_DECAY_PERSIST_FLUSH_INTERVAL_SECONDS` (default: 5.0)
27
+ - `SPATIAL_MEMORY_AUTO_DECAY_MIN_CHANGE_THRESHOLD` (default: 0.01)
28
+ - `SPATIAL_MEMORY_AUTO_DECAY_MAX_QUEUE_SIZE` (default: 10000)
29
+ - Access count slows decay: frequently accessed memories stay relevant longer
30
+ - Minimum importance floor prevents memories from decaying to zero
31
+ - Configuration documentation (`docs/CONFIGURATION.md`)
32
+ - Complete reference for all environment variables
33
+ - Examples for `.mcp.json`, Claude Desktop, and `.env` files
34
+ - Auto-decay configuration guide
35
+ - Test script for verifying auto-decay (`scripts/test_auto_decay.py`)
36
+
37
+ ### Changed
38
+ - `MemoryResultDict` and `HybridMemoryDict` response types now include optional `effective_importance` field
39
+ - `MemoryResult` and `HybridMemoryMatch` models now include `last_accessed` and `access_count` fields
40
+
41
+ ## [1.6.2] - 2026-02-02
42
+
43
+ ### Added
44
+ - Technical highlights documentation (`docs/TECHNICAL_HIGHLIGHTS.md`) with Mermaid diagrams
45
+ - Cognitive memory model vs traditional storage
46
+ - SLERP algorithm for journey tool
47
+ - Temperature-based random walks for wander tool
48
+ - HDBSCAN clustering for regions tool
49
+ - UMAP projection for visualize tool
50
+ - ONNX Runtime optimization
51
+ - scipy integration for efficient similarity calculations
52
+
53
+ ### Fixed
54
+ - Fixed 46 ruff linting errors across codebase
55
+ - Import sorting and formatting
56
+ - Lines exceeding 100 characters
57
+ - Unused variables and imports
58
+ - Import ordering issues
59
+
14
60
  ## [1.6.1] - 2026-02-02
15
61
 
16
62
  ### Added
@@ -212,7 +212,7 @@ Navigate between concepts. Discover intermediate ideas. Visualize knowledge stru
212
212
  - **Architecture**: Clean architecture with dependency injection
213
213
  - **Type Safety**: Full type hints, mypy strict mode
214
214
  - **Test Suite**: 1,360 passing tests
215
- - **Version**: 1.6.0
215
+ - **Version**: 1.6.2
216
216
 
217
217
  ---
218
218
 
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.4
2
2
  Name: spatial-memory-mcp
3
- Version: 1.6.1
3
+ Version: 1.7.0
4
4
  Summary: Spatial bidirectional persistent memory MCP server for LLMs - vector-based semantic memory as a navigable landscape
5
5
  Project-URL: Homepage, https://github.com/arman-tech/spatial-memory-mcp
6
6
  Project-URL: Repository, https://github.com/arman-tech/spatial-memory-mcp
@@ -48,7 +48,7 @@ Description-Content-Type: text/markdown
48
48
 
49
49
  A vector-based spatial memory system that treats knowledge as a navigable landscape, not a filing cabinet.
50
50
 
51
- > **Version 1.6.1** — Production-ready with 1,360 tests passing.
51
+ > **Version 1.6.2** — Production-ready with 1,360 tests passing.
52
52
 
53
53
  ## Supported Platforms
54
54
 
@@ -6,7 +6,7 @@
6
6
 
7
7
  A vector-based spatial memory system that treats knowledge as a navigable landscape, not a filing cabinet.
8
8
 
9
- > **Version 1.6.1** — Production-ready with 1,360 tests passing.
9
+ > **Version 1.6.2** — Production-ready with 1,360 tests passing.
10
10
 
11
11
  ## Supported Platforms
12
12
 
@@ -0,0 +1,245 @@
1
+ # Configuration Guide
2
+
3
+ Spatial Memory MCP Server is configured via environment variables with the `SPATIAL_MEMORY_` prefix.
4
+
5
+ ## Configuration Methods
6
+
7
+ ### 1. `.mcp.json` (Recommended for MCP Clients)
8
+
9
+ Create a `.mcp.json` file in your project root:
10
+
11
+ ```json
12
+ {
13
+ "mcpServers": {
14
+ "spatial-memory": {
15
+ "command": "spatial-memory",
16
+ "env": {
17
+ "SPATIAL_MEMORY_AUTO_DECAY_ENABLED": "true",
18
+ "SPATIAL_MEMORY_AUTO_DECAY_PERSIST_ENABLED": "false",
19
+ "SPATIAL_MEMORY_LOG_LEVEL": "INFO"
20
+ }
21
+ }
22
+ }
23
+ }
24
+ ```
25
+
26
+ ### 2. Claude Desktop Configuration
27
+
28
+ Edit `claude_desktop_config.json`:
29
+
30
+ **macOS**: `~/Library/Application Support/Claude/claude_desktop_config.json`
31
+ **Windows**: `%APPDATA%\Claude\claude_desktop_config.json`
32
+
33
+ ```json
34
+ {
35
+ "mcpServers": {
36
+ "spatial-memory": {
37
+ "command": "spatial-memory",
38
+ "env": {
39
+ "SPATIAL_MEMORY_MEMORY_PATH": "/path/to/storage",
40
+ "SPATIAL_MEMORY_AUTO_DECAY_ENABLED": "true"
41
+ }
42
+ }
43
+ }
44
+ }
45
+ ```
46
+
47
+ ### 3. Environment Variables
48
+
49
+ ```bash
50
+ # Export before running
51
+ export SPATIAL_MEMORY_AUTO_DECAY_ENABLED=true
52
+ export SPATIAL_MEMORY_LOG_LEVEL=DEBUG
53
+ spatial-memory
54
+ ```
55
+
56
+ Or inline:
57
+
58
+ ```bash
59
+ SPATIAL_MEMORY_AUTO_DECAY_ENABLED=false spatial-memory
60
+ ```
61
+
62
+ ### 4. `.env` File
63
+
64
+ Create a `.env` file in your working directory:
65
+
66
+ ```env
67
+ SPATIAL_MEMORY_MEMORY_PATH=./.spatial-memory
68
+ SPATIAL_MEMORY_LOG_LEVEL=INFO
69
+ SPATIAL_MEMORY_AUTO_DECAY_ENABLED=true
70
+ SPATIAL_MEMORY_AUTO_DECAY_PERSIST_ENABLED=true
71
+ ```
72
+
73
+ ---
74
+
75
+ ## Configuration Reference
76
+
77
+ ### Storage
78
+
79
+ | Variable | Default | Description |
80
+ |----------|---------|-------------|
81
+ | `SPATIAL_MEMORY_MEMORY_PATH` | `./.spatial-memory` | Path to LanceDB storage directory |
82
+ | `SPATIAL_MEMORY_ACKNOWLEDGE_NETWORK_FILESYSTEM_RISK` | `false` | Suppress network filesystem warnings |
83
+
84
+ ### Embedding Model
85
+
86
+ | Variable | Default | Description |
87
+ |----------|---------|-------------|
88
+ | `SPATIAL_MEMORY_EMBEDDING_MODEL` | `all-MiniLM-L6-v2` | Model name or `openai:model-name` |
89
+ | `SPATIAL_MEMORY_EMBEDDING_DIMENSIONS` | `384` | Vector dimensions (auto-detected) |
90
+ | `SPATIAL_MEMORY_EMBEDDING_BACKEND` | `auto` | Backend: `auto`, `onnx`, or `pytorch` |
91
+
92
+ ### OpenAI (Optional)
93
+
94
+ | Variable | Default | Description |
95
+ |----------|---------|-------------|
96
+ | `SPATIAL_MEMORY_OPENAI_API_KEY` | `null` | OpenAI API key for embeddings |
97
+ | `SPATIAL_MEMORY_OPENAI_EMBEDDING_MODEL` | `text-embedding-3-small` | OpenAI model to use |
98
+
99
+ ### Server
100
+
101
+ | Variable | Default | Description |
102
+ |----------|---------|-------------|
103
+ | `SPATIAL_MEMORY_LOG_LEVEL` | `INFO` | Logging level: `DEBUG`, `INFO`, `WARNING`, `ERROR` |
104
+ | `SPATIAL_MEMORY_LOG_FORMAT` | `text` | Log format: `text` or `json` |
105
+
106
+ ### Memory Defaults
107
+
108
+ | Variable | Default | Description |
109
+ |----------|---------|-------------|
110
+ | `SPATIAL_MEMORY_DEFAULT_NAMESPACE` | `default` | Default namespace for memories |
111
+ | `SPATIAL_MEMORY_DEFAULT_IMPORTANCE` | `0.5` | Default importance (0.0-1.0) |
112
+
113
+ ### Limits
114
+
115
+ | Variable | Default | Description |
116
+ |----------|---------|-------------|
117
+ | `SPATIAL_MEMORY_MAX_BATCH_SIZE` | `100` | Max memories per batch operation |
118
+ | `SPATIAL_MEMORY_MAX_RECALL_LIMIT` | `100` | Max results from recall |
119
+ | `SPATIAL_MEMORY_MAX_JOURNEY_STEPS` | `20` | Max steps in journey |
120
+ | `SPATIAL_MEMORY_MAX_WANDER_STEPS` | `20` | Max steps in wander |
121
+
122
+ ---
123
+
124
+ ## Auto-Decay Settings
125
+
126
+ Auto-decay automatically reduces the importance of memories over time, favoring recently accessed memories in search results.
127
+
128
+ | Variable | Default | Description |
129
+ |----------|---------|-------------|
130
+ | `SPATIAL_MEMORY_AUTO_DECAY_ENABLED` | `true` | Enable decay calculation during recall |
131
+ | `SPATIAL_MEMORY_AUTO_DECAY_PERSIST_ENABLED` | `true` | Save decayed values to database |
132
+ | `SPATIAL_MEMORY_AUTO_DECAY_PERSIST_BATCH_SIZE` | `100` | Batch size for persistence |
133
+ | `SPATIAL_MEMORY_AUTO_DECAY_PERSIST_FLUSH_INTERVAL_SECONDS` | `5.0` | How often to flush updates (seconds) |
134
+ | `SPATIAL_MEMORY_AUTO_DECAY_MIN_CHANGE_THRESHOLD` | `0.01` | Min change to trigger persist (1%) |
135
+ | `SPATIAL_MEMORY_AUTO_DECAY_MAX_QUEUE_SIZE` | `10000` | Max queued updates |
136
+
137
+ ### How Auto-Decay Works
138
+
139
+ 1. **Exponential Decay**: `effective_importance = importance × 2^(-days_since_access / half_life)`
140
+ 2. **Default Half-Life**: 30 days (memory loses 50% importance after 30 days without access)
141
+ 3. **Access Count Bonus**: Frequently accessed memories decay slower
142
+ 4. **Minimum Floor**: Importance never drops below 10%
143
+
144
+ ### Example Configurations
145
+
146
+ **Disable auto-decay entirely:**
147
+ ```json
148
+ {
149
+ "env": {
150
+ "SPATIAL_MEMORY_AUTO_DECAY_ENABLED": "false"
151
+ }
152
+ }
153
+ ```
154
+
155
+ **Enable decay calculation but don't persist changes:**
156
+ ```json
157
+ {
158
+ "env": {
159
+ "SPATIAL_MEMORY_AUTO_DECAY_ENABLED": "true",
160
+ "SPATIAL_MEMORY_AUTO_DECAY_PERSIST_ENABLED": "false"
161
+ }
162
+ }
163
+ ```
164
+
165
+ **Aggressive persistence (frequent flushes):**
166
+ ```json
167
+ {
168
+ "env": {
169
+ "SPATIAL_MEMORY_AUTO_DECAY_PERSIST_FLUSH_INTERVAL_SECONDS": "1.0",
170
+ "SPATIAL_MEMORY_AUTO_DECAY_MIN_CHANGE_THRESHOLD": "0.001"
171
+ }
172
+ }
173
+ ```
174
+
175
+ ---
176
+
177
+ ## Full Example: `.mcp.json`
178
+
179
+ ```json
180
+ {
181
+ "mcpServers": {
182
+ "spatial-memory": {
183
+ "command": "spatial-memory",
184
+ "env": {
185
+ "SPATIAL_MEMORY_MEMORY_PATH": "./my-project-memory",
186
+ "SPATIAL_MEMORY_LOG_LEVEL": "INFO",
187
+ "SPATIAL_MEMORY_DEFAULT_NAMESPACE": "project",
188
+ "SPATIAL_MEMORY_DEFAULT_IMPORTANCE": "0.5",
189
+ "SPATIAL_MEMORY_AUTO_DECAY_ENABLED": "true",
190
+ "SPATIAL_MEMORY_AUTO_DECAY_PERSIST_ENABLED": "true"
191
+ }
192
+ }
193
+ }
194
+ }
195
+ ```
196
+
197
+ ## Full Example: Claude Desktop
198
+
199
+ ```json
200
+ {
201
+ "mcpServers": {
202
+ "spatial-memory": {
203
+ "command": "spatial-memory",
204
+ "env": {
205
+ "SPATIAL_MEMORY_MEMORY_PATH": "/Users/me/memories",
206
+ "SPATIAL_MEMORY_EMBEDDING_MODEL": "openai:text-embedding-3-small",
207
+ "SPATIAL_MEMORY_OPENAI_API_KEY": "sk-...",
208
+ "SPATIAL_MEMORY_AUTO_DECAY_ENABLED": "true"
209
+ }
210
+ }
211
+ }
212
+ }
213
+ ```
214
+
215
+ ---
216
+
217
+ ## Advanced Settings
218
+
219
+ For power users, additional settings are available for:
220
+
221
+ - **Indexing**: `SPATIAL_MEMORY_VECTOR_INDEX_THRESHOLD`, `SPATIAL_MEMORY_AUTO_CREATE_INDEXES`, `SPATIAL_MEMORY_INDEX_TYPE`
222
+ - **Full-Text Search**: `SPATIAL_MEMORY_ENABLE_FTS_INDEX`, `SPATIAL_MEMORY_FTS_LANGUAGE`
223
+ - **Rate Limiting**: `SPATIAL_MEMORY_RATE_LIMIT_PER_AGENT_ENABLED`, `SPATIAL_MEMORY_RATE_LIMIT_PER_AGENT_RATE`
224
+ - **Circuit Breaker**: `SPATIAL_MEMORY_CIRCUIT_BREAKER_ENABLED`, `SPATIAL_MEMORY_CIRCUIT_BREAKER_FAILURE_THRESHOLD`
225
+ - **Caching**: `SPATIAL_MEMORY_RESPONSE_CACHE_ENABLED`, `SPATIAL_MEMORY_RESPONSE_CACHE_MAX_SIZE`
226
+ - **Manual Decay** (via `decay` tool): `SPATIAL_MEMORY_DECAY_DEFAULT_HALF_LIFE_DAYS`, `SPATIAL_MEMORY_DECAY_MIN_IMPORTANCE_FLOOR`
227
+ - **Export/Import**: `SPATIAL_MEMORY_EXPORT_ALLOWED_PATHS`, `SPATIAL_MEMORY_IMPORT_MAX_FILE_SIZE_MB`
228
+
229
+ See the full list in [`spatial_memory/config.py`](../spatial_memory/config.py).
230
+
231
+ ---
232
+
233
+ ## Verifying Configuration
234
+
235
+ Check that your settings are applied by enabling debug logging:
236
+
237
+ ```json
238
+ {
239
+ "env": {
240
+ "SPATIAL_MEMORY_LOG_LEVEL": "DEBUG"
241
+ }
242
+ }
243
+ ```
244
+
245
+ Then check the server logs for configuration values at startup.