Skip to main content
Glama

SelfHub – AI-Powered Personal Memory Hub

A personal AI memory management system built using the Model Context Protocol (MCP), Node.js, TypeScript, and MongoDB.

SelfHub allows AI assistants to store, retrieve, search, and organize personal information across different conversations.

Overview

SelfHub is an MCP server that acts as a persistent personal memory hub. It helps AI assistants remember useful information such as:

  • Personal preferences

  • Project details

  • Learning notes

  • Tasks and reminders

  • Code snippets

  • Important information

Memories can be accessed through MCP-compatible clients such as Claude Desktop, Claude Code, and VS Code with GitHub Copilot.

Related MCP server: Simple Memory MCP

Key Features

  • Memory Management: Store, retrieve, search, list, and delete memories.

  • Context Management: Organize memories into separate contexts.

  • Text Search: Search stored memories using MongoDB text indexing.

  • Memory Categorization: Organize information using categories and tags.

  • Analytics: View memory statistics and usage insights.

  • Persistent Storage: Store data in MongoDB.

  • MCP Integration: Connect with compatible AI assistants.

  • Docker Support: Run the application using Docker Compose.

Technology Stack

Technology

Purpose

Node.js

Runtime environment

TypeScript

Application development

Model Context Protocol (MCP)

AI assistant integration

MongoDB

Database

Mongoose

MongoDB object modeling

pnpm

Package management

Docker

Containerization

Node.js Test Runner

Automated testing

Architecture

The application follows a layered architecture:

  1. MCP Server: Handles MCP requests and tool execution.

  2. Services Layer: Contains memory and context business logic.

  3. Storage Layer: Manages persistent MongoDB operations.

  4. Models: Defines application data structures.

AI clients communicate with the server using JSON-RPC over standard input/output (stdio).

Available MCP Tools

SelfHub provides nine tools in three categories.

1. Memory Management

  • store_memory – Store a new memory.

  • retrieve_memory – Retrieve a memory using its ID.

  • list_memories – List memories with optional filters.

  • search_memories – Search memories using text queries.

  • delete_memory – Delete a memory.

2. Context Management

  • create_context – Create a context for organizing memories.

  • activate_context – Activate a context and load its memories.

  • list_contexts – List available contexts.

3. Analytics

  • get_stats – View memory statistics, categories, types, and tags.

Project Structure

SelfHub/
├── src/
│   ├── index.ts
│   ├── seed.ts
│   ├── db/
│   ├── models/
│   ├── services/
│   └── storage/
├── test/
├── scripts/
├── Dockerfile
├── docker-compose.yml
├── package.json
├── tsconfig.json
├── .env.example
└── README.md

Installation and Setup

Prerequisites

  • Node.js 24+

  • pnpm

  • MongoDB

1. Clone the repository

git clone https://github.com/krigup789/MySelfHub-AI-Powered-Personal-Memory-Hub.git
cd MySelfHub-AI-Powered-Personal-Memory-Hub

2. Install dependencies

pnpm install

3. Configure environment variables

Create a .env file using the example:

cp .env.example .env

Configure your MongoDB connection string:

MONGODB_URI=mongodb://localhost:27017/selfhub

4. Build the project

pnpm build

5. Run the project

pnpm dev

Available Commands

Command

Description

pnpm dev

Start development mode

pnpm build

Build the project

pnpm typecheck

Run TypeScript checks

pnpm test

Run automated tests

pnpm seed

Load sample data

pnpm demo

Run the cross-client demonstration

pnpm clean

Clean the build directory

Testing

Run the automated test suite:

pnpm test

The project includes end-to-end tests for MCP tools, memory operations, context management, database interactions, and server lifecycle behavior.

Docker Setup

Build the Docker image:

docker compose build

Start MongoDB:

docker compose up -d mongo

Refer to the Docker Compose configuration for the server startup process.

Future Enhancements

  • Semantic search using vector embeddings

  • File import and export

  • Data encryption

  • Web-based management dashboard

  • Multi-user support

  • Cloud synchronization

Repository: MySelfHub-AI-Powered-Personal-Memory-Hub

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

    • F
      license
      Not graded
      quality
      D
      maintenance
      Provides AI agents with persistent, searchable memory that survives across conversations using semantic search, temporal versioning, and smart organization. Enables long-term context retention and cross-session continuity for AI assistants.
      14
      -
    • A
      license
      Not graded
      quality
      D
      maintenance
      Enables AI assistants to store and retrieve persistent memories with a web management interface. Supports creating, searching, and managing memories through natural language commands or a visual web dashboard.
      1
      MIT
    • A
      license
      A
      quality
      D
      maintenance
      Provides persistent memory capabilities for AI assistants, enabling storage, recall, and analysis of information across conversations with intelligent memory management.
      25
      37 npm
      MIT