MEMI
by Rixmerz
README.md
<div align="center">

# π§ MEMI - Memory Management Interface
**Advanced Memory System for AI Agents via Model Context Protocol (MCP)**
[](https://opensource.org/licenses/MIT)
[](https://www.typescriptlang.org/)
[](https://nodejs.org/)
[](https://sqlite.org/)
</div>
MEMI is a sophisticated graph-based memory management system that provides AI agents with persistent, organized, and intelligent memory capabilities. Built as an MCP server, it seamlessly integrates with any MCP-compatible AI client.
## β¨ Key Features
<div align="center">
| ποΈ **Project Organization** | π **Semantic Search** | π **Memory CRUD** |
|:---:|:---:|:---:|
| Separate contexts by project | Natural language queries | Full lifecycle management |
| **π·οΈ Tag Management** | **π Analytics** | **π Relationships** |
| Smart organization & merging | Timeline & insights | Manual & auto connections |
| **π Zero Cost** | **β‘ Lightning Fast** | **π Privacy First** |
| Works completely offline | Millisecond responses | Local data storage |
</div>
### π― **Core Capabilities**
- ποΈ **Project-Based Organization** - Separate memories by project/context to avoid confusion
- π **Advanced Semantic Search** - Natural language queries with intelligent filtering
- π **Complete Memory CRUD** - Create, read, update, delete, and relate memories
- π·οΈ **Smart Tag Management** - Organize, merge, and analyze tags across projects
- π **Memory Analytics** - Detailed insights and timeline analysis
- π **Relationship Management** - Manual and automatic memory connections
- π **Zero-Cost Operation** - Works completely offline with TF-IDF embeddings
- β‘ **Lightning Fast** - Millisecond response times with SQLite storage
## π **Project Stats**
<div align="center">




</div>
## π οΈ Available Tools (19 Total)
### π **Project Management**
- `mem-project-create` - Create new project contexts
- `mem-project-list` - List all available projects
- `mem-project-switch` - Switch active project context
### πΎ **Memory Operations**
- `mem-store` - Store new memories (auto-assigns to current project)
- `mem-search` - Advanced search with filters (tags, dates, projects)
- `mem-get` - Retrieve specific memory by ID
- `mem-update` - Update memory content and metadata
- `mem-delete` - Remove memories safely
- `mem-search-similar` - Find semantically similar memories
### π **Relationship Management**
- `mem-relate` - Create manual relationships between memories
- `mem-reconstruct` - Rebuild narratives from connected memories
### π·οΈ **Tag Operations**
- `mem-tags-list` - View all tags with usage statistics
- `mem-tags-merge` - Combine similar tags
- `mem-tags-rename` - Rename tags across all memories
### π **Analytics & Insights**
- `mem-analyze` - Comprehensive memory analysis
- `mem-timeline` - Generate temporal timelines
- `mem-graph` - Graph statistics and operations
## π Quick Start
### Prerequisites
- **Node.js** 18+
- **npm** or **yarn**
- **Git**
### Installation
```bash
# Clone the repository
git clone https://github.com/Rixmerz/MEMI.git
cd MEMI
# Install dependencies
npm install
# Build the project
npm run build
# Test the installation (optional)
npm test
```
> π‘ **Tip**: The build process compiles TypeScript to JavaScript and sets up the MCP server for use.
### Configuration
Add MEMI to your MCP client configuration:
```json
{
"mcpServers": {
"memi": {
"command": "node",
"args": ["/path/to/MEMI/dist/index.js", "--stdio"],
"env": {
"MEMI_DB_PATH": "~/.memi/memory.db",
"MEMI_LOG_LEVEL": "info",
"MEMI_EMBEDDING_PROVIDER": "tfidf"
}
}
}
}
```
## π¬ **Demo**
<div align="center">
### π **Typical Workflow**
```mermaid
graph LR
A[Create Project] --> B[Store Memories]
B --> C[Search & Analyze]
C --> D[Create Relations]
D --> E[Generate Insights]
E --> F[Export Results]
```
</div>
## π‘ Usage Examples
### Basic Workflow
```javascript
// 1. Create a project
mem-project-create {
"name": "my-web-app",
"description": "E-commerce web application",
"tags": ["web", "ecommerce", "react"]
}
// 2. Switch to the project
mem-project-switch {
"projectName": "my-web-app"
}
// 3. Store memories
mem-store {
"content": "User authentication implemented with JWT tokens and refresh token rotation",
"source": "development-notes",
"tags": ["auth", "jwt", "security"]
}
// 4. Search memories
mem-search {
"query": "authentication security",
"filters": {
"tags": ["auth"],
"sourceType": ["document"]
}
}
// 5. Analyze project
mem-analyze {
"type": "project"
}
```
## π― Benefits
### For AI Agents
- **Persistent Context** - Remember conversations and learnings across sessions
- **Organized Knowledge** - Separate different projects and contexts
- **Smart Retrieval** - Find relevant information quickly with semantic search
- **Relationship Awareness** - Understand connections between different pieces of information
### For Developers
- **Zero Setup** - Works out of the box with no API keys required
- **Privacy First** - All data stored locally, no external services
- **Extensible** - Easy to add new embedding providers and features
- **Production Ready** - Robust error handling and comprehensive testing
### For Teams
- **Project Isolation** - Keep different projects' memories separate
- **Collaborative** - Share memory databases across team members
- **Analytics** - Understand knowledge patterns and gaps
- **Maintenance** - Built-in tools for cleaning and organizing memories
## π§ Configuration Options
### Environment Variables
- `MEMI_DB_PATH` - Database file location (default: `./memi_memory.db`)
- `MEMI_LOG_LEVEL` - Logging level: `error`, `warn`, `info`, `debug`
- `MEMI_EMBEDDING_PROVIDER` - Embedding provider: `tfidf`, `openai`
- `OPENAI_API_KEY` - Required only if using OpenAI embeddings
### Embedding Providers
**TF-IDF (Default - Free)**
- No API key required
- Works completely offline
- Good for most use cases
- Fast and lightweight
**OpenAI (Premium)**
- Requires OpenAI API key
- Higher quality embeddings
- Better semantic understanding
- Costs per API call
## π Architecture
MEMI uses a graph-based architecture where:
- **Memories** are stored as nodes with rich metadata
- **Relationships** connect related memories automatically and manually
- **Projects** provide organizational boundaries
- **Tags** enable flexible categorization
- **Embeddings** power semantic search capabilities
## πΊοΈ **Roadmap**
### π― **Upcoming Features**
- [ ] π **Web Interface** - Optional GUI for memory management
- [ ] π± **Mobile App** - Companion app for on-the-go access
- [ ] π **More Embeddings** - Support for additional providers
- [ ] π **Sync & Backup** - Cloud synchronization options
- [ ] π€ **AI Integrations** - Enhanced AI-specific features
- [ ] π **Advanced Analytics** - More detailed insights and reports
### π **Completed**
- [x] β
**Core MCP Server** - Full protocol implementation
- [x] β
**19 Tools** - Complete tool suite
- [x] β
**Project Management** - Context organization
- [x] β
**Semantic Search** - TF-IDF embeddings
- [x] β
**Memory Analytics** - Timeline and insights
- [x] β
**Relationship Management** - Manual connections
## π€ Contributing
We welcome contributions! Please:
1. Fork the repository
2. Create a feature branch
3. Make your changes
4. Add tests for new functionality
5. Submit a pull request
Only maintainers can push directly to main branch.
### π οΈ **Development Setup**
```bash
# Clone your fork
git clone https://github.com/YOUR_USERNAME/MEMI.git
cd MEMI
# Install dependencies
npm install
# Run in development mode
npm run dev
# Run tests
npm test
# Build for production
npm run build
```
## π License
MIT License - see [LICENSE](LICENSE) file for details.
## π Support
- π [Documentation](https://github.com/Rixmerz/MEMI/wiki)
- π [Issue Tracker](https://github.com/Rixmerz/MEMI/issues)
- π¬ [Discussions](https://github.com/Rixmerz/MEMI/discussions)
- π§ [Contact](mailto:support@memi.dev)
## π **Acknowledgments**
- **Model Context Protocol** - For the excellent MCP specification
- **OpenAI** - For inspiring AI-first development
- **SQLite** - For reliable local storage
- **TypeScript** - For type-safe development
- **The AI Community** - For continuous feedback and support
---
<div align="center">
### π **Star this repo if MEMI helps you!** π
[](https://github.com/Rixmerz/MEMI/stargazers)
[](https://github.com/Rixmerz/MEMI/network/members)
**Built with β€οΈ for the AI community**
*Making AI agents smarter, one memory at a time.*
</div>This server cannot be deployed
Maintenance
ActivityInactive
ResponsivenessNo recent community issues