Replies: 2 comments
|
The use cases here are valid and the isolation problem is real. Current state and near-term path: What works today — the Runtime switching — not currently supported, and adding it cleanly requires some design work (what happens to in-flight requests when you switch? Does the embedding model need to match across databases?). It is on the long-term roadmap but not scheduled. Tag-based separation — for many workflows, tagging memories with a project or context name (e.g. If you need hard isolation (security / privacy boundary), separate server instances per |
|
Closing as resolved. Summary of the current stance (see the comment above for detail):
The workarounds cover the concrete use cases raised here, so I'm marking this resolved. If demand for in-session runtime switching grows, please open a focused issue referencing this discussion and we can revisit the design. |
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
[Feature Request] Multiple Memory Database Instances with Runtime Switching
Problem Statement
Currently, MCP Memory Service uses a single memory database for all contexts. This creates challenges for users who need:
Real-world scenario: You're working on three projects simultaneously - a work project, a personal open-source project, and documentation writing. Currently, all memories are mixed together, making it hard to:
Proposed Solution
Add support for multiple named memory database instances with runtime switching via MCP tools.
Core Features
1. Dynamic Database Creation
2. Runtime Switching (No Restart Required)
3. Instance Management
Architecture Design
Database Registry
~/.local/share/mcp-memory/database_registry.jsonStorage Backend Support
Hybrid Approach (Recommended):
instance_nameZero Breaking Changes
Use Cases
1. Multi-Project Developer
2. Privacy-Conscious User
3. Safe Experimentation
4. Subject-Based Organization
Implementation Roadmap
Phase 1: Core Infrastructure (v8.51.0)
list_databases,switch_database,create_database)Phase 2: Advanced Features (v8.52.0)
Phase 3: Web UI Support (v9.0.0)
Phase 4: Context-Aware Switching (v9.1.0)
Technical Considerations
Performance
Security
Cloudflare Integration
instance_namefor filteringQuestions for Community
Default Instance Naming: Should the default instance be called "default", "main", or allow user customization?
Cross-Instance Search: Should we support searching across all databases simultaneously? Or keep instances completely isolated?
Instance Limits: Soft limit with warnings (e.g., 10 instances) or hard limit (e.g., 50)?
Auto-Switching: Would automatic instance switching based on context (git repo, directory) be useful? Or too "magical"?
Web UI Priority: Should we prioritize web UI support (Phase 3) or keep it CLI-first?
Cloudflare Strategy: Tag-based filtering (simpler, shared resources) vs separate Vectorize indexes (better isolation, more resources)?
Feedback Requested
Related Issues
Technical Implementation Plan: See detailed implementation plan for complete architecture and code changes.
Estimated Timeline: 4-6 releases over 2-3 months
Breaking Changes: None (fully backward compatible)
Migration Required: Automatic (existing database becomes "default" instance)
All reactions