spatial-memory-mcp 1.5.3__tar.gz → 1.6.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 (145) hide show
  1. spatial_memory_mcp-1.6.0/ISSUES-TRACKER.md +302 -0
  2. spatial_memory_mcp-1.6.0/MARKETING.md +246 -0
  3. {spatial_memory_mcp-1.5.3 → spatial_memory_mcp-1.6.0}/PKG-INFO +83 -3
  4. {spatial_memory_mcp-1.5.3 → spatial_memory_mcp-1.6.0}/README.md +82 -2
  5. {spatial_memory_mcp-1.5.3 → spatial_memory_mcp-1.6.0}/docs/MCP_SERVER_INSTRUCTIONS.md +1 -1
  6. {spatial_memory_mcp-1.5.3 → spatial_memory_mcp-1.6.0}/pyproject.toml +1 -1
  7. {spatial_memory_mcp-1.5.3 → spatial_memory_mcp-1.6.0}/spatial_memory/__init__.py +1 -1
  8. spatial_memory_mcp-1.6.0/spatial_memory/__main__.py +253 -0
  9. {spatial_memory_mcp-1.5.3 → spatial_memory_mcp-1.6.0}/spatial_memory/adapters/lancedb_repository.py +74 -5
  10. {spatial_memory_mcp-1.5.3 → spatial_memory_mcp-1.6.0}/spatial_memory/config.py +10 -2
  11. {spatial_memory_mcp-1.5.3 → spatial_memory_mcp-1.6.0}/spatial_memory/core/__init__.py +9 -0
  12. {spatial_memory_mcp-1.5.3 → spatial_memory_mcp-1.6.0}/spatial_memory/core/connection_pool.py +41 -3
  13. spatial_memory_mcp-1.6.0/spatial_memory/core/consolidation_strategies.py +402 -0
  14. {spatial_memory_mcp-1.5.3 → spatial_memory_mcp-1.6.0}/spatial_memory/core/database.py +774 -918
  15. spatial_memory_mcp-1.6.0/spatial_memory/core/db_idempotency.py +242 -0
  16. spatial_memory_mcp-1.6.0/spatial_memory/core/db_indexes.py +575 -0
  17. spatial_memory_mcp-1.6.0/spatial_memory/core/db_migrations.py +584 -0
  18. spatial_memory_mcp-1.6.0/spatial_memory/core/db_search.py +509 -0
  19. spatial_memory_mcp-1.6.0/spatial_memory/core/db_versioning.py +177 -0
  20. {spatial_memory_mcp-1.5.3 → spatial_memory_mcp-1.6.0}/spatial_memory/core/embeddings.py +65 -18
  21. {spatial_memory_mcp-1.5.3 → spatial_memory_mcp-1.6.0}/spatial_memory/core/errors.py +75 -3
  22. spatial_memory_mcp-1.6.0/spatial_memory/core/filesystem.py +178 -0
  23. {spatial_memory_mcp-1.5.3 → spatial_memory_mcp-1.6.0}/spatial_memory/core/models.py +4 -0
  24. {spatial_memory_mcp-1.5.3 → spatial_memory_mcp-1.6.0}/spatial_memory/core/rate_limiter.py +26 -9
  25. spatial_memory_mcp-1.6.0/spatial_memory/core/response_types.py +497 -0
  26. {spatial_memory_mcp-1.5.3 → spatial_memory_mcp-1.6.0}/spatial_memory/core/validation.py +86 -2
  27. spatial_memory_mcp-1.6.0/spatial_memory/factory.py +407 -0
  28. spatial_memory_mcp-1.6.0/spatial_memory/migrations/__init__.py +40 -0
  29. {spatial_memory_mcp-1.5.3 → spatial_memory_mcp-1.6.0}/spatial_memory/ports/repositories.py +52 -2
  30. {spatial_memory_mcp-1.5.3 → spatial_memory_mcp-1.6.0}/spatial_memory/server.py +131 -189
  31. {spatial_memory_mcp-1.5.3 → spatial_memory_mcp-1.6.0}/spatial_memory/services/export_import.py +61 -43
  32. {spatial_memory_mcp-1.5.3 → spatial_memory_mcp-1.6.0}/spatial_memory/services/lifecycle.py +397 -122
  33. {spatial_memory_mcp-1.5.3 → spatial_memory_mcp-1.6.0}/spatial_memory/services/memory.py +2 -2
  34. {spatial_memory_mcp-1.5.3 → spatial_memory_mcp-1.6.0}/spatial_memory/services/spatial.py +129 -46
  35. {spatial_memory_mcp-1.5.3 → spatial_memory_mcp-1.6.0}/tests/conftest.py +9 -3
  36. {spatial_memory_mcp-1.5.3 → spatial_memory_mcp-1.6.0}/tests/integration/test_cross_process_locking.py +11 -0
  37. {spatial_memory_mcp-1.5.3 → spatial_memory_mcp-1.6.0}/tests/integration/test_enterprise_features.py +9 -6
  38. {spatial_memory_mcp-1.5.3 → spatial_memory_mcp-1.6.0}/tests/unit/test_errors_phase5.py +17 -4
  39. spatial_memory_mcp-1.6.0/tests/unit/test_filesystem.py +160 -0
  40. {spatial_memory_mcp-1.5.3 → spatial_memory_mcp-1.6.0}/tests/unit/test_hybrid_search_ops.py +15 -0
  41. {spatial_memory_mcp-1.5.3 → spatial_memory_mcp-1.6.0}/tests/unit/test_lifecycle_service.py +132 -28
  42. {spatial_memory_mcp-1.5.3 → spatial_memory_mcp-1.6.0}/tests/unit/test_memory_service.py +2 -1
  43. {spatial_memory_mcp-1.5.3 → spatial_memory_mcp-1.6.0}/tests/unit/test_spatial_service.py +42 -0
  44. spatial_memory_mcp-1.5.3/spatial_memory/__main__.py +0 -14
  45. {spatial_memory_mcp-1.5.3 → spatial_memory_mcp-1.6.0}/.env.example +0 -0
  46. {spatial_memory_mcp-1.5.3 → spatial_memory_mcp-1.6.0}/.gitignore +0 -0
  47. {spatial_memory_mcp-1.5.3 → spatial_memory_mcp-1.6.0}/CHANGELOG.md +0 -0
  48. {spatial_memory_mcp-1.5.3 → spatial_memory_mcp-1.6.0}/CLAUDE.md +0 -0
  49. {spatial_memory_mcp-1.5.3 → spatial_memory_mcp-1.6.0}/CONTRIBUTING.md +0 -0
  50. {spatial_memory_mcp-1.5.3 → spatial_memory_mcp-1.6.0}/LICENSE +0 -0
  51. {spatial_memory_mcp-1.5.3 → spatial_memory_mcp-1.6.0}/LIFECYCLE_PHASE_PLAN.md +0 -0
  52. {spatial_memory_mcp-1.5.3 → spatial_memory_mcp-1.6.0}/PHASE4B_PLAN.md +0 -0
  53. {spatial_memory_mcp-1.5.3 → spatial_memory_mcp-1.6.0}/PHASE4_PLAN.md +0 -0
  54. {spatial_memory_mcp-1.5.3 → spatial_memory_mcp-1.6.0}/PHASE5_UTILITIES_PLAN.md +0 -0
  55. {spatial_memory_mcp-1.5.3 → spatial_memory_mcp-1.6.0}/SECURITY.md +0 -0
  56. {spatial_memory_mcp-1.5.3 → spatial_memory_mcp-1.6.0}/SPATIAL-MEMORY-ARCHITECTURE-DIAGRAMS.md +0 -0
  57. {spatial_memory_mcp-1.5.3 → spatial_memory_mcp-1.6.0}/SPATIAL-MEMORY-MCP-SERVER-PLAN (1).md +0 -0
  58. {spatial_memory_mcp-1.5.3 → spatial_memory_mcp-1.6.0}/docs/API.md +0 -0
  59. {spatial_memory_mcp-1.5.3 → spatial_memory_mcp-1.6.0}/docs/BENCHMARKS.md +0 -0
  60. {spatial_memory_mcp-1.5.3 → spatial_memory_mcp-1.6.0}/docs/METRICS.md +0 -0
  61. {spatial_memory_mcp-1.5.3 → spatial_memory_mcp-1.6.0}/docs/troubleshooting.md +0 -0
  62. {spatial_memory_mcp-1.5.3 → spatial_memory_mcp-1.6.0}/examples/demo_config_logging.py +0 -0
  63. {spatial_memory_mcp-1.5.3 → spatial_memory_mcp-1.6.0}/scripts/benchmark.py +0 -0
  64. {spatial_memory_mcp-1.5.3 → spatial_memory_mcp-1.6.0}/scripts/inspect_db.py +0 -0
  65. {spatial_memory_mcp-1.5.3 → spatial_memory_mcp-1.6.0}/scripts/populate_test_data.py +0 -0
  66. {spatial_memory_mcp-1.5.3 → spatial_memory_mcp-1.6.0}/scripts/test_all_tools.py +0 -0
  67. {spatial_memory_mcp-1.5.3 → spatial_memory_mcp-1.6.0}/spatial_memory/adapters/__init__.py +0 -0
  68. {spatial_memory_mcp-1.5.3 → spatial_memory_mcp-1.6.0}/spatial_memory/core/cache.py +0 -0
  69. {spatial_memory_mcp-1.5.3 → spatial_memory_mcp-1.6.0}/spatial_memory/core/circuit_breaker.py +0 -0
  70. {spatial_memory_mcp-1.5.3 → spatial_memory_mcp-1.6.0}/spatial_memory/core/file_security.py +0 -0
  71. {spatial_memory_mcp-1.5.3 → spatial_memory_mcp-1.6.0}/spatial_memory/core/health.py +0 -0
  72. {spatial_memory_mcp-1.5.3 → spatial_memory_mcp-1.6.0}/spatial_memory/core/helpers.py +0 -0
  73. {spatial_memory_mcp-1.5.3 → spatial_memory_mcp-1.6.0}/spatial_memory/core/import_security.py +0 -0
  74. {spatial_memory_mcp-1.5.3 → spatial_memory_mcp-1.6.0}/spatial_memory/core/lifecycle_ops.py +0 -0
  75. {spatial_memory_mcp-1.5.3 → spatial_memory_mcp-1.6.0}/spatial_memory/core/logging.py +0 -0
  76. {spatial_memory_mcp-1.5.3 → spatial_memory_mcp-1.6.0}/spatial_memory/core/metrics.py +0 -0
  77. {spatial_memory_mcp-1.5.3 → spatial_memory_mcp-1.6.0}/spatial_memory/core/security.py +0 -0
  78. {spatial_memory_mcp-1.5.3 → spatial_memory_mcp-1.6.0}/spatial_memory/core/spatial_ops.py +0 -0
  79. {spatial_memory_mcp-1.5.3 → spatial_memory_mcp-1.6.0}/spatial_memory/core/tracing.py +0 -0
  80. {spatial_memory_mcp-1.5.3 → spatial_memory_mcp-1.6.0}/spatial_memory/core/utils.py +0 -0
  81. {spatial_memory_mcp-1.5.3 → spatial_memory_mcp-1.6.0}/spatial_memory/ports/__init__.py +0 -0
  82. {spatial_memory_mcp-1.5.3 → spatial_memory_mcp-1.6.0}/spatial_memory/py.typed +0 -0
  83. {spatial_memory_mcp-1.5.3 → spatial_memory_mcp-1.6.0}/spatial_memory/services/__init__.py +0 -0
  84. {spatial_memory_mcp-1.5.3 → spatial_memory_mcp-1.6.0}/spatial_memory/services/utility.py +0 -0
  85. {spatial_memory_mcp-1.5.3 → spatial_memory_mcp-1.6.0}/spatial_memory/tools/__init__.py +0 -0
  86. {spatial_memory_mcp-1.5.3 → spatial_memory_mcp-1.6.0}/spatial_memory/tools/definitions.py +0 -0
  87. {spatial_memory_mcp-1.5.3 → spatial_memory_mcp-1.6.0}/spatial_memory/verify.py +0 -0
  88. {spatial_memory_mcp-1.5.3 → spatial_memory_mcp-1.6.0}/stubs/hdbscan/__init__.pyi +0 -0
  89. {spatial_memory_mcp-1.5.3 → spatial_memory_mcp-1.6.0}/stubs/lancedb/__init__.pyi +0 -0
  90. {spatial_memory_mcp-1.5.3 → spatial_memory_mcp-1.6.0}/stubs/lancedb/index.pyi +0 -0
  91. {spatial_memory_mcp-1.5.3 → spatial_memory_mcp-1.6.0}/stubs/lancedb/rerankers.pyi +0 -0
  92. {spatial_memory_mcp-1.5.3 → spatial_memory_mcp-1.6.0}/stubs/lancedb/table.pyi +0 -0
  93. {spatial_memory_mcp-1.5.3 → spatial_memory_mcp-1.6.0}/stubs/mcp/__init__.pyi +0 -0
  94. {spatial_memory_mcp-1.5.3 → spatial_memory_mcp-1.6.0}/stubs/mcp/server/__init__.pyi +0 -0
  95. {spatial_memory_mcp-1.5.3 → spatial_memory_mcp-1.6.0}/stubs/mcp/server/stdio.pyi +0 -0
  96. {spatial_memory_mcp-1.5.3 → spatial_memory_mcp-1.6.0}/stubs/mcp/types.pyi +0 -0
  97. {spatial_memory_mcp-1.5.3 → spatial_memory_mcp-1.6.0}/stubs/openai/__init__.pyi +0 -0
  98. {spatial_memory_mcp-1.5.3 → spatial_memory_mcp-1.6.0}/stubs/pyarrow/__init__.pyi +0 -0
  99. {spatial_memory_mcp-1.5.3 → spatial_memory_mcp-1.6.0}/stubs/pyarrow/parquet.pyi +0 -0
  100. {spatial_memory_mcp-1.5.3 → spatial_memory_mcp-1.6.0}/stubs/sklearn/__init__.pyi +0 -0
  101. {spatial_memory_mcp-1.5.3 → spatial_memory_mcp-1.6.0}/stubs/sklearn/metrics/__init__.pyi +0 -0
  102. {spatial_memory_mcp-1.5.3 → spatial_memory_mcp-1.6.0}/stubs/umap/__init__.pyi +0 -0
  103. {spatial_memory_mcp-1.5.3 → spatial_memory_mcp-1.6.0}/tests/__init__.py +0 -0
  104. {spatial_memory_mcp-1.5.3 → spatial_memory_mcp-1.6.0}/tests/integration/__init__.py +0 -0
  105. {spatial_memory_mcp-1.5.3 → spatial_memory_mcp-1.6.0}/tests/integration/conftest.py +0 -0
  106. {spatial_memory_mcp-1.5.3 → spatial_memory_mcp-1.6.0}/tests/integration/test_backup_restore.py +0 -0
  107. {spatial_memory_mcp-1.5.3 → spatial_memory_mcp-1.6.0}/tests/integration/test_concurrent_writes.py +0 -0
  108. {spatial_memory_mcp-1.5.3 → spatial_memory_mcp-1.6.0}/tests/integration/test_database.py +0 -0
  109. {spatial_memory_mcp-1.5.3 → spatial_memory_mcp-1.6.0}/tests/integration/test_database_safeguards.py +0 -0
  110. {spatial_memory_mcp-1.5.3 → spatial_memory_mcp-1.6.0}/tests/integration/test_embeddings.py +0 -0
  111. {spatial_memory_mcp-1.5.3 → spatial_memory_mcp-1.6.0}/tests/integration/test_indexing.py +0 -0
  112. {spatial_memory_mcp-1.5.3 → spatial_memory_mcp-1.6.0}/tests/integration/test_mcp_server.py +0 -0
  113. {spatial_memory_mcp-1.5.3 → spatial_memory_mcp-1.6.0}/tests/integration/test_namespace_ops.py +0 -0
  114. {spatial_memory_mcp-1.5.3 → spatial_memory_mcp-1.6.0}/tests/integration/test_phase5_tools.py +0 -0
  115. {spatial_memory_mcp-1.5.3 → spatial_memory_mcp-1.6.0}/tests/integration/test_security_edge_cases.py +0 -0
  116. {spatial_memory_mcp-1.5.3 → spatial_memory_mcp-1.6.0}/tests/integration/test_server_v153.py +0 -0
  117. {spatial_memory_mcp-1.5.3 → spatial_memory_mcp-1.6.0}/tests/integration/test_ttl_snapshots.py +0 -0
  118. {spatial_memory_mcp-1.5.3 → spatial_memory_mcp-1.6.0}/tests/test_config.py +0 -0
  119. {spatial_memory_mcp-1.5.3 → spatial_memory_mcp-1.6.0}/tests/test_connection_pool.py +0 -0
  120. {spatial_memory_mcp-1.5.3 → spatial_memory_mcp-1.6.0}/tests/test_health.py +0 -0
  121. {spatial_memory_mcp-1.5.3 → spatial_memory_mcp-1.6.0}/tests/test_helpers.py +0 -0
  122. {spatial_memory_mcp-1.5.3 → spatial_memory_mcp-1.6.0}/tests/test_logging.py +0 -0
  123. {spatial_memory_mcp-1.5.3 → spatial_memory_mcp-1.6.0}/tests/test_metrics.py +0 -0
  124. {spatial_memory_mcp-1.5.3 → spatial_memory_mcp-1.6.0}/tests/test_models.py +0 -0
  125. {spatial_memory_mcp-1.5.3 → spatial_memory_mcp-1.6.0}/tests/test_rate_limiter.py +0 -0
  126. {spatial_memory_mcp-1.5.3 → spatial_memory_mcp-1.6.0}/tests/test_validation.py +0 -0
  127. {spatial_memory_mcp-1.5.3 → spatial_memory_mcp-1.6.0}/tests/unit/__init__.py +0 -0
  128. {spatial_memory_mcp-1.5.3 → spatial_memory_mcp-1.6.0}/tests/unit/test_cache.py +0 -0
  129. {spatial_memory_mcp-1.5.3 → spatial_memory_mcp-1.6.0}/tests/unit/test_circuit_breaker.py +0 -0
  130. {spatial_memory_mcp-1.5.3 → spatial_memory_mcp-1.6.0}/tests/unit/test_config_phase5.py +0 -0
  131. {spatial_memory_mcp-1.5.3 → spatial_memory_mcp-1.6.0}/tests/unit/test_export_import_service.py +0 -0
  132. {spatial_memory_mcp-1.5.3 → spatial_memory_mcp-1.6.0}/tests/unit/test_export_ops.py +0 -0
  133. {spatial_memory_mcp-1.5.3 → spatial_memory_mcp-1.6.0}/tests/unit/test_file_security.py +0 -0
  134. {spatial_memory_mcp-1.5.3 → spatial_memory_mcp-1.6.0}/tests/unit/test_import_ops.py +0 -0
  135. {spatial_memory_mcp-1.5.3 → spatial_memory_mcp-1.6.0}/tests/unit/test_import_security.py +0 -0
  136. {spatial_memory_mcp-1.5.3 → spatial_memory_mcp-1.6.0}/tests/unit/test_lancedb_repository_phase5.py +0 -0
  137. {spatial_memory_mcp-1.5.3 → spatial_memory_mcp-1.6.0}/tests/unit/test_lifecycle_ops.py +0 -0
  138. {spatial_memory_mcp-1.5.3 → spatial_memory_mcp-1.6.0}/tests/unit/test_models_phase5.py +0 -0
  139. {spatial_memory_mcp-1.5.3 → spatial_memory_mcp-1.6.0}/tests/unit/test_process_lock.py +0 -0
  140. {spatial_memory_mcp-1.5.3 → spatial_memory_mcp-1.6.0}/tests/unit/test_security_facade.py +0 -0
  141. {spatial_memory_mcp-1.5.3 → spatial_memory_mcp-1.6.0}/tests/unit/test_spatial_ops.py +0 -0
  142. {spatial_memory_mcp-1.5.3 → spatial_memory_mcp-1.6.0}/tests/unit/test_stats_ops.py +0 -0
  143. {spatial_memory_mcp-1.5.3 → spatial_memory_mcp-1.6.0}/tests/unit/test_tracing.py +0 -0
  144. {spatial_memory_mcp-1.5.3 → spatial_memory_mcp-1.6.0}/tests/unit/test_utility_service.py +0 -0
  145. {spatial_memory_mcp-1.5.3 → spatial_memory_mcp-1.6.0}/tests/unit/test_utils.py +0 -0
@@ -0,0 +1,302 @@
1
+ # Spatial Memory MCP - Issues Tracker
2
+
3
+ > Generated: 2026-02-01
4
+ > Status: **All Phases Complete**
5
+ > Last Updated: 2026-02-01
6
+
7
+ ---
8
+
9
+ ## Overview
10
+
11
+ This document tracks all identified issues from the comprehensive codebase review and their resolutions.
12
+
13
+ | Severity | Count | Status |
14
+ |----------|-------|--------|
15
+ | Critical | 2 | ✅ All Complete |
16
+ | High | 10 | ✅ All Complete |
17
+ | Medium | 18 | ✅ 8 Complete, 10 Backlog |
18
+ | Low | 15+ | ✅ 4 Complete, 11+ Backlog |
19
+
20
+ ### Design Decisions Made
21
+
22
+ | Decision | Choice | Rationale |
23
+ |----------|--------|-----------|
24
+ | CRIT-001 Data Safety | Add-before-delete pattern | Simpler than soft-delete, no schema change required |
25
+ | HIGH-010 Deployment | Single-machine only | Document limitation, detect and warn at startup |
26
+ | MED-SEC-001 Multi-tenant | Not a priority | Current behavior is intended for single-developer local use |
27
+
28
+ ---
29
+
30
+ ## Critical Issues
31
+
32
+ ### CRIT-001: Consolidation Data Loss Window
33
+
34
+ - **Location:** `spatial_memory/services/lifecycle.py:690-720`
35
+ - **Description:** "merge_content" strategy deletes originals before adding merged memory. If add fails (e.g., embedding timeout), originals are permanently lost.
36
+ - **Status:** ✅ COMPLETED (2026-02-01)
37
+ - **Priority:** P0
38
+
39
+ #### Solution Implemented
40
+ Add-before-delete pattern with pending status marker in metadata.
41
+
42
+ ---
43
+
44
+ ### CRIT-002: Journey N+1 Query Pattern
45
+
46
+ - **Location:** `spatial_memory/services/spatial.py:231-237`
47
+ - **Description:** For each neighbor in journey results, `_get_vector_for_memory()` hits the database. 10-step journey with 3 neighbors = 30 extra DB calls.
48
+ - **Status:** ✅ COMPLETED (2026-02-01)
49
+ - **Priority:** P0
50
+
51
+ #### Solution Implemented
52
+ Plumbed `include_vector` parameter through search pipeline.
53
+
54
+ ---
55
+
56
+ ## High Severity Issues
57
+
58
+ ### HIGH-001: Sequential DB Calls in Wander
59
+ - **Location:** `spatial_memory/services/spatial.py:331-383`
60
+ - **Description:** 2 DB calls per step (search + get_with_vector)
61
+ - **Status:** ✅ COMPLETED (2026-02-01) - Fixed as part of CRIT-002
62
+ - **Priority:** P1
63
+
64
+ ---
65
+
66
+ ### HIGH-002: O(n²) Similarity in Visualize
67
+ - **Location:** `spatial_memory/services/spatial.py:668-679`
68
+ - **Description:** 124,750 pairwise similarity calculations for 500 memories
69
+ - **Status:** ✅ COMPLETED (2026-02-02)
70
+ - **Priority:** P1
71
+
72
+ #### Solution Implemented
73
+ Replaced O(n²) loop with `scipy.spatial.distance.cdist` vectorized operation. Falls back to numpy if scipy unavailable.
74
+
75
+ ---
76
+
77
+ ### HIGH-003: Inefficient Batch Search (Sequential)
78
+ - **Location:** `spatial_memory/services/spatial.py:781-805`
79
+ - **Description:** `_batch_vector_search` iterates and calls search individually
80
+ - **Status:** ✅ COMPLETED (2026-02-02)
81
+ - **Priority:** P1
82
+
83
+ #### Solution Implemented
84
+ Implemented native LanceDB batch search at database layer using `table.search([vec1, vec2, ...])`.
85
+
86
+ ---
87
+
88
+ ### HIGH-004: Duplicate Embedding Generation in Extract
89
+ - **Location:** `spatial_memory/services/lifecycle.py:481-485, 781`
90
+ - **Description:** Embedding generated twice - once for dedup check, once for storage
91
+ - **Status:** ✅ COMPLETED (2026-02-02)
92
+ - **Priority:** P1
93
+
94
+ #### Solution Implemented
95
+ Batch embed all candidates upfront with `embed_batch()`, pass vectors through dedup check and store operations.
96
+
97
+ ---
98
+
99
+ ### HIGH-005: Sequential Updates in Decay
100
+ - **Location:** `spatial_memory/services/lifecycle.py:276-283`
101
+ - **Description:** 500 individual writes instead of batch update
102
+ - **Status:** ✅ COMPLETED (2026-02-02)
103
+ - **Priority:** P1
104
+
105
+ #### Solution Implemented
106
+ Added `update_batch()` method returning `(success_count, failed_ids)` tuple.
107
+
108
+ ---
109
+
110
+ ### HIGH-006: Sequential Fetches in Reinforce
111
+ - **Location:** `spatial_memory/services/lifecycle.py:348-387`
112
+ - **Description:** 2 DB calls per memory (get + update)
113
+ - **Status:** ✅ COMPLETED (2026-02-02)
114
+ - **Priority:** P1
115
+
116
+ #### Solution Implemented
117
+ Added `get_batch()` method returning `{id: Memory}` dict. Combined with `update_batch()` for 2 calls total.
118
+
119
+ ---
120
+
121
+ ### HIGH-007: Batch Insert NOT Atomic
122
+ - **Location:** `spatial_memory/core/database.py:1350`
123
+ - **Description:** Partial failures leave orphaned records
124
+ - **Status:** ✅ COMPLETED (2026-02-02)
125
+ - **Priority:** P1
126
+
127
+ #### Solution Implemented
128
+ Added `PartialBatchInsertError` with `succeeded_ids` for recovery. Added `atomic=True` parameter to `insert_batch()` with rollback capability.
129
+
130
+ ---
131
+
132
+ ### HIGH-008: rename_namespace Lacks Rollback
133
+ - **Location:** `spatial_memory/core/database.py:1684-1736`
134
+ - **Description:** Partial renames leave namespace in mixed state
135
+ - **Status:** ✅ COMPLETED (2026-02-02)
136
+ - **Priority:** P1
137
+
138
+ #### Solution Implemented
139
+ Track renamed IDs during operation. On failure, `_rollback_namespace_rename()` reverts records to original namespace.
140
+
141
+ ---
142
+
143
+ ### HIGH-009: Consolidation Loads Entire Namespace
144
+ - **Location:** `spatial_memory/services/lifecycle.py:573-577`
145
+ - **Description:** Memory exhaustion risk for large namespaces
146
+ - **Status:** ✅ COMPLETED (2026-02-02)
147
+ - **Priority:** P1
148
+
149
+ #### Solution Implemented
150
+ Added `_consolidate_chunked()` for streaming consolidation with configurable `consolidate_chunk_size` (default: 200).
151
+
152
+ ---
153
+
154
+ ### HIGH-010: File Lock Doesn't Work on NFS/SMB
155
+ - **Location:** `spatial_memory/core/database.py:239-388`
156
+ - **Description:** Data corruption risk in shared filesystem
157
+ - **Status:** ✅ COMPLETED (2026-02-01)
158
+ - **Priority:** P1
159
+
160
+ #### Solution Implemented
161
+ Added `core/filesystem.py` with detection. Startup warning if NFS/SMB detected. Config `acknowledge_network_filesystem_risk` to suppress.
162
+
163
+ ---
164
+
165
+ ## Medium Severity Issues
166
+
167
+ ### Security
168
+
169
+ | ID | Issue | Location | Status | Notes |
170
+ |----|-------|----------|--------|-------|
171
+ | MED-SEC-001 | No namespace-level authorization | server.py | Closed - By Design | Single-developer local use is intended |
172
+ | MED-SEC-002 | Memory exhaustion in JSON/CSV export | export_import.py:616-695 | ✅ COMPLETED (2026-02-01) | Streaming export implemented |
173
+
174
+ ### Code Quality
175
+
176
+ | ID | Issue | Location | Status |
177
+ |----|-------|----------|--------|
178
+ | MED-CQ-001 | forget_batch returns incorrect IDs | memory.py:407-412 | ✅ COMPLETED (2026-02-01) |
179
+ | MED-CQ-002 | Missing backend in EmbeddingServiceProtocol | ports/repositories.py:543-581 | ✅ COMPLETED (2026-02-01) |
180
+ | MED-CQ-003 | Rate limiter token consumption issue | rate_limiter.py:213-227 | ✅ COMPLETED (2026-02-01) |
181
+ | MED-CQ-004 | Embedding cache leak in batch operations | embeddings.py:211-214 | ✅ COMPLETED (2026-02-01) |
182
+
183
+ ### Database
184
+
185
+ | ID | Issue | Location | Status |
186
+ |----|-------|----------|--------|
187
+ | MED-DB-001 | Idempotency table missing index | database.py:3073-3081 | ✅ COMPLETED (2026-02-01) |
188
+ | MED-DB-002 | get_namespaces() loads all values | database.py:2676 | ✅ CLOSED (Acceptable - TTL caching sufficient) |
189
+ | MED-DB-003 | get_namespace_stats() loads all records | database.py:1839-1845 | ✅ COMPLETED (2026-02-01) |
190
+ | MED-DB-004 | Vector dimension not validated at insert | database.py:1267-1336 | ✅ COMPLETED (2026-02-01) |
191
+ | MED-DB-005 | No migration system | Project-wide | Backlog |
192
+
193
+ ### Architecture
194
+
195
+ | ID | Issue | Location | Status |
196
+ |----|-------|----------|--------|
197
+ | MED-ARCH-001 | LifecycleService.consolidate complexity | lifecycle.py:520-752 | Backlog |
198
+ | MED-ARCH-002 | SpatialMemoryServer.__init__ complexity | server.py:140-345 | Backlog |
199
+ | MED-ARCH-003 | Tool handlers return untyped dicts | server.py:469-1012 | Backlog |
200
+ | MED-ARCH-004 | Synchronous embedding in async context | server.py:355-423 | Backlog |
201
+
202
+ ---
203
+
204
+ ## Low Severity Issues
205
+
206
+ | ID | Issue | Location | Status |
207
+ |----|-------|----------|--------|
208
+ | LOW-001 | Hardcoded embedding cache size (1000) | embeddings.py | ✅ COMPLETED (2026-02-01) |
209
+ | LOW-002 | Inconsistent datetime handling | lifecycle.py | ✅ COMPLETED |
210
+ | LOW-003 | Magic numbers in retry logic | database.py | ✅ COMPLETED (2026-02-01) |
211
+ | LOW-004 | Missing validation for index_type | config.py | ✅ COMPLETED |
212
+ | LOW-005 | Duplicate local imports | lancedb_repository.py | ✅ CLOSED (False Positive) |
213
+ | LOW-006 | validate_namespace docstring mismatch | validation.py | ✅ COMPLETED |
214
+ | LOW-007 | Test mocks return non-normalized vectors | conftest.py | ✅ COMPLETED |
215
+ | LOW-008 | Memory content not validated for injection | validation.py | ✅ COMPLETED (Documented as by-design) |
216
+ | LOW-009 | Metadata values not deeply validated | validation.py | ✅ COMPLETED |
217
+ | LOW-010 | Exception messages may leak paths | Various | ✅ COMPLETED |
218
+ | LOW-011 | Connection pool never validates health | connection_pool.py | ✅ COMPLETED |
219
+ | LOW-012 | Database.close() doesn't remove from pool | database.py | ✅ COMPLETED |
220
+ | LOW-013 | No automatic compaction scheduling | database.py | ✅ COMPLETED |
221
+ | LOW-014 | Stop words set recreated per call | spatial.py | ✅ COMPLETED (2026-02-01) |
222
+ | LOW-015 | MD5 for cache keys | embeddings.py | ✅ COMPLETED (2026-02-01) |
223
+
224
+ ---
225
+
226
+ ## Implementation Phases
227
+
228
+ ### Phase 1: Critical Issues + Quick Wins ✅ COMPLETE
229
+ **Completed:** 2026-02-01
230
+ **Issues:** CRIT-001, CRIT-002, HIGH-010
231
+
232
+ ### Phase 2: Batch Operations Infrastructure ✅ COMPLETE
233
+ **Completed:** 2026-02-02
234
+ **Issues:** HIGH-001, HIGH-003, HIGH-005, HIGH-006
235
+
236
+ ### Phase 3: Remaining High Severity ✅ COMPLETE
237
+ **Completed:** 2026-02-02
238
+ **Issues:** HIGH-002, HIGH-004, HIGH-007, HIGH-008, HIGH-009
239
+
240
+ ### Phase 4: Medium Severity ✅ COMPLETE
241
+ **Completed:** 2026-02-01
242
+ **Issues:** MED-SEC-002, MED-CQ-001-004, MED-DB-001, MED-DB-003, MED-DB-004
243
+
244
+ ### Phase 5: Low Severity ✅ COMPLETE
245
+ **Completed:** 2026-02-01
246
+ **Issues:** LOW-001, LOW-003, LOW-014, LOW-015
247
+
248
+ ---
249
+
250
+ ## Summary
251
+
252
+ **All Critical, High, and most Low severity issues have been resolved.**
253
+
254
+ | Category | Resolved | Backlog |
255
+ |----------|----------|---------|
256
+ | Critical | 2/2 | 0 |
257
+ | High | 10/10 | 0 |
258
+ | Medium | 8/18 | 8 (architecture items) |
259
+ | Low | 15/15 | 0 |
260
+
261
+ Remaining backlog items are Medium severity architectural improvements (refactoring, migration system) that don't affect functionality or data integrity.
262
+
263
+ ---
264
+
265
+ ## Change Log
266
+
267
+ | Date | Issue | Change | Author |
268
+ |------|-------|--------|--------|
269
+ | 2026-02-01 | All | Initial tracking document created | Claude |
270
+ | 2026-02-01 | All | Solution plans added for Critical and High severity | Claude |
271
+ | 2026-02-01 | MED-SEC-001 | Closed as "By Design" - single-developer local use | Claude |
272
+ | 2026-02-01 | HIGH-010 | Decision: Single-machine only with detection/warning | User |
273
+ | 2026-02-01 | CRIT-001 | Decision: Add-before-delete pattern | User |
274
+ | 2026-02-01 | CRIT-001 | ✅ Implemented add-before-delete pattern in consolidation | Claude |
275
+ | 2026-02-01 | CRIT-002 | ✅ Plumbed include_vector through search pipeline (also fixes HIGH-001) | Claude |
276
+ | 2026-02-01 | HIGH-010 | ✅ Added NFS/SMB detection and warning at startup | Claude |
277
+ | 2026-02-02 | Phase 2 | ✅ Implemented batch operations: get_batch, update_batch, batch_vector_search | Claude |
278
+ | 2026-02-02 | Phase 3 | ✅ Implemented scipy.cdist, batch embedding, atomic insert, namespace rollback, streaming consolidation | Claude |
279
+ | 2026-02-01 | Phase 4 | ✅ Implemented MED-SEC-002, MED-CQ-001-004, MED-DB-001, MED-DB-003, MED-DB-004 | Claude |
280
+ | 2026-02-01 | Phase 5 | ✅ Implemented LOW-001, LOW-003, LOW-014, LOW-015 | Claude |
281
+ | 2026-02-01 | All | **All phases complete** - 1360 tests passing | Claude |
282
+ | 2026-02-01 | Phase A-C Backlog | ✅ Implemented remaining Low severity issues: | Claude |
283
+ | | LOW-002 | Standardized datetime handling in lifecycle.py | |
284
+ | | LOW-004 | Added Literal type validation for index_type | |
285
+ | | LOW-005 | Closed as FALSE POSITIVE (intentional circular import avoidance) | |
286
+ | | LOW-006 | Fixed validate_namespace docstring | |
287
+ | | LOW-007 | Normalized mock embedding vectors in conftest.py | |
288
+ | | LOW-008 | Documented content validation security approach | |
289
+ | | LOW-009 | Added metadata depth validation | |
290
+ | | LOW-010 | Sanitized paths in error messages | |
291
+ | | LOW-011 | Added proactive connection health check | |
292
+ | | LOW-012 | Fixed close() to remove from pool | |
293
+ | | LOW-013 | Implemented auto-compaction | |
294
+ | | MED-DB-002 | Closed as ACCEPTABLE (TTL caching sufficient) | |
295
+
296
+ ---
297
+
298
+ ## References
299
+
300
+ - [LanceDB Batch Search Documentation](https://docs.lancedb.com/search/vector-search)
301
+ - [LanceDB merge_insert API](https://lancedb.github.io/lancedb/python/python/)
302
+ - Code Review Report: Saved to spatial-memory namespace (memory ID: 55cd072b-8bc6-4426-a80b-fa07edaee7e7)
@@ -0,0 +1,246 @@
1
+ # Spatial Memory MCP
2
+
3
+ ## Knowledge as a Navigable Landscape, Not a Filing Cabinet
4
+
5
+ **The first semantic memory system designed for how LLMs actually think.**
6
+
7
+ ---
8
+
9
+ ## The Problem with Memory Today
10
+
11
+ Every AI memory solution asks the same question: "How do we store things so we can find them later?"
12
+
13
+ Wrong question.
14
+
15
+ The right question is: "How do we give AI systems memory that works like memory—with forgetting, reinforcement, association, and discovery?"
16
+
17
+ Spatial Memory MCP answers that question.
18
+
19
+ ---
20
+
21
+ ## Zero Cognitive Load: Memory That Just Works
22
+
23
+ Most memory systems require developers to explicitly manage storage, retrieval, and organization. Spatial Memory MCP takes a radically different approach.
24
+
25
+ **You never think about memory. Claude handles everything automatically.**
26
+
27
+ Here's how it works:
28
+
29
+ 1. **Automatic Context Loading** — Claude loads relevant memories at session start. No initialization code. No explicit queries.
30
+
31
+ 2. **Intelligent Recognition** — Claude recognizes memory-worthy moments in conversation and asks simply: "Save this decision? y/n"
32
+
33
+ 3. **Natural Synthesis** — When you ask about past context, Claude synthesizes answers naturally. No raw JSON. No memory IDs. Just knowledge.
34
+
35
+ 4. **MCP Instructions Injection** — Memory behaviors are injected directly into Claude's system prompt. Zero configuration required.
36
+
37
+ The result? Developers interact with an AI that genuinely remembers—without writing a single line of memory management code.
38
+
39
+ ---
40
+
41
+ ## This Is Not Storage. This Is Cognitive Architecture.
42
+
43
+ Traditional vector databases store embeddings. Spatial Memory MCP implements a cognitive memory model inspired by human memory research.
44
+
45
+ ### Memory Decay (Ebbinghaus Forgetting Curve)
46
+ Memories fade over time if not accessed—just like human memory. Choose exponential, linear, or step decay functions. Set half-life periods. Define importance floors. Memories that matter persist. Memories that don't, gracefully fade.
47
+
48
+ ### Reinforcement Learning
49
+ Memories grow stronger through use. Every access, every retrieval, every reference boosts importance scores. Frequently needed knowledge rises to the surface. Additive, multiplicative, or explicit value boosts—you control the reinforcement dynamics.
50
+
51
+ ### Consolidation
52
+ Similar memories merge intelligently. Four strategies available:
53
+ - **keep_newest** — Preserve recent knowledge
54
+ - **keep_oldest** — Maintain original context
55
+ - **keep_highest_importance** — Prioritize what matters
56
+ - **merge_content** — Synthesize into unified memories
57
+
58
+ ### Auto-Extraction
59
+ Point the system at a conversation transcript. It extracts facts, decisions, and key information automatically. Pattern matching identifies what's worth remembering. Deduplication prevents redundancy.
60
+
61
+ ---
62
+
63
+ ## Spatial Navigation: The Innovation That Changes Everything
64
+
65
+ Here's what makes Spatial Memory MCP fundamentally different: **knowledge exists in semantic space, and you can navigate it.**
66
+
67
+ ### Journey (SLERP Interpolation)
68
+ Navigate between two memories using spherical interpolation. Discover what's conceptually *between* them. Start with "machine learning basics" and end with "production deployment"—Journey reveals the learning path: feature engineering, model validation, containerization, monitoring.
69
+
70
+ ### Wander (Temperature-Based Random Walk)
71
+ Serendipitous exploration through memory space. Low temperature: focused, related concepts. High temperature: unexpected connections. Set a starting point or start anywhere. Let the system surprise you with what it finds.
72
+
73
+ ### Regions (HDBSCAN Clustering)
74
+ Automatic topic discovery without predefined labels. The system identifies natural clusters in your knowledge base. Returns representative memories and auto-generated keywords for each region. See how your knowledge self-organizes.
75
+
76
+ ### Visualize (UMAP Projection)
77
+ Project your memories into 2D or 3D space. Export as JSON, Mermaid diagrams, or SVG. See your knowledge landscape. Identify gaps. Understand relationships.
78
+
79
+ **No other memory system offers this.** Competitors give you search. We give you exploration.
80
+
81
+ ---
82
+
83
+ ## 21 Tools. Complete Lifecycle Management.
84
+
85
+ | Category | Spatial Memory MCP | Typical Competitor |
86
+ |----------|-------------------|-------------------|
87
+ | Core Operations | remember, recall, forget, nearby | 3-4 tools |
88
+ | Batch Operations | remember_batch, forget_batch | None |
89
+ | Spatial Navigation | journey, wander, regions, visualize | None |
90
+ | Lifecycle Management | decay, reinforce, consolidate, extract | None |
91
+ | Hybrid Search | hybrid_recall with tunable alpha | Single mode |
92
+ | Namespace Management | namespaces, delete_namespace, rename_namespace | Basic or none |
93
+ | Data Portability | export_memories, import_memories | None |
94
+ | Administration | stats, health | Minimal |
95
+
96
+ **21 production-ready tools** covering the complete memory lifecycle—from ingestion to navigation to maintenance to export.
97
+
98
+ ---
99
+
100
+ ## Hybrid Search: The Best of Both Worlds
101
+
102
+ Semantic search finds conceptually similar content. Keyword search finds exact matches. Why choose?
103
+
104
+ **Spatial Memory MCP's hybrid_recall** combines both with a tunable alpha parameter:
105
+
106
+ - `alpha = 1.0` — Pure semantic search
107
+ - `alpha = 0.5` — Balanced hybrid
108
+ - `alpha = 0.0` — Pure keyword search
109
+
110
+ Search for "authentication error handling" and find both semantically related security discussions AND exact keyword matches in error logs. One query. Complete results.
111
+
112
+ ---
113
+
114
+ ## Enterprise-Grade Infrastructure
115
+
116
+ Production deployment demands production infrastructure.
117
+
118
+ ### Connection Management
119
+ - **Connection pooling** with LRU eviction
120
+ - **Cross-process file locking** for multi-instance safety
121
+ - **Circuit breaker pattern** prevents cascade failures
122
+
123
+ ### Observability
124
+ - **Request tracing** with correlation IDs
125
+ - **Per-agent rate limiting** using token bucket algorithm
126
+ - **Response caching** with configurable TTL
127
+ - **Health endpoints** with detailed diagnostics
128
+
129
+ ### Security
130
+ - **Path traversal prevention** — No filesystem escapes
131
+ - **SQL injection detection** — 15+ attack patterns blocked
132
+ - **Input validation** — Pydantic models throughout
133
+ - **Credential masking** — Sensitive data never logged
134
+ - **Dry-run modes** — Preview destructive operations safely
135
+
136
+ ---
137
+
138
+ ## Performance by Default
139
+
140
+ ### ONNX Runtime
141
+ 2.75x faster than PyTorch. 60% less memory. No GPU required. CPU inference that actually performs.
142
+
143
+ ### Intelligent Indexing
144
+ Auto-indexing triggers at 10K+ memories using IVF_PQ. Sub-linear search complexity at scale. Configurable thresholds for your workload.
145
+
146
+ ### Efficient Defaults
147
+ - **all-MiniLM-L6-v2** embedding model (~80MB)
148
+ - Fast inference, quality embeddings
149
+ - Batch operations for bulk ingestion
150
+ - Connection pooling eliminates overhead
151
+
152
+ ---
153
+
154
+ ## Competitor Landscape
155
+
156
+ | Feature | Spatial Memory MCP | mcp-mem0 | mcp-memory-service | Memory Bank MCP |
157
+ |---------|-------------------|----------|-------------------|-----------------|
158
+ | Total Tools | 21 | 3 | ~6 | ~5 |
159
+ | Spatial Navigation | Yes | No | No | No |
160
+ | Memory Decay | Yes | No | No | No |
161
+ | Reinforcement | Yes | No | No | No |
162
+ | Hybrid Search | Yes | No | Partial | No |
163
+ | Batch Operations | Yes | No | No | No |
164
+ | HDBSCAN Clustering | Yes | No | No | No |
165
+ | SLERP Interpolation | Yes | No | No | No |
166
+ | Visualization | Yes | No | No | No |
167
+ | Enterprise Features | Full Suite | Minimal | Basic | Basic |
168
+ | External Dependencies | SQLite only | PostgreSQL | Varies | File-based |
169
+ | Test Coverage | 1,094 tests | Minimal | Unknown | Unknown |
170
+
171
+ **mcp-mem0**: 3 tools, 4 commits, requires PostgreSQL infrastructure.
172
+
173
+ **mcp-memory-service**: No spatial navigation, no lifecycle management, limited cognitive features.
174
+
175
+ **Memory Bank MCP**: Go-based, no cognitive memory model, basic CRUD operations.
176
+
177
+ **basic-memory**: No vector search, file-based limitations, no semantic understanding.
178
+
179
+ ---
180
+
181
+ ## Use Cases
182
+
183
+ ### Development Teams
184
+ Maintain architectural decisions across sessions. Remember why you chose that database, that API design, that authentication pattern. Never repeat the same discussion. Never lose hard-won context.
185
+
186
+ ### AI Agents
187
+ Long-running agents that learn and adapt. Remember user preferences. Track conversation history. Build genuine relationships through persistent, intelligent memory.
188
+
189
+ ### Knowledge Management
190
+ Transform organizational knowledge into a navigable landscape. Let teams explore connections they didn't know existed. Surface relevant context automatically.
191
+
192
+ ### Research and Analysis
193
+ Navigate between concepts. Discover intermediate ideas. Visualize knowledge structures. Enable serendipitous discovery that filing systems can never provide.
194
+
195
+ ---
196
+
197
+ ## Technical Specifications
198
+
199
+ - **Language**: Python 3.10+
200
+ - **Database**: SQLite with LanceDB for vectors
201
+ - **Embedding**: ONNX Runtime with all-MiniLM-L6-v2
202
+ - **Clustering**: HDBSCAN
203
+ - **Projection**: UMAP
204
+ - **Interpolation**: SLERP (Spherical Linear Interpolation)
205
+ - **Architecture**: Clean architecture with dependency injection
206
+ - **Type Safety**: Full type hints, mypy strict mode
207
+ - **Test Suite**: 1,094 passing tests
208
+ - **Development**: 5 completed phases
209
+
210
+ ---
211
+
212
+ ## Getting Started
213
+
214
+ ```bash
215
+ # Install
216
+ pip install spatial-memory-mcp
217
+
218
+ # Or with UV
219
+ uv pip install spatial-memory-mcp
220
+ ```
221
+
222
+ Configure in Claude Desktop's MCP settings. The system injects its instructions automatically. Start a conversation. Claude remembers.
223
+
224
+ No initialization code. No explicit memory calls. No cognitive overhead.
225
+
226
+ **Just memory that works like memory should.**
227
+
228
+ ---
229
+
230
+ ## The Bottom Line
231
+
232
+ Most AI memory systems are databases with an API. Spatial Memory MCP is a cognitive architecture.
233
+
234
+ It decays. It reinforces. It consolidates. It discovers.
235
+
236
+ It treats knowledge as a navigable landscape—not a filing cabinet.
237
+
238
+ And it does all of this with zero cognitive load on developers. Claude handles memory. You handle what matters.
239
+
240
+ ---
241
+
242
+ **Spatial Memory MCP**
243
+
244
+ *Knowledge as a navigable landscape, not a filing cabinet.*
245
+
246
+ [GitHub Repository](https://github.com/arman-tech/spatial-memory-mcp) | [Documentation](https://github.com/arman-tech/spatial-memory-mcp#readme) | [PyPI](https://pypi.org/project/spatial-memory-mcp/)
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.4
2
2
  Name: spatial-memory-mcp
3
- Version: 1.5.3
3
+ Version: 1.6.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
@@ -44,7 +44,7 @@ Description-Content-Type: text/markdown
44
44
 
45
45
  A vector-based spatial memory system that treats knowledge as a navigable landscape, not a filing cabinet.
46
46
 
47
- > **Project Status**: All phases complete. Production-ready with 1094 tests passing.
47
+ > **Project Status**: All phases complete. Production-ready with 1360 tests passing.
48
48
 
49
49
  ## Supported Platforms
50
50
 
@@ -63,6 +63,42 @@ Spatial Memory MCP Server provides persistent, semantic memory for LLMs through
63
63
  - **Visual Understanding**: Generate Mermaid/SVG/JSON visualizations of your knowledge space
64
64
  - **Hybrid Search**: Combine vector similarity with full-text search
65
65
 
66
+ ## Why Spatial Memory?
67
+
68
+ ### Zero Cognitive Load
69
+ **You never think about memory. Claude handles everything automatically.**
70
+
71
+ - Auto-loads relevant context at session start
72
+ - Recognizes memory-worthy moments and asks "Save this? y/n"
73
+ - Synthesizes answers naturally—no raw JSON, no memory IDs
74
+ - MCP instructions inject automatically—zero configuration
75
+
76
+ ### Cognitive Architecture, Not Storage
77
+ Other memory systems store embeddings. Spatial Memory implements how memory actually works:
78
+
79
+ - **Decay**: Memories fade over time (Ebbinghaus forgetting curve)
80
+ - **Reinforcement**: Frequently accessed memories grow stronger
81
+ - **Consolidation**: Similar memories merge intelligently
82
+ - **Extraction**: Auto-capture facts, decisions, patterns from conversations
83
+
84
+ ### Spatial Navigation (Unique Innovation)
85
+ Navigate knowledge like a landscape, not a filing cabinet:
86
+
87
+ | Tool | What It Does |
88
+ |------|-------------|
89
+ | **Journey** | SLERP between two memories—discover what's conceptually in between |
90
+ | **Wander** | Random walk exploration—find unexpected connections |
91
+ | **Regions** | HDBSCAN clustering—see how your knowledge self-organizes |
92
+ | **Visualize** | UMAP projection—view your memory space in 2D/3D |
93
+
94
+ ### 21 Tools vs. 3-6 in Competitors
95
+ Full lifecycle management: core operations, spatial navigation, memory lifecycle, hybrid search, namespace management, data import/export, and health/stats monitoring.
96
+
97
+ ### Enterprise-Ready
98
+ Connection pooling, circuit breakers, per-agent rate limiting, request tracing, response caching, and defense-in-depth security (path traversal prevention, SQL injection detection, input validation).
99
+
100
+ > *See [MARKETING.md](MARKETING.md) for the complete comparison with competitors.*
101
+
66
102
  ## Features
67
103
 
68
104
  - **21 MCP tools** across 4 categories (core, spatial, lifecycle, utility)
@@ -72,7 +108,7 @@ Spatial Memory MCP Server provides persistent, semantic memory for LLMs through
72
108
  - **ONNX Runtime** by default for 2-3x faster embeddings
73
109
  - **Enterprise features**: Connection pooling, retry logic, batch operations
74
110
  - **Comprehensive security**: Path validation, SQL injection prevention, input sanitization
75
- - **1094 tests** including security edge cases
111
+ - **1360 tests** including security edge cases
76
112
 
77
113
  ## Roadmap
78
114
 
@@ -130,6 +166,31 @@ If ONNX shows as unavailable, reinstall with:
130
166
  pip install --force-reinstall "sentence-transformers[onnx]"
131
167
  ```
132
168
 
169
+ ### Optional Performance Dependencies
170
+
171
+ For best performance, install these optional dependencies:
172
+
173
+ ```bash
174
+ # ONNX Runtime - 2-3x faster embeddings, 60% less memory
175
+ pip install onnxruntime
176
+
177
+ # Or install with sentence-transformers ONNX support
178
+ pip install "sentence-transformers[onnx]"
179
+
180
+ # scipy - Optimized pairwise similarity calculations
181
+ # Used by visualize, regions, and consolidate operations
182
+ pip install scipy
183
+ ```
184
+
185
+ **Performance comparison:**
186
+
187
+ | Component | Without | With | Benefit |
188
+ |-----------|---------|------|---------|
189
+ | ONNX Runtime | PyTorch inference | ONNX inference | 2-3x faster embeddings |
190
+ | scipy | numpy matrix ops | scipy.cdist | Faster similarity calculations |
191
+
192
+ Both are optional - the system includes fallbacks that use numpy when these aren't available.
193
+
133
194
  ## Configuration
134
195
 
135
196
  Copy `.env.example` to `.env` and customize:
@@ -292,6 +353,25 @@ Export all memories to parquet format
292
353
  - **Error Sanitization**: Internal errors return reference IDs, not stack traces
293
354
  - **Secure Credential Handling**: API keys stored as SecretStr
294
355
 
356
+ ## Deployment Considerations
357
+
358
+ ### Network Filesystems (NFS/SMB/CIFS)
359
+
360
+ Spatial Memory uses file-based locking to prevent data corruption when multiple processes access the same storage. **File locking does not work reliably on network filesystems** such as NFS, SMB/CIFS, or SSHFS.
361
+
362
+ If the storage path is on a network filesystem, you will see a warning at startup:
363
+
364
+ ```
365
+ WARNING: Storage path appears to be on a network filesystem (nfs).
366
+ File-based locking does not work reliably on network filesystems.
367
+ Running multiple instances against this storage may cause data corruption.
368
+ ```
369
+
370
+ **Recommendations:**
371
+ 1. **Use local storage** (default: `./.spatial-memory`) for reliable operation
372
+ 2. **Single instance only**: If you must use network storage, ensure only one MCP server instance accesses it
373
+ 3. **Acknowledge the risk**: Set `SPATIAL_MEMORY_ACKNOWLEDGE_NETWORK_FS_RISK=true` to suppress the warning
374
+
295
375
  ## Development
296
376
 
297
377
  ### Running Tests