Package Exports
- mongodb-memory-bank-mcp
- mongodb-memory-bank-mcp/dist/main/index.js
This package does not declare an exports field, so the exports above have been automatically detected and optimized by JSPM instead. If any package subpath is missing, it is recommended to post an issue to the original package (mongodb-memory-bank-mcp) to support the "exports" field. If that is not possible, create a JSPM override to customize the exports field for this package.
Readme
MongoDB Memory Bank MCP Server
🚀 The world's first MongoDB-powered MCP server with hybrid search capabilities
Transform your AI coding workflow with lightning-fast memory management, semantic search, and MongoDB's cutting-edge $rankFusion technology.
⚡ Game-Changing Features
🔥 MongoDB $rankFusion Hybrid Search (8.1+)
- World's first MCP implementation of MongoDB's revolutionary $rankFusion
- Combines text + vector search in a single query using reciprocal rank fusion
- 10-100x faster than traditional file-based memory systems
- Semantic understanding with Voyage AI's state-of-the-art embeddings
🎯 Intelligent Memory Management
- Auto-tagging with AI-powered content analysis
- Related memory discovery finds connections you never knew existed
- Sub-second search across thousands of memories
- Rich metadata with word counts, timestamps, and analytics
🌟 Dual-Mode Architecture
- Atlas Mode: Full hybrid search with vector embeddings
- Community Mode: Lightning-fast text search and document storage
- Seamless fallback ensures compatibility across MongoDB versions
🚀 Quick Start
Installation
npm install -g mongodb-memory-bank-mcp
Atlas Setup (Recommended - Full Features)
# Interactive setup with MongoDB Atlas
npx mongodb-memory-bank-mcp setup:atlas
Local Setup (Community Edition)
# Quick local setup with MongoDB Community
npx mongodb-memory-bank-mcp setup:local
🛠 MCP Client Configuration
Claude Desktop
Add to your claude_desktop_config.json
:
{
"mcpServers": {
"memory-bank-mongodb": {
"command": "npx",
"args": ["-y", "mongodb-memory-bank-mcp"],
"env": {
"MONGODB_URI": "your_mongodb_connection_string",
"MONGODB_DATABASE": "memory_bank",
"VOYAGE_API_KEY": "your_voyage_api_key"
}
}
}
}
Cursor / Windsurf / VS Code
Configure in your MCP settings with the same environment variables.
🎯 MCP Tools
Core Memory Operations
list_projects
- List all projectslist_project_files
- List files in a projectmemory_bank_read
- Read memory contentmemory_bank_write
- Create new memorymemory_bank_update
- Update existing memory
Enhanced MongoDB Features
memory_search
- Hybrid text/semantic searchmemory_discover
- Find related memories
💡 Usage Examples
Store with Auto-Tagging
Store this authentication strategy:
"JWT implementation with refresh tokens, Redis session store, rate limiting, and brute force protection."
Result: Automatically tagged with auth
, jwt
, security
, redis
, performance
Hybrid Search (Atlas)
Search for "database performance optimization" using semantic search
Result: Finds related memories about indexing, query optimization, caching strategies
Discover Related Memories
Find memories related to my auth-strategy.md file
Result: Discovers security patterns, session management, and API design memories
🏗 Architecture
MongoDB-First Design
- Single source of truth: All data in MongoDB
- ACID transactions: Data consistency guaranteed
- Horizontal scaling: Grows with your needs
- Rich indexing: Optimized for search performance
Performance Benchmarks
Operation | File-Based | MongoDB Community | MongoDB Atlas |
---|---|---|---|
Text Search | 2-5 seconds | 50-200ms | 30-100ms |
Memory Load | 1-3 seconds | 10-50ms | 5-20ms |
Related Discovery | ❌ Not available | 100-300ms | 50-150ms |
Semantic Search | ❌ Not available | ❌ Not available | 50-150ms |
🔧 Configuration
Environment Variables
# Required
MONGODB_URI=mongodb://localhost:27017
MONGODB_DATABASE=memory_bank
# Atlas Features (Optional)
MONGODB_ATLAS=true
ENABLE_VECTOR_SEARCH=true
VOYAGE_API_KEY=your_voyage_api_key
MongoDB Atlas Setup
- Create Atlas Cluster (Free tier available)
- Enable Vector Search in cluster settings
- Get Voyage AI API Key for embeddings
- Configure connection string with credentials
MongoDB Community Setup
- Install MongoDB Community locally
- Start MongoDB service
- Use local connection string
- Enjoy core features without vector search
🌟 Why MongoDB Over Files?
Performance Revolution
- Instant search vs slow file scanning
- Concurrent access vs file locking
- Rich queries vs basic grep
- Scalable storage vs linear degradation
Advanced Capabilities
- $rankFusion hybrid search (MongoDB 8.1+)
- Vector embeddings with Voyage AI
- Aggregation pipelines for complex analytics
- Real-time indexing for optimal performance
Developer Experience
- Drop-in replacement for existing memory banks
- Backward compatibility with all original tools
- Enhanced features without breaking changes
- Production-ready with enterprise-grade reliability
🚀 Latest Technologies
MongoDB $rankFusion (8.1+)
- Reciprocal rank fusion algorithm
- Weighted search results for optimal relevance
- Multiple search methods combined intelligently
- Automatic fallback for older MongoDB versions
Voyage AI Integration
- voyage-3-large - Latest state-of-the-art model
- 32K token context vs OpenAI's 8K
- Multilingual support across 26 languages
- Quantization support for cost optimization
📊 Use Cases
AI Development
- Code patterns and architecture decisions
- Bug fixes and debugging strategies
- API designs and integration patterns
- Performance optimizations and best practices
Knowledge Management
- Meeting notes and team decisions
- Research findings and technical insights
- Learning notes and skill development
- Project documentation and requirements
Team Collaboration
- Shared knowledge base across team members
- Decision tracking and reasoning documentation
- Best practices and coding standards
- Troubleshooting guides and solutions
🔒 Security & Reliability
- Input validation and sanitization
- Path security validation
- MongoDB injection prevention
- Connection pooling for high availability
- Automatic indexing for performance
- ACID transactions for data integrity
📈 Roadmap
- Multi-tenant support for team deployments
- Real-time collaboration features
- Advanced analytics dashboard
- Custom embedding models support
- GraphQL API for advanced integrations
🤝 Contributing
We welcome contributions! This project follows MongoDB and MCP best practices.
- Fork the repository
- Create a feature branch
- Add tests for new features
- Ensure all tests pass
- Submit a pull request
📄 License
MIT License - see LICENSE file for details.
🙏 Acknowledgments
Built with cutting-edge technologies:
- MongoDB - The developer data platform
- Voyage AI - State-of-the-art embeddings
- Model Context Protocol - AI tool integration standard
Transform your AI coding workflow today with MongoDB's power! 🚀