Skip to main content
Glama

MEMI Logo

🧠 MEMI - Memory Management Interface

Advanced Memory System for AI Agents via Model Context Protocol (MCP)

License: MIT TypeScript Node.js SQLite

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

πŸ—‚οΈ 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

🎯 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

Related MCP server: neo-mem

πŸ“ˆ Project Stats

Tools TypeScript Tests Coverage

πŸ› οΈ 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

# 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:

{
  "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

πŸ”„ Typical Workflow

graph LR
    A[Create Project] --> B[Store Memories]
    B --> C[Search & Analyze]
    C --> D[Create Relations]
    D --> E[Generate Insights]
    E --> F[Export Results]

πŸ’‘ Usage Examples

Basic Workflow

// 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

  • βœ… Core MCP Server - Full protocol implementation

  • βœ… 19 Tools - Complete tool suite

  • βœ… Project Management - Context organization

  • βœ… Semantic Search - TF-IDF embeddings

  • βœ… Memory Analytics - Timeline and insights

  • βœ… 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

# 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 file for details.

πŸ†˜ Support

πŸ™ 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


🌟 Star this repo if MEMI helps you! 🌟

GitHub stars GitHub forks

Built with ❀️ for the AI community

Making AI agents smarter, one memory at a time.

Tool Schema Changelog

Recent tool additions, removals, and schema changes observed during successful MCP inspections.

Loading tool schema changelog…

    Related MCP Connectors

    Related MCP Servers

    • A
      license
      B
      quality
      B
      maintenance
      Provides persistent, graph-based memory for AI agents via MCP, enabling semantic search, wikilink traversal, reminders, and injection protection.
      14
      34
      Apache 2.0
    • A
      license
      A
      quality
      D
      maintenance
      Provides persistent, searchable memory for AI agents across any MCP-compatible client, storing project context, user preferences, and session learnings locally in SQLite with tools to save, retrieve, search, and manage them.
      12
      MIT
    • A
      license
      Not graded
      quality
      B
      maintenance
      Enables AI agents to store, recall, link, and manage durable local memories using ranked fuzzy search and optional graph context through a compact MCP interface.
      MIT