Universal AI Memory System for Collaborative Development
A comprehensive plan for implementing a Supermemory-like MCP (Model Context Protocol) memory server that works across different AI coding tools (Windsurf, Cline, Roo Code, KiloCode, Claude Desktop, etc.).
- Universal Compatibility: Work with any MCP-compatible AI tool
- Persistent Context: Maintain project knowledge across sessions
- Semantic Search: Natural language queries for retrieving context
- Lightweight: Easy to set up and maintain
- Privacy-First: Local-first storage with optional cloud sync
Goal: Basic MCP server with CRUD operations for memories
- Initialize Node.js/TypeScript MCP server project
- Implement MCP protocol handlers (stdio transport)
- Set up SQLite database for local storage
- Define memory schema (id, content, tags, timestamp, metadata)
- Add basic CRUD operations (create, read, update, delete)
-
addMemory- Store new memory with tags and metadata -
searchMemories- Search by keywords or tags -
getMemory- Retrieve specific memory by ID -
listMemories- List recent memories with pagination -
deleteMemory- Remove memory by ID
- Create configuration file (
.mcp-memory/config.json) - Support environment variables for settings
- Add database path configuration
- Implement logging system
- Unit tests for core operations
- Integration tests with MCP protocol
- Quick start guide
- API documentation
Deliverable: Working MCP server with basic memory operations
Goal: Add semantic search capabilities using embeddings
- Evaluate vector storage options:
- SQLite-vec (lightweight, local)
- Chroma (feature-rich, local)
- Qdrant (scalable, can be local or cloud)
- Implement chosen vector database
- Set up embedding pipeline (OpenAI, local models, etc.)
- Add vector similarity search
-
semanticSearch- Natural language search using embeddings -
similarMemories- Find related memories -
searchByTimeRange- Temporal queries -
searchByTags- Tag-based filtering - Hybrid search (keyword + semantic)
- Define memory types:
note- General notes and observationsdecision- Architecture and design decisionstask- TODO items and action itemscode_ref- Code snippets and referencescontext- Project context and background
- Add metadata fields (author, project, importance)
- Implement memory relationships/links
- Benchmark retrieval quality
- Optimize query performance
- Add caching layer
- Implement deduplication
Deliverable: Semantic search with vector embeddings
Goal: Automatically capture and index project knowledge
- Watch file system for changes
- Index code files and documentation
- Extract and index git commits
- Index AI chat sessions (if available)
- Chunking strategy for large files
- Extract code structure (functions, classes, modules)
- Parse documentation (README, guides, comments)
- Extract decisions from commit messages
- Identify patterns and conventions
- Incremental indexing (only changed files)
- Importance scoring for memories
- Automatic tag generation
- Duplicate detection and merging
-
reindexProject- Full project re-indexing -
indexStatus- Show indexing health -
pruneMemories- Remove outdated/duplicate memories -
exportMemories- Export to JSON/Markdown -
importMemories- Import from external sources
Deliverable: Automatic project knowledge capture
Goal: Enhanced capabilities for team collaboration
- Model entities and relationships
- Track knowledge evolution over time
- "Who/what/when/why" queries
- Visualize knowledge connections
- Multi-user support
- Shared memory spaces
- Memory permissions and visibility
- Conflict resolution for concurrent edits
- GitHub integration (issues, PRs, discussions)
- Slack/Discord integration for team memories
- Jira/Linear integration for task tracking
- Export to Notion/Obsidian
- Retention policies (auto-archive old memories)
- Memory importance scoring
- Automatic summarization of old memories
- Memory analytics and insights
Deliverable: Production-ready collaborative memory system
- Language: TypeScript/Node.js
- Protocol: MCP (Model Context Protocol)
- Database: SQLite (primary) + Vector DB (Chroma/SQLite-vec)
- Embeddings: OpenAI API or local models (sentence-transformers)
- Transport: stdio (standard MCP transport)
{
"@modelcontextprotocol/sdk": "^0.5.0",
"better-sqlite3": "^9.0.0",
"chromadb": "^1.8.0",
"openai": "^4.0.0",
"zod": "^3.22.0"
}{
"storage": {
"type": "sqlite",
"path": ".mcp-memory/memories.db"
},
"vectorStore": {
"enabled": true,
"provider": "chroma",
"path": ".mcp-memory/vectors"
},
"embeddings": {
"provider": "openai",
"model": "text-embedding-3-small",
"apiKey": "${OPENAI_API_KEY}"
},
"autoIndex": {
"enabled": true,
"watchPaths": ["src/", "docs/"],
"ignorePaths": ["node_modules/", "dist/"]
},
"retention": {
"maxAge": "90d",
"maxMemories": 10000
}
}// .windsurf/mcp.json
{
"mcpServers": {
"memory": {
"command": "node",
"args": ["/path/to/mcp-memory-server/dist/index.js"],
"env": {
"OPENAI_API_KEY": "${OPENAI_API_KEY}"
}
}
}
}// MCP settings
{
"mcpServers": {
"memory": {
"command": "node",
"args": ["/path/to/mcp-memory-server/dist/index.js"]
}
}
}// ~/Library/Application Support/Claude/claude_desktop_config.json
{
"mcpServers": {
"memory": {
"command": "node",
"args": ["/path/to/mcp-memory-server/dist/index.js"]
}
}
}- Retrieval Quality: >80% relevant results in top 5
- Performance: <100ms for keyword search, <500ms for semantic search
- Storage Efficiency: <10MB per 1000 memories
- Uptime: 99.9% availability
- User Satisfaction: Positive feedback from team
# Install the MCP memory server
npm install -g @vibecode/mcp-memory-server
# Initialize in your project
mcp-memory init
# Configure your AI tool
mcp-memory configure --tool windsurf
# Start using it
# AI tools will automatically have access to memory operations- MCP Specification: https://modelcontextprotocol.io/
- Supermemory: https://github.com/supermemoryai/supermemory
- MCP Servers: https://github.com/modelcontextprotocol/servers
- Chroma: https://www.trychroma.com/
- SQLite-vec: https://github.com/asg017/sqlite-vec
This is a community-driven project. Contributions welcome!
- Start with Phase 1 (MVP)
- Follow the implementation plan
- Add tests for all features
- Update documentation
- Submit PR with clear description
Status: Planning Phase
Target Start: Q1 2025
Maintainer: Vibecode Community