spatial-memory-mcp 1.6.0__tar.gz → 1.6.2__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.
- spatial_memory_mcp-1.6.2/CHANGELOG.md +158 -0
- spatial_memory_mcp-1.6.2/CLAUDE.md +102 -0
- {spatial_memory_mcp-1.6.0 → spatial_memory_mcp-1.6.2}/ISSUES-TRACKER.md +3 -2
- {spatial_memory_mcp-1.6.0 → spatial_memory_mcp-1.6.2}/MARKETING.md +30 -11
- {spatial_memory_mcp-1.6.0 → spatial_memory_mcp-1.6.2}/PKG-INFO +51 -9
- {spatial_memory_mcp-1.6.0 → spatial_memory_mcp-1.6.2}/README.md +50 -8
- spatial_memory_mcp-1.6.2/docs/TECHNICAL_HIGHLIGHTS.md +803 -0
- {spatial_memory_mcp-1.6.0 → spatial_memory_mcp-1.6.2}/pyproject.toml +1 -1
- {spatial_memory_mcp-1.6.0 → spatial_memory_mcp-1.6.2}/spatial_memory/__init__.py +1 -1
- {spatial_memory_mcp-1.6.0 → spatial_memory_mcp-1.6.2}/spatial_memory/__main__.py +21 -4
- {spatial_memory_mcp-1.6.0 → spatial_memory_mcp-1.6.2}/spatial_memory/config.py +1 -1
- {spatial_memory_mcp-1.6.0 → spatial_memory_mcp-1.6.2}/spatial_memory/core/__init__.py +2 -2
- {spatial_memory_mcp-1.6.0 → spatial_memory_mcp-1.6.2}/spatial_memory/core/consolidation_strategies.py +0 -1
- {spatial_memory_mcp-1.6.0 → spatial_memory_mcp-1.6.2}/spatial_memory/core/database.py +14 -11
- {spatial_memory_mcp-1.6.0 → spatial_memory_mcp-1.6.2}/spatial_memory/core/db_indexes.py +2 -1
- {spatial_memory_mcp-1.6.0 → spatial_memory_mcp-1.6.2}/spatial_memory/core/db_migrations.py +0 -1
- {spatial_memory_mcp-1.6.0 → spatial_memory_mcp-1.6.2}/spatial_memory/core/db_search.py +4 -1
- {spatial_memory_mcp-1.6.0 → spatial_memory_mcp-1.6.2}/spatial_memory/core/embeddings.py +2 -2
- {spatial_memory_mcp-1.6.0 → spatial_memory_mcp-1.6.2}/spatial_memory/core/file_security.py +0 -1
- {spatial_memory_mcp-1.6.0 → spatial_memory_mcp-1.6.2}/spatial_memory/core/response_types.py +0 -1
- {spatial_memory_mcp-1.6.0 → spatial_memory_mcp-1.6.2}/spatial_memory/ports/repositories.py +0 -1
- {spatial_memory_mcp-1.6.0 → spatial_memory_mcp-1.6.2}/spatial_memory/server.py +13 -9
- {spatial_memory_mcp-1.6.0 → spatial_memory_mcp-1.6.2}/spatial_memory/services/__init__.py +3 -3
- {spatial_memory_mcp-1.6.0 → spatial_memory_mcp-1.6.2}/spatial_memory/services/export_import.py +10 -8
- {spatial_memory_mcp-1.6.0 → spatial_memory_mcp-1.6.2}/spatial_memory/services/lifecycle.py +11 -8
- {spatial_memory_mcp-1.6.0 → spatial_memory_mcp-1.6.2}/spatial_memory/services/spatial.py +5 -2
- {spatial_memory_mcp-1.6.0 → spatial_memory_mcp-1.6.2}/spatial_memory/services/utility.py +5 -3
- spatial_memory_mcp-1.6.0/CHANGELOG.md +0 -69
- spatial_memory_mcp-1.6.0/CLAUDE.md +0 -34
- {spatial_memory_mcp-1.6.0 → spatial_memory_mcp-1.6.2}/.env.example +0 -0
- {spatial_memory_mcp-1.6.0 → spatial_memory_mcp-1.6.2}/.gitignore +0 -0
- {spatial_memory_mcp-1.6.0 → spatial_memory_mcp-1.6.2}/CONTRIBUTING.md +0 -0
- {spatial_memory_mcp-1.6.0 → spatial_memory_mcp-1.6.2}/LICENSE +0 -0
- {spatial_memory_mcp-1.6.0 → spatial_memory_mcp-1.6.2}/LIFECYCLE_PHASE_PLAN.md +0 -0
- {spatial_memory_mcp-1.6.0 → spatial_memory_mcp-1.6.2}/PHASE4B_PLAN.md +0 -0
- {spatial_memory_mcp-1.6.0 → spatial_memory_mcp-1.6.2}/PHASE4_PLAN.md +0 -0
- {spatial_memory_mcp-1.6.0 → spatial_memory_mcp-1.6.2}/PHASE5_UTILITIES_PLAN.md +0 -0
- {spatial_memory_mcp-1.6.0 → spatial_memory_mcp-1.6.2}/SECURITY.md +0 -0
- {spatial_memory_mcp-1.6.0 → spatial_memory_mcp-1.6.2}/SPATIAL-MEMORY-ARCHITECTURE-DIAGRAMS.md +0 -0
- {spatial_memory_mcp-1.6.0 → spatial_memory_mcp-1.6.2}/SPATIAL-MEMORY-MCP-SERVER-PLAN (1).md +0 -0
- {spatial_memory_mcp-1.6.0 → spatial_memory_mcp-1.6.2}/docs/API.md +0 -0
- {spatial_memory_mcp-1.6.0 → spatial_memory_mcp-1.6.2}/docs/BENCHMARKS.md +0 -0
- {spatial_memory_mcp-1.6.0 → spatial_memory_mcp-1.6.2}/docs/MCP_SERVER_INSTRUCTIONS.md +0 -0
- {spatial_memory_mcp-1.6.0 → spatial_memory_mcp-1.6.2}/docs/METRICS.md +0 -0
- {spatial_memory_mcp-1.6.0 → spatial_memory_mcp-1.6.2}/docs/troubleshooting.md +0 -0
- {spatial_memory_mcp-1.6.0 → spatial_memory_mcp-1.6.2}/examples/demo_config_logging.py +0 -0
- {spatial_memory_mcp-1.6.0 → spatial_memory_mcp-1.6.2}/scripts/benchmark.py +0 -0
- {spatial_memory_mcp-1.6.0 → spatial_memory_mcp-1.6.2}/scripts/inspect_db.py +0 -0
- {spatial_memory_mcp-1.6.0 → spatial_memory_mcp-1.6.2}/scripts/populate_test_data.py +0 -0
- {spatial_memory_mcp-1.6.0 → spatial_memory_mcp-1.6.2}/scripts/test_all_tools.py +0 -0
- {spatial_memory_mcp-1.6.0 → spatial_memory_mcp-1.6.2}/spatial_memory/adapters/__init__.py +0 -0
- {spatial_memory_mcp-1.6.0 → spatial_memory_mcp-1.6.2}/spatial_memory/adapters/lancedb_repository.py +0 -0
- {spatial_memory_mcp-1.6.0 → spatial_memory_mcp-1.6.2}/spatial_memory/core/cache.py +0 -0
- {spatial_memory_mcp-1.6.0 → spatial_memory_mcp-1.6.2}/spatial_memory/core/circuit_breaker.py +0 -0
- {spatial_memory_mcp-1.6.0 → spatial_memory_mcp-1.6.2}/spatial_memory/core/connection_pool.py +0 -0
- {spatial_memory_mcp-1.6.0 → spatial_memory_mcp-1.6.2}/spatial_memory/core/db_idempotency.py +0 -0
- {spatial_memory_mcp-1.6.0 → spatial_memory_mcp-1.6.2}/spatial_memory/core/db_versioning.py +0 -0
- {spatial_memory_mcp-1.6.0 → spatial_memory_mcp-1.6.2}/spatial_memory/core/errors.py +0 -0
- {spatial_memory_mcp-1.6.0 → spatial_memory_mcp-1.6.2}/spatial_memory/core/filesystem.py +0 -0
- {spatial_memory_mcp-1.6.0 → spatial_memory_mcp-1.6.2}/spatial_memory/core/health.py +0 -0
- {spatial_memory_mcp-1.6.0 → spatial_memory_mcp-1.6.2}/spatial_memory/core/helpers.py +0 -0
- {spatial_memory_mcp-1.6.0 → spatial_memory_mcp-1.6.2}/spatial_memory/core/import_security.py +0 -0
- {spatial_memory_mcp-1.6.0 → spatial_memory_mcp-1.6.2}/spatial_memory/core/lifecycle_ops.py +0 -0
- {spatial_memory_mcp-1.6.0 → spatial_memory_mcp-1.6.2}/spatial_memory/core/logging.py +0 -0
- {spatial_memory_mcp-1.6.0 → spatial_memory_mcp-1.6.2}/spatial_memory/core/metrics.py +0 -0
- {spatial_memory_mcp-1.6.0 → spatial_memory_mcp-1.6.2}/spatial_memory/core/models.py +0 -0
- {spatial_memory_mcp-1.6.0 → spatial_memory_mcp-1.6.2}/spatial_memory/core/rate_limiter.py +0 -0
- {spatial_memory_mcp-1.6.0 → spatial_memory_mcp-1.6.2}/spatial_memory/core/security.py +0 -0
- {spatial_memory_mcp-1.6.0 → spatial_memory_mcp-1.6.2}/spatial_memory/core/spatial_ops.py +0 -0
- {spatial_memory_mcp-1.6.0 → spatial_memory_mcp-1.6.2}/spatial_memory/core/tracing.py +0 -0
- {spatial_memory_mcp-1.6.0 → spatial_memory_mcp-1.6.2}/spatial_memory/core/utils.py +0 -0
- {spatial_memory_mcp-1.6.0 → spatial_memory_mcp-1.6.2}/spatial_memory/core/validation.py +0 -0
- {spatial_memory_mcp-1.6.0 → spatial_memory_mcp-1.6.2}/spatial_memory/factory.py +0 -0
- {spatial_memory_mcp-1.6.0 → spatial_memory_mcp-1.6.2}/spatial_memory/migrations/__init__.py +0 -0
- {spatial_memory_mcp-1.6.0 → spatial_memory_mcp-1.6.2}/spatial_memory/ports/__init__.py +0 -0
- {spatial_memory_mcp-1.6.0 → spatial_memory_mcp-1.6.2}/spatial_memory/py.typed +0 -0
- {spatial_memory_mcp-1.6.0 → spatial_memory_mcp-1.6.2}/spatial_memory/services/memory.py +0 -0
- {spatial_memory_mcp-1.6.0 → spatial_memory_mcp-1.6.2}/spatial_memory/tools/__init__.py +0 -0
- {spatial_memory_mcp-1.6.0 → spatial_memory_mcp-1.6.2}/spatial_memory/tools/definitions.py +0 -0
- {spatial_memory_mcp-1.6.0 → spatial_memory_mcp-1.6.2}/spatial_memory/verify.py +0 -0
- {spatial_memory_mcp-1.6.0 → spatial_memory_mcp-1.6.2}/stubs/hdbscan/__init__.pyi +0 -0
- {spatial_memory_mcp-1.6.0 → spatial_memory_mcp-1.6.2}/stubs/lancedb/__init__.pyi +0 -0
- {spatial_memory_mcp-1.6.0 → spatial_memory_mcp-1.6.2}/stubs/lancedb/index.pyi +0 -0
- {spatial_memory_mcp-1.6.0 → spatial_memory_mcp-1.6.2}/stubs/lancedb/rerankers.pyi +0 -0
- {spatial_memory_mcp-1.6.0 → spatial_memory_mcp-1.6.2}/stubs/lancedb/table.pyi +0 -0
- {spatial_memory_mcp-1.6.0 → spatial_memory_mcp-1.6.2}/stubs/mcp/__init__.pyi +0 -0
- {spatial_memory_mcp-1.6.0 → spatial_memory_mcp-1.6.2}/stubs/mcp/server/__init__.pyi +0 -0
- {spatial_memory_mcp-1.6.0 → spatial_memory_mcp-1.6.2}/stubs/mcp/server/stdio.pyi +0 -0
- {spatial_memory_mcp-1.6.0 → spatial_memory_mcp-1.6.2}/stubs/mcp/types.pyi +0 -0
- {spatial_memory_mcp-1.6.0 → spatial_memory_mcp-1.6.2}/stubs/openai/__init__.pyi +0 -0
- {spatial_memory_mcp-1.6.0 → spatial_memory_mcp-1.6.2}/stubs/pyarrow/__init__.pyi +0 -0
- {spatial_memory_mcp-1.6.0 → spatial_memory_mcp-1.6.2}/stubs/pyarrow/parquet.pyi +0 -0
- {spatial_memory_mcp-1.6.0 → spatial_memory_mcp-1.6.2}/stubs/sklearn/__init__.pyi +0 -0
- {spatial_memory_mcp-1.6.0 → spatial_memory_mcp-1.6.2}/stubs/sklearn/metrics/__init__.pyi +0 -0
- {spatial_memory_mcp-1.6.0 → spatial_memory_mcp-1.6.2}/stubs/umap/__init__.pyi +0 -0
- {spatial_memory_mcp-1.6.0 → spatial_memory_mcp-1.6.2}/tests/__init__.py +0 -0
- {spatial_memory_mcp-1.6.0 → spatial_memory_mcp-1.6.2}/tests/conftest.py +0 -0
- {spatial_memory_mcp-1.6.0 → spatial_memory_mcp-1.6.2}/tests/integration/__init__.py +0 -0
- {spatial_memory_mcp-1.6.0 → spatial_memory_mcp-1.6.2}/tests/integration/conftest.py +0 -0
- {spatial_memory_mcp-1.6.0 → spatial_memory_mcp-1.6.2}/tests/integration/test_backup_restore.py +0 -0
- {spatial_memory_mcp-1.6.0 → spatial_memory_mcp-1.6.2}/tests/integration/test_concurrent_writes.py +0 -0
- {spatial_memory_mcp-1.6.0 → spatial_memory_mcp-1.6.2}/tests/integration/test_cross_process_locking.py +0 -0
- {spatial_memory_mcp-1.6.0 → spatial_memory_mcp-1.6.2}/tests/integration/test_database.py +0 -0
- {spatial_memory_mcp-1.6.0 → spatial_memory_mcp-1.6.2}/tests/integration/test_database_safeguards.py +0 -0
- {spatial_memory_mcp-1.6.0 → spatial_memory_mcp-1.6.2}/tests/integration/test_embeddings.py +0 -0
- {spatial_memory_mcp-1.6.0 → spatial_memory_mcp-1.6.2}/tests/integration/test_enterprise_features.py +0 -0
- {spatial_memory_mcp-1.6.0 → spatial_memory_mcp-1.6.2}/tests/integration/test_indexing.py +0 -0
- {spatial_memory_mcp-1.6.0 → spatial_memory_mcp-1.6.2}/tests/integration/test_mcp_server.py +0 -0
- {spatial_memory_mcp-1.6.0 → spatial_memory_mcp-1.6.2}/tests/integration/test_namespace_ops.py +0 -0
- {spatial_memory_mcp-1.6.0 → spatial_memory_mcp-1.6.2}/tests/integration/test_phase5_tools.py +0 -0
- {spatial_memory_mcp-1.6.0 → spatial_memory_mcp-1.6.2}/tests/integration/test_security_edge_cases.py +0 -0
- {spatial_memory_mcp-1.6.0 → spatial_memory_mcp-1.6.2}/tests/integration/test_server_v153.py +0 -0
- {spatial_memory_mcp-1.6.0 → spatial_memory_mcp-1.6.2}/tests/integration/test_ttl_snapshots.py +0 -0
- {spatial_memory_mcp-1.6.0 → spatial_memory_mcp-1.6.2}/tests/test_config.py +0 -0
- {spatial_memory_mcp-1.6.0 → spatial_memory_mcp-1.6.2}/tests/test_connection_pool.py +0 -0
- {spatial_memory_mcp-1.6.0 → spatial_memory_mcp-1.6.2}/tests/test_health.py +0 -0
- {spatial_memory_mcp-1.6.0 → spatial_memory_mcp-1.6.2}/tests/test_helpers.py +0 -0
- {spatial_memory_mcp-1.6.0 → spatial_memory_mcp-1.6.2}/tests/test_logging.py +0 -0
- {spatial_memory_mcp-1.6.0 → spatial_memory_mcp-1.6.2}/tests/test_metrics.py +0 -0
- {spatial_memory_mcp-1.6.0 → spatial_memory_mcp-1.6.2}/tests/test_models.py +0 -0
- {spatial_memory_mcp-1.6.0 → spatial_memory_mcp-1.6.2}/tests/test_rate_limiter.py +0 -0
- {spatial_memory_mcp-1.6.0 → spatial_memory_mcp-1.6.2}/tests/test_validation.py +0 -0
- {spatial_memory_mcp-1.6.0 → spatial_memory_mcp-1.6.2}/tests/unit/__init__.py +0 -0
- {spatial_memory_mcp-1.6.0 → spatial_memory_mcp-1.6.2}/tests/unit/test_cache.py +0 -0
- {spatial_memory_mcp-1.6.0 → spatial_memory_mcp-1.6.2}/tests/unit/test_circuit_breaker.py +0 -0
- {spatial_memory_mcp-1.6.0 → spatial_memory_mcp-1.6.2}/tests/unit/test_config_phase5.py +0 -0
- {spatial_memory_mcp-1.6.0 → spatial_memory_mcp-1.6.2}/tests/unit/test_errors_phase5.py +0 -0
- {spatial_memory_mcp-1.6.0 → spatial_memory_mcp-1.6.2}/tests/unit/test_export_import_service.py +0 -0
- {spatial_memory_mcp-1.6.0 → spatial_memory_mcp-1.6.2}/tests/unit/test_export_ops.py +0 -0
- {spatial_memory_mcp-1.6.0 → spatial_memory_mcp-1.6.2}/tests/unit/test_file_security.py +0 -0
- {spatial_memory_mcp-1.6.0 → spatial_memory_mcp-1.6.2}/tests/unit/test_filesystem.py +0 -0
- {spatial_memory_mcp-1.6.0 → spatial_memory_mcp-1.6.2}/tests/unit/test_hybrid_search_ops.py +0 -0
- {spatial_memory_mcp-1.6.0 → spatial_memory_mcp-1.6.2}/tests/unit/test_import_ops.py +0 -0
- {spatial_memory_mcp-1.6.0 → spatial_memory_mcp-1.6.2}/tests/unit/test_import_security.py +0 -0
- {spatial_memory_mcp-1.6.0 → spatial_memory_mcp-1.6.2}/tests/unit/test_lancedb_repository_phase5.py +0 -0
- {spatial_memory_mcp-1.6.0 → spatial_memory_mcp-1.6.2}/tests/unit/test_lifecycle_ops.py +0 -0
- {spatial_memory_mcp-1.6.0 → spatial_memory_mcp-1.6.2}/tests/unit/test_lifecycle_service.py +0 -0
- {spatial_memory_mcp-1.6.0 → spatial_memory_mcp-1.6.2}/tests/unit/test_memory_service.py +0 -0
- {spatial_memory_mcp-1.6.0 → spatial_memory_mcp-1.6.2}/tests/unit/test_models_phase5.py +0 -0
- {spatial_memory_mcp-1.6.0 → spatial_memory_mcp-1.6.2}/tests/unit/test_process_lock.py +0 -0
- {spatial_memory_mcp-1.6.0 → spatial_memory_mcp-1.6.2}/tests/unit/test_security_facade.py +0 -0
- {spatial_memory_mcp-1.6.0 → spatial_memory_mcp-1.6.2}/tests/unit/test_spatial_ops.py +0 -0
- {spatial_memory_mcp-1.6.0 → spatial_memory_mcp-1.6.2}/tests/unit/test_spatial_service.py +0 -0
- {spatial_memory_mcp-1.6.0 → spatial_memory_mcp-1.6.2}/tests/unit/test_stats_ops.py +0 -0
- {spatial_memory_mcp-1.6.0 → spatial_memory_mcp-1.6.2}/tests/unit/test_tracing.py +0 -0
- {spatial_memory_mcp-1.6.0 → spatial_memory_mcp-1.6.2}/tests/unit/test_utility_service.py +0 -0
- {spatial_memory_mcp-1.6.0 → spatial_memory_mcp-1.6.2}/tests/unit/test_utils.py +0 -0
|
@@ -0,0 +1,158 @@
|
|
|
1
|
+
# Changelog
|
|
2
|
+
|
|
3
|
+
All notable changes to this project will be documented in this file.
|
|
4
|
+
|
|
5
|
+
The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.1.0/),
|
|
6
|
+
and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html).
|
|
7
|
+
|
|
8
|
+
## [Unreleased]
|
|
9
|
+
|
|
10
|
+
### Planned
|
|
11
|
+
- Medium severity architectural improvements (MED-ARCH-001 through MED-ARCH-004)
|
|
12
|
+
- Migration system (MED-DB-005)
|
|
13
|
+
|
|
14
|
+
## [1.6.2] - 2026-02-02
|
|
15
|
+
|
|
16
|
+
### Added
|
|
17
|
+
- Technical highlights documentation (`docs/TECHNICAL_HIGHLIGHTS.md`) with Mermaid diagrams
|
|
18
|
+
- Cognitive memory model vs traditional storage
|
|
19
|
+
- SLERP algorithm for journey tool
|
|
20
|
+
- Temperature-based random walks for wander tool
|
|
21
|
+
- HDBSCAN clustering for regions tool
|
|
22
|
+
- UMAP projection for visualize tool
|
|
23
|
+
- ONNX Runtime optimization
|
|
24
|
+
- scipy integration for efficient similarity calculations
|
|
25
|
+
|
|
26
|
+
### Fixed
|
|
27
|
+
- Fixed 46 ruff linting errors across codebase
|
|
28
|
+
- Import sorting and formatting
|
|
29
|
+
- Lines exceeding 100 characters
|
|
30
|
+
- Unused variables and imports
|
|
31
|
+
- Import ordering issues
|
|
32
|
+
|
|
33
|
+
## [1.6.1] - 2026-02-02
|
|
34
|
+
|
|
35
|
+
### Added
|
|
36
|
+
- `spatial-memory instructions` CLI command to view the MCP instructions injected into Claude's context
|
|
37
|
+
|
|
38
|
+
### Changed
|
|
39
|
+
- Updated CLAUDE.md to be contributor documentation (removed stale claude-memory references)
|
|
40
|
+
|
|
41
|
+
## [1.6.0] - 2026-02-02
|
|
42
|
+
|
|
43
|
+
### Fixed
|
|
44
|
+
|
|
45
|
+
#### Critical Issues
|
|
46
|
+
- **CRIT-001**: Fixed consolidation data loss window - implemented add-before-delete pattern with pending status marker
|
|
47
|
+
- **CRIT-002**: Fixed journey N+1 query pattern - plumbed `include_vector` parameter through search pipeline
|
|
48
|
+
|
|
49
|
+
#### High Severity Issues
|
|
50
|
+
- **HIGH-001**: Fixed sequential DB calls in wander (resolved via CRIT-002)
|
|
51
|
+
- **HIGH-002**: Fixed O(n²) similarity calculation in visualize - replaced with `scipy.spatial.distance.cdist` vectorized operation
|
|
52
|
+
- **HIGH-003**: Fixed inefficient batch search - implemented native LanceDB batch search
|
|
53
|
+
- **HIGH-004**: Fixed duplicate embedding generation in extract - batch embed upfront with `embed_batch()`
|
|
54
|
+
- **HIGH-005**: Fixed sequential updates in decay - added `update_batch()` method
|
|
55
|
+
- **HIGH-006**: Fixed sequential fetches in reinforce - added `get_batch()` method
|
|
56
|
+
- **HIGH-007**: Fixed non-atomic batch insert - added `PartialBatchInsertError` with rollback capability
|
|
57
|
+
- **HIGH-008**: Fixed rename_namespace lacking rollback - track renamed IDs with `_rollback_namespace_rename()`
|
|
58
|
+
- **HIGH-009**: Fixed consolidation loading entire namespace - added streaming `_consolidate_chunked()`
|
|
59
|
+
- **HIGH-010**: Fixed file lock on NFS/SMB - added detection and startup warning
|
|
60
|
+
|
|
61
|
+
#### Medium Severity Issues
|
|
62
|
+
- **MED-SEC-002**: Fixed memory exhaustion in JSON/CSV export - implemented streaming export
|
|
63
|
+
- **MED-CQ-001**: Fixed `forget_batch` returning incorrect IDs
|
|
64
|
+
- **MED-CQ-002**: Added missing `backend` to `EmbeddingServiceProtocol`
|
|
65
|
+
- **MED-CQ-003**: Fixed rate limiter token consumption issue
|
|
66
|
+
- **MED-CQ-004**: Fixed embedding cache leak in batch operations
|
|
67
|
+
- **MED-DB-001**: Added missing index to idempotency table
|
|
68
|
+
- **MED-DB-003**: Fixed `get_namespace_stats()` loading all records
|
|
69
|
+
- **MED-DB-004**: Added vector dimension validation at insert
|
|
70
|
+
|
|
71
|
+
#### Low Severity Issues
|
|
72
|
+
- **LOW-001**: Made embedding cache size configurable (was hardcoded 1000)
|
|
73
|
+
- **LOW-002**: Standardized datetime handling in lifecycle.py
|
|
74
|
+
- **LOW-003**: Extracted magic numbers in retry logic to constants
|
|
75
|
+
- **LOW-004**: Added Literal type validation for `index_type`
|
|
76
|
+
- **LOW-006**: Fixed `validate_namespace` docstring mismatch
|
|
77
|
+
- **LOW-007**: Normalized mock embedding vectors in conftest.py
|
|
78
|
+
- **LOW-008**: Documented content validation security approach
|
|
79
|
+
- **LOW-009**: Added metadata depth validation
|
|
80
|
+
- **LOW-010**: Sanitized paths in error messages
|
|
81
|
+
- **LOW-011**: Added proactive connection health check
|
|
82
|
+
- **LOW-012**: Fixed `close()` to remove from connection pool
|
|
83
|
+
- **LOW-013**: Implemented auto-compaction scheduling
|
|
84
|
+
- **LOW-014**: Cached stop words set (was recreated per call)
|
|
85
|
+
- **LOW-015**: Improved cache key hashing
|
|
86
|
+
|
|
87
|
+
### Added
|
|
88
|
+
- `get_batch()` method for bulk memory retrieval
|
|
89
|
+
- `update_batch()` method returning `(success_count, failed_ids)` tuple
|
|
90
|
+
- Native LanceDB batch vector search
|
|
91
|
+
- `PartialBatchInsertError` exception with `succeeded_ids` for recovery
|
|
92
|
+
- `atomic=True` parameter to `insert_batch()` with rollback capability
|
|
93
|
+
- Streaming consolidation with configurable `consolidate_chunk_size`
|
|
94
|
+
- NFS/SMB filesystem detection in `core/filesystem.py`
|
|
95
|
+
- Config option `acknowledge_network_filesystem_risk` to suppress warnings
|
|
96
|
+
|
|
97
|
+
### Changed
|
|
98
|
+
- Refactored `database.py` into separate manager modules for maintainability
|
|
99
|
+
- Improved type safety across async operations
|
|
100
|
+
|
|
101
|
+
### Closed (By Design)
|
|
102
|
+
- **MED-SEC-001**: No namespace-level authorization - single-developer local use is intended
|
|
103
|
+
- **MED-DB-002**: `get_namespaces()` loads all values - TTL caching is sufficient
|
|
104
|
+
- **LOW-005**: Duplicate local imports - intentional circular import avoidance
|
|
105
|
+
|
|
106
|
+
## [0.1.0] - 2026-01-20
|
|
107
|
+
|
|
108
|
+
### Added
|
|
109
|
+
|
|
110
|
+
#### Configuration System
|
|
111
|
+
- Pydantic-based settings with environment variable support
|
|
112
|
+
- Dependency injection pattern for testability
|
|
113
|
+
- Full configuration validation with bounds checking
|
|
114
|
+
- Support for `.env` files
|
|
115
|
+
|
|
116
|
+
#### Database Layer
|
|
117
|
+
- LanceDB integration for vector storage
|
|
118
|
+
- SQL injection prevention with pattern detection
|
|
119
|
+
- UUID validation for memory IDs
|
|
120
|
+
- Namespace format validation
|
|
121
|
+
- Atomic updates with rollback support
|
|
122
|
+
|
|
123
|
+
#### Embedding Service
|
|
124
|
+
- Local embedding support via sentence-transformers
|
|
125
|
+
- OpenAI API embedding support
|
|
126
|
+
- Dual-backend architecture with automatic routing
|
|
127
|
+
- Model: `all-MiniLM-L6-v2` (384 dimensions) as default
|
|
128
|
+
|
|
129
|
+
#### Data Models
|
|
130
|
+
- `Memory` - Core memory representation
|
|
131
|
+
- `MemoryResult` - Search result with similarity score
|
|
132
|
+
- `Filter` / `FilterGroup` - Query filtering system
|
|
133
|
+
- `ClusterInfo` - Cluster metadata for regions
|
|
134
|
+
- `JourneyStep` - Step in journey interpolation
|
|
135
|
+
- `VisualizationData` - Visualization output format
|
|
136
|
+
|
|
137
|
+
#### Error Handling
|
|
138
|
+
- Custom exception hierarchy
|
|
139
|
+
- `SpatialMemoryError` base class
|
|
140
|
+
- Specific errors: `MemoryNotFoundError`, `NamespaceNotFoundError`, `EmbeddingError`, `StorageError`, `ValidationError`, `ConfigurationError`, `ClusteringError`, `VisualizationError`
|
|
141
|
+
|
|
142
|
+
#### Testing
|
|
143
|
+
- 71 unit tests covering all Phase 1 components
|
|
144
|
+
- Pytest fixtures for isolated testing
|
|
145
|
+
- Mock embedding service for fast tests
|
|
146
|
+
|
|
147
|
+
#### Documentation
|
|
148
|
+
- README with project overview and roadmap
|
|
149
|
+
- Architecture diagrams (Mermaid)
|
|
150
|
+
- Security documentation
|
|
151
|
+
- Contributing guidelines
|
|
152
|
+
- Configuration reference (`.env.example`)
|
|
153
|
+
|
|
154
|
+
### Security
|
|
155
|
+
- Input validation on all user-provided data
|
|
156
|
+
- SQL injection prevention
|
|
157
|
+
- Namespace isolation
|
|
158
|
+
- Sanitized error messages
|
|
@@ -0,0 +1,102 @@
|
|
|
1
|
+
# Spatial Memory MCP - Contributor Guide
|
|
2
|
+
|
|
3
|
+
This document helps AI assistants (and human contributors) work effectively on this codebase.
|
|
4
|
+
|
|
5
|
+
## Project Overview
|
|
6
|
+
|
|
7
|
+
**spatial-memory-mcp** is a persistent semantic memory MCP server for LLMs. It provides vector-based memory storage with spatial navigation capabilities using LanceDB and sentence-transformers.
|
|
8
|
+
|
|
9
|
+
## Architecture
|
|
10
|
+
|
|
11
|
+
```
|
|
12
|
+
spatial_memory/
|
|
13
|
+
├── server.py # MCP server, tool handlers, instructions injection
|
|
14
|
+
├── factory.py # Dependency injection, service instantiation
|
|
15
|
+
├── config.py # Settings (Pydantic), environment configuration
|
|
16
|
+
├── core/ # Core infrastructure
|
|
17
|
+
│ ├── database.py # LanceDB wrapper, CRUD operations
|
|
18
|
+
│ ├── embeddings.py # Sentence-transformer embedding service
|
|
19
|
+
│ ├── models.py # Pydantic data models (Memory, etc.)
|
|
20
|
+
│ ├── errors.py # Exception hierarchy
|
|
21
|
+
│ ├── validation.py # Input validation, security checks
|
|
22
|
+
│ ├── security.py # Security utilities
|
|
23
|
+
│ ├── db_*.py # Database utilities (search, indexes, migrations)
|
|
24
|
+
│ └── spatial_ops.py # SLERP, vector operations
|
|
25
|
+
├── services/ # Business logic layer
|
|
26
|
+
│ ├── memory.py # Core memory operations (remember, recall, forget)
|
|
27
|
+
│ ├── spatial.py # Spatial operations (journey, wander, regions)
|
|
28
|
+
│ ├── lifecycle.py # Decay, reinforce, consolidate, extract
|
|
29
|
+
│ ├── export_import.py# Import/export functionality
|
|
30
|
+
│ └── utility.py # Stats, namespaces, health
|
|
31
|
+
├── adapters/ # External service adapters
|
|
32
|
+
├── ports/ # Interface definitions
|
|
33
|
+
└── tools/ # MCP tool definitions
|
|
34
|
+
```
|
|
35
|
+
|
|
36
|
+
## Key Commands
|
|
37
|
+
|
|
38
|
+
```bash
|
|
39
|
+
# Run tests (unit tests only by default)
|
|
40
|
+
pytest tests/ -v
|
|
41
|
+
|
|
42
|
+
# Run all tests including integration
|
|
43
|
+
pytest tests/ -v -m ""
|
|
44
|
+
|
|
45
|
+
# Run integration tests only
|
|
46
|
+
pytest tests/ -v -m integration
|
|
47
|
+
|
|
48
|
+
# Type checking
|
|
49
|
+
mypy spatial_memory/
|
|
50
|
+
|
|
51
|
+
# Linting
|
|
52
|
+
ruff check spatial_memory/ tests/
|
|
53
|
+
|
|
54
|
+
# Format code
|
|
55
|
+
ruff format spatial_memory/ tests/
|
|
56
|
+
|
|
57
|
+
# Run the server directly
|
|
58
|
+
python -m spatial_memory
|
|
59
|
+
```
|
|
60
|
+
|
|
61
|
+
## Test Markers
|
|
62
|
+
|
|
63
|
+
- `@pytest.mark.unit` - Fast tests with mocked dependencies
|
|
64
|
+
- `@pytest.mark.integration` - Tests with real database/embeddings (slower)
|
|
65
|
+
- `@pytest.mark.slow` - Tests taking >1 second
|
|
66
|
+
- `@pytest.mark.requires_model` - Tests needing the embedding model loaded
|
|
67
|
+
|
|
68
|
+
## Configuration
|
|
69
|
+
|
|
70
|
+
Settings via environment variables or `.env` file:
|
|
71
|
+
- `SPATIAL_MEMORY_PATH` - Database storage location (default: `.spatial-memory/`)
|
|
72
|
+
- `SPATIAL_MEMORY_EMBEDDING_MODEL` - Model name (default: `all-MiniLM-L6-v2`)
|
|
73
|
+
- `SPATIAL_MEMORY_LOG_LEVEL` - Logging level
|
|
74
|
+
- See `config.py` and `.env.example` for full list
|
|
75
|
+
|
|
76
|
+
## Code Style
|
|
77
|
+
|
|
78
|
+
- Line length: 100 characters
|
|
79
|
+
- Python 3.10+ (use modern syntax: `|` unions, etc.)
|
|
80
|
+
- Type hints required (strict mypy)
|
|
81
|
+
- Ruff for linting/formatting
|
|
82
|
+
|
|
83
|
+
## Important Patterns
|
|
84
|
+
|
|
85
|
+
1. **Dependency Injection**: Services receive dependencies via constructor, not global imports
|
|
86
|
+
2. **Async Throughout**: All database and service methods are async
|
|
87
|
+
3. **Pydantic Models**: Use for data validation and serialization
|
|
88
|
+
4. **Error Hierarchy**: Custom exceptions in `core/errors.py`
|
|
89
|
+
|
|
90
|
+
## MCP Tool Categories
|
|
91
|
+
|
|
92
|
+
The server exposes these tool groups:
|
|
93
|
+
- **Memory**: `remember`, `recall`, `hybrid_recall`, `nearby`, `forget`
|
|
94
|
+
- **Spatial**: `journey`, `wander`, `regions`, `visualize`
|
|
95
|
+
- **Lifecycle**: `decay`, `reinforce`, `extract`, `consolidate`
|
|
96
|
+
- **Admin**: `stats`, `namespaces`, `export_memories`, `import_memories`
|
|
97
|
+
|
|
98
|
+
## Notes
|
|
99
|
+
|
|
100
|
+
- MCP server instructions are auto-injected via `_get_server_instructions()` in `server.py`
|
|
101
|
+
- Database uses LanceDB (embedded vector database)
|
|
102
|
+
- Embeddings default to ONNX-optimized sentence-transformers for performance
|
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
# Spatial Memory MCP - Issues Tracker
|
|
2
2
|
|
|
3
3
|
> Generated: 2026-02-01
|
|
4
|
-
> Status: **All Phases Complete**
|
|
5
|
-
> Last Updated: 2026-02-
|
|
4
|
+
> Status: **All Phases Complete - Released v1.6.0**
|
|
5
|
+
> Last Updated: 2026-02-02
|
|
6
6
|
|
|
7
7
|
---
|
|
8
8
|
|
|
@@ -279,6 +279,7 @@ Remaining backlog items are Medium severity architectural improvements (refactor
|
|
|
279
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
280
|
| 2026-02-01 | Phase 5 | ✅ Implemented LOW-001, LOW-003, LOW-014, LOW-015 | Claude |
|
|
281
281
|
| 2026-02-01 | All | **All phases complete** - 1360 tests passing | Claude |
|
|
282
|
+
| 2026-02-02 | All | **Released v1.6.0** - Pushed to repository | User |
|
|
282
283
|
| 2026-02-01 | Phase A-C Backlog | ✅ Implemented remaining Low severity issues: | Claude |
|
|
283
284
|
| | LOW-002 | Standardized datetime handling in lifecycle.py | |
|
|
284
285
|
| | LOW-004 | Added Literal type validation for index_type | |
|
|
@@ -40,7 +40,7 @@ The result? Developers interact with an AI that genuinely remembers—without wr
|
|
|
40
40
|
|
|
41
41
|
## This Is Not Storage. This Is Cognitive Architecture.
|
|
42
42
|
|
|
43
|
-
Traditional vector databases store embeddings. Spatial Memory MCP implements a cognitive memory model inspired by
|
|
43
|
+
Traditional vector databases store embeddings. Spatial Memory MCP implements a cognitive memory model inspired by established memory research (see [References](#references)).
|
|
44
44
|
|
|
45
45
|
### Memory Decay (Ebbinghaus Forgetting Curve)
|
|
46
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.
|
|
@@ -80,7 +80,7 @@ Project your memories into 2D or 3D space. Export as JSON, Mermaid diagrams, or
|
|
|
80
80
|
|
|
81
81
|
---
|
|
82
82
|
|
|
83
|
-
##
|
|
83
|
+
## 22 Tools. Complete Lifecycle Management.
|
|
84
84
|
|
|
85
85
|
| Category | Spatial Memory MCP | Typical Competitor |
|
|
86
86
|
|----------|-------------------|-------------------|
|
|
@@ -93,7 +93,7 @@ Project your memories into 2D or 3D space. Export as JSON, Mermaid diagrams, or
|
|
|
93
93
|
| Data Portability | export_memories, import_memories | None |
|
|
94
94
|
| Administration | stats, health | Minimal |
|
|
95
95
|
|
|
96
|
-
**
|
|
96
|
+
**22 production-ready tools** covering the complete memory lifecycle—from ingestion to navigation to maintenance to export.
|
|
97
97
|
|
|
98
98
|
---
|
|
99
99
|
|
|
@@ -116,9 +116,16 @@ Search for "authentication error handling" and find both semantically related se
|
|
|
116
116
|
Production deployment demands production infrastructure.
|
|
117
117
|
|
|
118
118
|
### Connection Management
|
|
119
|
-
- **Connection pooling** with LRU eviction
|
|
119
|
+
- **Connection pooling** with LRU eviction and health checks
|
|
120
120
|
- **Cross-process file locking** for multi-instance safety
|
|
121
121
|
- **Circuit breaker pattern** prevents cascade failures
|
|
122
|
+
- **NFS/SMB detection** warns about shared filesystem risks
|
|
123
|
+
|
|
124
|
+
### Data Integrity
|
|
125
|
+
- **Atomic batch operations** with rollback on failure
|
|
126
|
+
- **Add-before-delete pattern** prevents data loss during consolidation
|
|
127
|
+
- **Namespace rename rollback** recovers from partial failures
|
|
128
|
+
- **Streaming consolidation** handles large namespaces safely
|
|
122
129
|
|
|
123
130
|
### Observability
|
|
124
131
|
- **Request tracing** with correlation IDs
|
|
@@ -128,7 +135,7 @@ Production deployment demands production infrastructure.
|
|
|
128
135
|
|
|
129
136
|
### Security
|
|
130
137
|
- **Path traversal prevention** — No filesystem escapes
|
|
131
|
-
- **SQL injection detection** —
|
|
138
|
+
- **SQL injection detection** — 13 patterns covering major attack vectors
|
|
132
139
|
- **Input validation** — Pydantic models throughout
|
|
133
140
|
- **Credential masking** — Sensitive data never logged
|
|
134
141
|
- **Dry-run modes** — Preview destructive operations safely
|
|
@@ -155,7 +162,7 @@ Auto-indexing triggers at 10K+ memories using IVF_PQ. Sub-linear search complexi
|
|
|
155
162
|
|
|
156
163
|
| Feature | Spatial Memory MCP | mcp-mem0 | mcp-memory-service | Memory Bank MCP |
|
|
157
164
|
|---------|-------------------|----------|-------------------|-----------------|
|
|
158
|
-
| Total Tools |
|
|
165
|
+
| Total Tools | 22 | 3 | ~6 | ~5 |
|
|
159
166
|
| Spatial Navigation | Yes | No | No | No |
|
|
160
167
|
| Memory Decay | Yes | No | No | No |
|
|
161
168
|
| Reinforcement | Yes | No | No | No |
|
|
@@ -165,8 +172,8 @@ Auto-indexing triggers at 10K+ memories using IVF_PQ. Sub-linear search complexi
|
|
|
165
172
|
| SLERP Interpolation | Yes | No | No | No |
|
|
166
173
|
| Visualization | Yes | No | No | No |
|
|
167
174
|
| Enterprise Features | Full Suite | Minimal | Basic | Basic |
|
|
168
|
-
| External Dependencies |
|
|
169
|
-
| Test Coverage | 1,
|
|
175
|
+
| External Dependencies | None (embedded) | PostgreSQL | Varies | File-based |
|
|
176
|
+
| Test Coverage | 1,360 tests | Minimal | Unknown | Unknown |
|
|
170
177
|
|
|
171
178
|
**mcp-mem0**: 3 tools, 4 commits, requires PostgreSQL infrastructure.
|
|
172
179
|
|
|
@@ -197,15 +204,15 @@ Navigate between concepts. Discover intermediate ideas. Visualize knowledge stru
|
|
|
197
204
|
## Technical Specifications
|
|
198
205
|
|
|
199
206
|
- **Language**: Python 3.10+
|
|
200
|
-
- **Database**:
|
|
207
|
+
- **Database**: LanceDB (embedded vector database)
|
|
201
208
|
- **Embedding**: ONNX Runtime with all-MiniLM-L6-v2
|
|
202
209
|
- **Clustering**: HDBSCAN
|
|
203
210
|
- **Projection**: UMAP
|
|
204
211
|
- **Interpolation**: SLERP (Spherical Linear Interpolation)
|
|
205
212
|
- **Architecture**: Clean architecture with dependency injection
|
|
206
213
|
- **Type Safety**: Full type hints, mypy strict mode
|
|
207
|
-
- **Test Suite**: 1,
|
|
208
|
-
- **
|
|
214
|
+
- **Test Suite**: 1,360 passing tests
|
|
215
|
+
- **Version**: 1.6.2
|
|
209
216
|
|
|
210
217
|
---
|
|
211
218
|
|
|
@@ -239,6 +246,18 @@ And it does all of this with zero cognitive load on developers. Claude handles m
|
|
|
239
246
|
|
|
240
247
|
---
|
|
241
248
|
|
|
249
|
+
## References
|
|
250
|
+
|
|
251
|
+
The cognitive memory model is inspired by established research:
|
|
252
|
+
|
|
253
|
+
1. **Ebbinghaus, H. (1885)**. *Memory: A Contribution to Experimental Psychology*. The foundational research on the forgetting curve showing how memory retention decays exponentially over time. [Read the translation](https://psychclassics.yorku.ca/Ebbinghaus/index.htm)
|
|
254
|
+
|
|
255
|
+
2. **Settles, B. & Meeder, B. (2016)**. *A Trainable Spaced Repetition Model for Language Learning*. Duolingo's half-life regression (HLR) algorithm for optimizing memory retention. [ACL Anthology](https://aclanthology.org/P16-1174/)
|
|
256
|
+
|
|
257
|
+
3. **FSRS Algorithm**. Free Spaced Repetition Scheduler - a modern open-source algorithm for optimizing review intervals based on memory research. [GitHub](https://github.com/open-spaced-repetition/fsrs4anki)
|
|
258
|
+
|
|
259
|
+
---
|
|
260
|
+
|
|
242
261
|
**Spatial Memory MCP**
|
|
243
262
|
|
|
244
263
|
*Knowledge as a navigable landscape, not a filing cabinet.*
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
Metadata-Version: 2.4
|
|
2
2
|
Name: spatial-memory-mcp
|
|
3
|
-
Version: 1.6.
|
|
3
|
+
Version: 1.6.2
|
|
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
|
|
@@ -42,9 +42,13 @@ Description-Content-Type: text/markdown
|
|
|
42
42
|
|
|
43
43
|
# Spatial Memory MCP Server
|
|
44
44
|
|
|
45
|
+
[](https://pypi.org/project/spatial-memory-mcp/)
|
|
46
|
+
[](https://www.python.org/downloads/)
|
|
47
|
+
[](https://opensource.org/licenses/MIT)
|
|
48
|
+
|
|
45
49
|
A vector-based spatial memory system that treats knowledge as a navigable landscape, not a filing cabinet.
|
|
46
50
|
|
|
47
|
-
> **
|
|
51
|
+
> **Version 1.6.2** — Production-ready with 1,360 tests passing.
|
|
48
52
|
|
|
49
53
|
## Supported Platforms
|
|
50
54
|
|
|
@@ -91,7 +95,7 @@ Navigate knowledge like a landscape, not a filing cabinet:
|
|
|
91
95
|
| **Regions** | HDBSCAN clustering—see how your knowledge self-organizes |
|
|
92
96
|
| **Visualize** | UMAP projection—view your memory space in 2D/3D |
|
|
93
97
|
|
|
94
|
-
###
|
|
98
|
+
### 22 Tools vs. 3-6 in Competitors
|
|
95
99
|
Full lifecycle management: core operations, spatial navigation, memory lifecycle, hybrid search, namespace management, data import/export, and health/stats monitoring.
|
|
96
100
|
|
|
97
101
|
### Enterprise-Ready
|
|
@@ -101,7 +105,7 @@ Connection pooling, circuit breakers, per-agent rate limiting, request tracing,
|
|
|
101
105
|
|
|
102
106
|
## Features
|
|
103
107
|
|
|
104
|
-
- **
|
|
108
|
+
- **22 MCP tools** across 4 categories (core, spatial, lifecycle, utility)
|
|
105
109
|
- **Clean Architecture** with ports/adapters pattern for testability
|
|
106
110
|
- **LanceDB** vector storage with automatic indexing
|
|
107
111
|
- **Dual embedding support**: Local (sentence-transformers) or OpenAI API
|
|
@@ -119,10 +123,19 @@ Connection pooling, circuit breakers, per-agent rate limiting, request tracing,
|
|
|
119
123
|
| Phase 3: Spatial Operations | Complete | `journey`, `wander`, `regions`, `visualize` |
|
|
120
124
|
| Phase 4: Lifecycle Operations | Complete | `consolidate`, `extract`, `decay`, `reinforce` |
|
|
121
125
|
| Phase 5: Utilities | Complete | `stats`, `namespaces`, `export`, `import`, `hybrid_recall` |
|
|
122
|
-
| Phase 6: Polish & Release |
|
|
126
|
+
| Phase 6: Polish & Release | Complete | v1.6.0 on PyPI |
|
|
123
127
|
|
|
124
128
|
## Installation
|
|
125
129
|
|
|
130
|
+
### From PyPI (Recommended)
|
|
131
|
+
|
|
132
|
+
```bash
|
|
133
|
+
pip install spatial-memory-mcp
|
|
134
|
+
|
|
135
|
+
# Or with uv
|
|
136
|
+
uv pip install spatial-memory-mcp
|
|
137
|
+
```
|
|
138
|
+
|
|
126
139
|
### Development Setup
|
|
127
140
|
|
|
128
141
|
```bash
|
|
@@ -134,6 +147,10 @@ pip install -e ".[dev]"
|
|
|
134
147
|
### With OpenAI Support
|
|
135
148
|
|
|
136
149
|
```bash
|
|
150
|
+
# From PyPI
|
|
151
|
+
pip install spatial-memory-mcp[openai]
|
|
152
|
+
|
|
153
|
+
# From source
|
|
137
154
|
pip install -e ".[dev,openai]"
|
|
138
155
|
```
|
|
139
156
|
|
|
@@ -166,6 +183,28 @@ If ONNX shows as unavailable, reinstall with:
|
|
|
166
183
|
pip install --force-reinstall "sentence-transformers[onnx]"
|
|
167
184
|
```
|
|
168
185
|
|
|
186
|
+
### CLI Commands
|
|
187
|
+
|
|
188
|
+
The `spatial-memory` CLI provides several commands:
|
|
189
|
+
|
|
190
|
+
```bash
|
|
191
|
+
# Start the MCP server (default)
|
|
192
|
+
spatial-memory serve
|
|
193
|
+
|
|
194
|
+
# View the MCP instructions injected into Claude's context
|
|
195
|
+
spatial-memory instructions
|
|
196
|
+
|
|
197
|
+
# Run database migrations
|
|
198
|
+
spatial-memory migrate --status # Check migration status
|
|
199
|
+
spatial-memory migrate --dry-run # Preview migrations
|
|
200
|
+
spatial-memory migrate # Apply pending migrations
|
|
201
|
+
|
|
202
|
+
# Show version
|
|
203
|
+
spatial-memory --version
|
|
204
|
+
```
|
|
205
|
+
|
|
206
|
+
The `instructions` command is useful for understanding what behavioral guidelines are automatically injected when the MCP server connects to Claude.
|
|
207
|
+
|
|
169
208
|
### Optional Performance Dependencies
|
|
170
209
|
|
|
171
210
|
For best performance, install these optional dependencies:
|
|
@@ -257,7 +296,7 @@ Add to your Claude Desktop config (`claude_desktop_config.json`):
|
|
|
257
296
|
}
|
|
258
297
|
```
|
|
259
298
|
|
|
260
|
-
## Available Tools (
|
|
299
|
+
## Available Tools (22 Total)
|
|
261
300
|
|
|
262
301
|
For complete API documentation including parameters, return types, and examples, see [docs/API.md](docs/API.md).
|
|
263
302
|
|
|
@@ -301,6 +340,7 @@ For complete API documentation including parameters, return types, and examples,
|
|
|
301
340
|
| `export_memories` | Export memories to Parquet, JSON, or CSV format |
|
|
302
341
|
| `import_memories` | Import memories from exported files with validation |
|
|
303
342
|
| `hybrid_recall` | Combined vector + full-text search with configurable weighting |
|
|
343
|
+
| `health` | Check system health status |
|
|
304
344
|
|
|
305
345
|
## Tool Examples
|
|
306
346
|
|
|
@@ -348,7 +388,7 @@ Export all memories to parquet format
|
|
|
348
388
|
|
|
349
389
|
- **Path Traversal Prevention**: All file operations validate paths against allowed directories
|
|
350
390
|
- **Symlink Attack Protection**: Optional symlink blocking for sensitive environments
|
|
351
|
-
- **SQL Injection Prevention**:
|
|
391
|
+
- **SQL Injection Prevention**: 13 patterns covering major attack vectors
|
|
352
392
|
- **Input Validation**: Pydantic models validate all inputs
|
|
353
393
|
- **Error Sanitization**: Internal errors return reference IDs, not stack traces
|
|
354
394
|
- **Secure Credential Handling**: API keys stored as SecretStr
|
|
@@ -418,7 +458,7 @@ See [SPATIAL-MEMORY-ARCHITECTURE-DIAGRAMS.md](SPATIAL-MEMORY-ARCHITECTURE-DIAGRA
|
|
|
418
458
|
|
|
419
459
|
| Document | Description |
|
|
420
460
|
|----------|-------------|
|
|
421
|
-
| [docs/API.md](docs/API.md) | Complete API reference for all
|
|
461
|
+
| [docs/API.md](docs/API.md) | Complete API reference for all 22 tools |
|
|
422
462
|
| [docs/BENCHMARKS.md](docs/BENCHMARKS.md) | Performance benchmarks and test results |
|
|
423
463
|
| [docs/METRICS.md](docs/METRICS.md) | Prometheus metrics documentation |
|
|
424
464
|
| [docs/troubleshooting.md](docs/troubleshooting.md) | Troubleshooting guide |
|
|
@@ -450,7 +490,9 @@ For security vulnerabilities, please email directly rather than opening a public
|
|
|
450
490
|
|
|
451
491
|
## For Claude Code Users
|
|
452
492
|
|
|
453
|
-
|
|
493
|
+
When the MCP server connects, behavioral instructions are **automatically injected** into Claude's context—no configuration needed. Run `spatial-memory instructions` to view what gets injected.
|
|
494
|
+
|
|
495
|
+
For contributors working on this codebase, [CLAUDE.md](CLAUDE.md) provides project-specific guidance for AI assistants.
|
|
454
496
|
|
|
455
497
|
## License
|
|
456
498
|
|
|
@@ -1,8 +1,12 @@
|
|
|
1
1
|
# Spatial Memory MCP Server
|
|
2
2
|
|
|
3
|
+
[](https://pypi.org/project/spatial-memory-mcp/)
|
|
4
|
+
[](https://www.python.org/downloads/)
|
|
5
|
+
[](https://opensource.org/licenses/MIT)
|
|
6
|
+
|
|
3
7
|
A vector-based spatial memory system that treats knowledge as a navigable landscape, not a filing cabinet.
|
|
4
8
|
|
|
5
|
-
> **
|
|
9
|
+
> **Version 1.6.2** — Production-ready with 1,360 tests passing.
|
|
6
10
|
|
|
7
11
|
## Supported Platforms
|
|
8
12
|
|
|
@@ -49,7 +53,7 @@ Navigate knowledge like a landscape, not a filing cabinet:
|
|
|
49
53
|
| **Regions** | HDBSCAN clustering—see how your knowledge self-organizes |
|
|
50
54
|
| **Visualize** | UMAP projection—view your memory space in 2D/3D |
|
|
51
55
|
|
|
52
|
-
###
|
|
56
|
+
### 22 Tools vs. 3-6 in Competitors
|
|
53
57
|
Full lifecycle management: core operations, spatial navigation, memory lifecycle, hybrid search, namespace management, data import/export, and health/stats monitoring.
|
|
54
58
|
|
|
55
59
|
### Enterprise-Ready
|
|
@@ -59,7 +63,7 @@ Connection pooling, circuit breakers, per-agent rate limiting, request tracing,
|
|
|
59
63
|
|
|
60
64
|
## Features
|
|
61
65
|
|
|
62
|
-
- **
|
|
66
|
+
- **22 MCP tools** across 4 categories (core, spatial, lifecycle, utility)
|
|
63
67
|
- **Clean Architecture** with ports/adapters pattern for testability
|
|
64
68
|
- **LanceDB** vector storage with automatic indexing
|
|
65
69
|
- **Dual embedding support**: Local (sentence-transformers) or OpenAI API
|
|
@@ -77,10 +81,19 @@ Connection pooling, circuit breakers, per-agent rate limiting, request tracing,
|
|
|
77
81
|
| Phase 3: Spatial Operations | Complete | `journey`, `wander`, `regions`, `visualize` |
|
|
78
82
|
| Phase 4: Lifecycle Operations | Complete | `consolidate`, `extract`, `decay`, `reinforce` |
|
|
79
83
|
| Phase 5: Utilities | Complete | `stats`, `namespaces`, `export`, `import`, `hybrid_recall` |
|
|
80
|
-
| Phase 6: Polish & Release |
|
|
84
|
+
| Phase 6: Polish & Release | Complete | v1.6.0 on PyPI |
|
|
81
85
|
|
|
82
86
|
## Installation
|
|
83
87
|
|
|
88
|
+
### From PyPI (Recommended)
|
|
89
|
+
|
|
90
|
+
```bash
|
|
91
|
+
pip install spatial-memory-mcp
|
|
92
|
+
|
|
93
|
+
# Or with uv
|
|
94
|
+
uv pip install spatial-memory-mcp
|
|
95
|
+
```
|
|
96
|
+
|
|
84
97
|
### Development Setup
|
|
85
98
|
|
|
86
99
|
```bash
|
|
@@ -92,6 +105,10 @@ pip install -e ".[dev]"
|
|
|
92
105
|
### With OpenAI Support
|
|
93
106
|
|
|
94
107
|
```bash
|
|
108
|
+
# From PyPI
|
|
109
|
+
pip install spatial-memory-mcp[openai]
|
|
110
|
+
|
|
111
|
+
# From source
|
|
95
112
|
pip install -e ".[dev,openai]"
|
|
96
113
|
```
|
|
97
114
|
|
|
@@ -124,6 +141,28 @@ If ONNX shows as unavailable, reinstall with:
|
|
|
124
141
|
pip install --force-reinstall "sentence-transformers[onnx]"
|
|
125
142
|
```
|
|
126
143
|
|
|
144
|
+
### CLI Commands
|
|
145
|
+
|
|
146
|
+
The `spatial-memory` CLI provides several commands:
|
|
147
|
+
|
|
148
|
+
```bash
|
|
149
|
+
# Start the MCP server (default)
|
|
150
|
+
spatial-memory serve
|
|
151
|
+
|
|
152
|
+
# View the MCP instructions injected into Claude's context
|
|
153
|
+
spatial-memory instructions
|
|
154
|
+
|
|
155
|
+
# Run database migrations
|
|
156
|
+
spatial-memory migrate --status # Check migration status
|
|
157
|
+
spatial-memory migrate --dry-run # Preview migrations
|
|
158
|
+
spatial-memory migrate # Apply pending migrations
|
|
159
|
+
|
|
160
|
+
# Show version
|
|
161
|
+
spatial-memory --version
|
|
162
|
+
```
|
|
163
|
+
|
|
164
|
+
The `instructions` command is useful for understanding what behavioral guidelines are automatically injected when the MCP server connects to Claude.
|
|
165
|
+
|
|
127
166
|
### Optional Performance Dependencies
|
|
128
167
|
|
|
129
168
|
For best performance, install these optional dependencies:
|
|
@@ -215,7 +254,7 @@ Add to your Claude Desktop config (`claude_desktop_config.json`):
|
|
|
215
254
|
}
|
|
216
255
|
```
|
|
217
256
|
|
|
218
|
-
## Available Tools (
|
|
257
|
+
## Available Tools (22 Total)
|
|
219
258
|
|
|
220
259
|
For complete API documentation including parameters, return types, and examples, see [docs/API.md](docs/API.md).
|
|
221
260
|
|
|
@@ -259,6 +298,7 @@ For complete API documentation including parameters, return types, and examples,
|
|
|
259
298
|
| `export_memories` | Export memories to Parquet, JSON, or CSV format |
|
|
260
299
|
| `import_memories` | Import memories from exported files with validation |
|
|
261
300
|
| `hybrid_recall` | Combined vector + full-text search with configurable weighting |
|
|
301
|
+
| `health` | Check system health status |
|
|
262
302
|
|
|
263
303
|
## Tool Examples
|
|
264
304
|
|
|
@@ -306,7 +346,7 @@ Export all memories to parquet format
|
|
|
306
346
|
|
|
307
347
|
- **Path Traversal Prevention**: All file operations validate paths against allowed directories
|
|
308
348
|
- **Symlink Attack Protection**: Optional symlink blocking for sensitive environments
|
|
309
|
-
- **SQL Injection Prevention**:
|
|
349
|
+
- **SQL Injection Prevention**: 13 patterns covering major attack vectors
|
|
310
350
|
- **Input Validation**: Pydantic models validate all inputs
|
|
311
351
|
- **Error Sanitization**: Internal errors return reference IDs, not stack traces
|
|
312
352
|
- **Secure Credential Handling**: API keys stored as SecretStr
|
|
@@ -376,7 +416,7 @@ See [SPATIAL-MEMORY-ARCHITECTURE-DIAGRAMS.md](SPATIAL-MEMORY-ARCHITECTURE-DIAGRA
|
|
|
376
416
|
|
|
377
417
|
| Document | Description |
|
|
378
418
|
|----------|-------------|
|
|
379
|
-
| [docs/API.md](docs/API.md) | Complete API reference for all
|
|
419
|
+
| [docs/API.md](docs/API.md) | Complete API reference for all 22 tools |
|
|
380
420
|
| [docs/BENCHMARKS.md](docs/BENCHMARKS.md) | Performance benchmarks and test results |
|
|
381
421
|
| [docs/METRICS.md](docs/METRICS.md) | Prometheus metrics documentation |
|
|
382
422
|
| [docs/troubleshooting.md](docs/troubleshooting.md) | Troubleshooting guide |
|
|
@@ -408,7 +448,9 @@ For security vulnerabilities, please email directly rather than opening a public
|
|
|
408
448
|
|
|
409
449
|
## For Claude Code Users
|
|
410
450
|
|
|
411
|
-
|
|
451
|
+
When the MCP server connects, behavioral instructions are **automatically injected** into Claude's context—no configuration needed. Run `spatial-memory instructions` to view what gets injected.
|
|
452
|
+
|
|
453
|
+
For contributors working on this codebase, [CLAUDE.md](CLAUDE.md) provides project-specific guidance for AI assistants.
|
|
412
454
|
|
|
413
455
|
## License
|
|
414
456
|
|