Skip to main content
Glama
toozuuu
by toozuuu

핵심 원리

MemoryAI는 대량의 영속적 지식을 로컬에 저장하고, LLM 컨텍스트에 필요한 제한적이고 고도로 관련된 일부만 검색하여 사실상 무제한의 영구 메모리를 제공합니다.

기존 AI 워크플로는 원시 대화 로그(80,000개 이상의 토큰)를 컨텍스트 창에 그대로 넣어 높은 API 비용, 주의력 저하, 프롬프트 드리프트를 유발합니다. MemoryAI는 대화 이벤트를 가로채고 영속적 결정을 추출하며 엄격한 토큰 예산 하에서 컨텍스트를 동적으로 계층화하는 자율적 인지 계층으로 작동합니다:

User Request / IDE Event
          ↓
  Event Normalizer (session.*, task.*, file.*, decision.*)
          ↓
  Policy Evaluator (ignore, observe, capture, review, immediate)
          ↓
  Memory Orchestrator (Two-Phase Writes & Privacy Redaction)
          ↓
  SQLite Engine (FTS5 BM25 + Dense Vectors + Version Ledger)
          ↓
  Hybrid Retrieval & Multi-Factor Reranking
          ↓
  Progressive Disclosure Context (Level 1 → Level 2 → Level 3 → Level 4)
          ↓
  Strict Token Budget (300 / 500 / 1,000 / 2,000 tokens)
          ↓
       LLM

Related MCP server: ContextKeep

주요 특징

  • 수동 관리 제로: MemoryAI는 Git/패키지 매니페스트를 통해 프로젝트 정체성을 자동 감지하고, 관련 컨텍스트를 회상하며, 영속적 결정을 캡처하고, 세션 핸드오프를 생성합니다.

  • 범용 크로스 클라이언트 이식성: 정규화된 대화 이벤트(MemoryAIConversationEvent)는 Claude Code, Cursor, Codex, Gemini CLI, ChatGPT 및 MCP 클라이언트를 원활하게 연결합니다.

  • MCP 2026 Stateless Core & Tasks Extension: 상태 비저장 실행, 명시적 애플리케이션 핸들(memoryContextId, taskId, handoffId, snapshotId) 및 백그라운드 작업 관리를 갖춘 MCP 2026 사양과 완전히 호환됩니다.

  • 4단계 점진적 공개: 레벨 1(150토큰 요약)**레벨 2(표준 사실)**부터 레벨 3(근거 자료)**레벨 4(대화 추적)**까지 컨텍스트가 점진적으로 구축됩니다.

  • 메모리 스냅샷 및 과거 차이점: 특정 시점의 프로젝트 스냅샷(memoryai snapshot create)을 생성하고 아키텍처 결정 전반에 걸친 과거 차이점(memoryai diff)을 검사합니다.

  • 프로젝트 메모리 상태 진단: 신선도, 신뢰도, 충돌률, 출처, 핸드오프 완전성을 평가하는 실시간 0–100 건강 점수(memoryai health).

  • 개인정보 보호 및 2단계 쓰기: 영구 저장 전에 RSA 개인 키, AWS 액세스 키, JWT 토큰, 연결 문자열 및 PII를 자동 감지하고 비식별화합니다.

  • 무중단 임베딩 마이그레이션: 안전한 롤백 기능을 갖춘 원자적 섀도 테이블 벡터 인덱싱(memoryai embeddings migrate).

  • 휴대용 .memorypack 형식: SHA-256 무결성 검사로 영속적 메모리를 내보내고, 백업하고, 복원합니다.


빠른 시작

1. 설치

# Clone the repository
git clone https://github.com/memoryai/memoryai.git
cd memoryai

# Install dependencies and build monorepo packages
npm install
npm run build

2. 14개 항목 진단 닥터 실행

# Verify database, vector indexes, encryption, SSRF protection, and MCP tools
node cli/dist/bin.js doctor

3. 기본 사용법 (기억 및 회상)

# Store a durable architectural decision
node cli/dist/bin.js remember "Architectural decision: Standardized on Fastify v4 and SQLite with WAL mode" --type decision --importance 0.95

# Recall bounded context with a 500 token budget
node cli/dist/bin.js recall "Fastify and SQLite database decisions" --max-tokens 500

아키텍처

                         MemoryAI Platform
                                │
       ┌────────────────────────┼────────────────────────┐
       ▼                        ▼                        ▼
   AI Clients             MCP 2026 Layer           Local SDK & CLI
 (Claude, Cursor,       (Stateless HTTP/Stdio,    (Node, Shell, API)
  Gemini, Codex, GPT)     Explicit Handles)
       │                        │                        │
       └────────────────────────┼────────────────────────┘
                                ▼
                         Event Normalizer
               (session.*, task.*, file.*, memory.*)
                                │
                                ▼
                       Event Policy Engine
            (ignore, observe, capture, review, immediate)
                                │
                                ▼
                       Memory Orchestrator
       ┌────────────────────────┼────────────────────────┐
       ▼                        ▼                        ▼
Memory Brain &           Memory Job & Tasks       Progressive Context
Two-Phase Write Engine   (Async Long-Running)     (Level 1 - 4 Layers)
       │                        │                        │
       ▼                        ▼                        ▼
Privacy Classifier &     Integrity Checker &      Semantic Cache &
Selective Encryption     Health Monitor (0-100)   Model Router
       │                        │                        │
       └────────────────────────┼────────────────────────┘
                                ▼
                      SQLite Storage Engine
     (Memories, Vectors, Versions, Snapshots, Tasks, Events, Sync Queue)

이벤트 기반 메모리

MemoryAI는 수동 개입 없이 IDE 및 에이전트 수명 주기 이벤트에 자동으로 반응합니다:

# Emit an event to the MemoryAI pipeline
node cli/dist/bin.js remember "Project migrated to Angular 21 with standalone components" --type decision

이벤트 유형

정책 작업

기본 처리

architecture.changed

immediate

높은 중요도로 즉시 영구 저장

decision.created

capture

Memory Brain 평가를 통해 처리

dependency.changed

immediate

이전 종속성 버전을 대체

handoff.created

capture

구조화된 세션 연속성 레코드로 저장

error.detected

review

신뢰도가 낮으면 검토 큐에 격리

file.changed

observe

컨텍스트 증가 없이 로컬 이벤트 로그에 추적

session.started

observe

프로젝트 정체성을 자동 감지하고 핸드오프를 준비


점진적 공개 컨텍스트

현재 프롬프트에 필요한 깊이의 정보만 검색합니다:

  • 레벨 1 (요약): 목표와 핵심 사실에 대한 150토큰 한정 요약.

  • 레벨 2 (표준): 안전한 <MEMORY_DATA> 컨테이너에 포맷된 중복 제거 및 고중요도 메모리 레코드.

  • 레벨 3 (근거): 출처, 파일 링크, 타임스탬프 메타데이터와 함께 제공되는 표준 레코드.

  • 레벨 4 (대화): 명시적 요청 시 원본 대화 세그먼트 전체를 추적.

# Recall Level 1 summary context
node cli/dist/bin.js recall "OAuth architecture" --max-tokens 300

MCP 2026 & Tasks Extension

MemoryAI는 Claude Desktop, Claude Code, Cursor, Codex 및 모든 MCP 클라이언트를 위해 stdio를 통한 완전 호환 MCP 서버를 제공합니다.

핵심 MCP 도구 (활성 도구 30개):

  • memory_auto_context: 자동 프로젝트 감지, 의도 평가, 제한된 메모리 회상.

  • memory_recall: 토큰 한정 하이브리드 검색.

  • memory_progressive_recall: 다중 계층 점진적 컨텍스트 공개.

  • memory_remember: 자율적 영속 메모리 캡처.

  • task_create, task_get, task_cancel, task_list: 백그라운드 작업을 위한 비차단 MCP 2026 Tasks 확장.

  • memory_snapshot_create, memory_snapshot_list, memory_snapshot_compare: 특정 시점 상태 관리.

  • memory_diff: 과거 메모리 버전 비교.

  • memory_health: 진단 분석을 포함한 0–100 프로젝트 건강 점수.

  • memory_review_queue: 격리된 메모리 검사 및 검토.

  • memory_handoff_create, memory_handoff_get: 여러 날에 걸친 세션 연속성.

  • memory_share: 범위가 제한되고 권한이 확인된 공유.

  • memory_explain, memory_explain_capture: 검색 및 캡처 진단 설명.


스냅샷 및 버전 관리

# Create a point-in-time milestone snapshot
node cli/dist/bin.js snapshot create v1.0.0-release "Production release snapshot"

# List project snapshots
node cli/dist/bin.js snapshot list

# Compare two project snapshots
node cli/dist/bin.js snapshot compare snap_abc123 snap_def456

# View historical diff of a memory record
node cli/dist/bin.js diff mem_123 1 2

상태 및 진단

# Check 0-100 Project Memory Health score and diagnostic breakdown
node cli/dist/bin.js health

# Scan for orphaned vectors, broken provenance, or duplicate hashes
node cli/dist/bin.js verify

# Run automated conservative self-healing repair
node cli/dist/bin.js repair

# Calculate token economics and cloud API cost savings
node cli/dist/bin.js cost

# Run sandbox memory policy simulation
node cli/dist/bin.js simulate balanced

# Disaster recovery mode
node cli/dist/bin.js recovery

보안 및 개인정보 보호 아키텍처

보안 제어

구현

개인정보 분류기

개인 키, AWS 자격 증명, JWT 토큰, 데이터베이스 URI 및 PII를 자동 거부/비식별화

프롬프트 인젝션 차단

엄격한 <MEMORY_DATA> 비실행 샌드박싱 및 명령 무력화

테넌트 및 사용자 격리 (IDOR)

모든 쿼리와 변형에 대해 서버가 테넌트, 사용자, 프로젝트 권한 부여 검사를 강제

SSRF 방어

루프백(127.0.0.1), RFC1918 사설 서브넷, 클라우드 메타데이터(169.254.169.254)를 차단하는 URL 검증

저장 암호화

민감한 콘텐츠 필드에 대한 AES-256-GCM 인증 암호화

속도 제한기

메모리 내 슬라이딩 윈도우 토큰 버킷 속도 제한기

아카이브 보안

Zip-slip 디렉터리 트래버설 방지 및 압축 해제 폭탄 비율 제한


CLI 참조

명령

설명

memoryai init

로컬 .memoryai 데이터베이스와 암호화 키 초기화

memoryai status

로컬 메모리 통계, 프로젝트 정체성, 메트릭 표시

memoryai remember <text>

영속적 결정, 선호도 또는 사실 저장

memoryai recall <query>

엄격한 토큰 제한으로 제한된 컨텍스트 검색

memoryai search <query>

하이브리드 FTS 및 벡터 매칭으로 메모리 검색

memoryai handoff <create|show|list>

구조화된 세션 핸드오프 레코드 관리

memoryai snapshot <create|list|compare>

특정 시점 프로젝트 스냅샷 관리

memoryai diff <id> <v1> <v2>

메모리 레코드의 과거 버전 비교

memoryai health

프로젝트 메모리 건강 점수 (0–100)

memoryai verify

데이터베이스 무결성 문제 검사

memoryai repair

보수적인 자동 무결성 복구

memoryai cost

클라우드 토큰 절감 및 비용 절감 계산

memoryai simulate [policy]

샌드박스 정책 시뮬레이션 실행

memoryai doctor

14개 항목 시스템 진단 실행

memoryai security-check

보안 강화 상태 확인

memoryai export [file.memorypack]

메모리를 휴대용 .memorypack 번들로 내보내기

memoryai import <file.memorypack>

.memorypack 번들에서 메모리 가져오기


테스트 및 검증

# Run all 89 unit, integration, memory, retrieval, MCP, concurrency, and performance tests
npm test

# Run all 22 OWASP API Top 10 and Privacy Security tests
npm run test:security

# Run combined full test suite
npm run test:all

라이선스

MIT License. Copyright (c) 2026 MemoryAI Contributors.

F
license - not found
Not graded
quality - not tested
B
maintenance

Maintenance

Maintainers
Response time
Release cycle
Releases (12mo)
Commit activity

Resources

Unclaimed servers have limited discoverability.

Looking for Admin?

If you are the server author, to access and configure the admin panel.

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
    A
    maintenance
    Provides infinite long-term memory for AI agents with persistent, searchable storage of project details, preferences, and snippets. Reduces token costs by retrieving only relevant memories while keeping all data stored locally.
    154
    MIT
  • A
    license
    Not graded
    quality
    B
    maintenance
    Enables AI agents to maintain persistent, local memory with retrieval-augmented search, knowledge graphs, and context surfacing, without any cloud dependencies.
    144
    MIT

View all related MCP servers

Related MCP Connectors

  • Persistent memory and knowledge graphs for AI agents. Hybrid search, context checkpoints, and more.

  • Persistent memory and knowledge management for AI agents with semantic search and 50+ tools.

  • Persistent memory for AI agents — verbatim conversations, searchable by meaning.

View all MCP Connectors

Latest Blog Posts

MCP directory API

We provide all the information about MCP servers via our MCP API.

curl -X GET 'https://glama.ai/api/mcp/v1/servers/toozuuu/MemoryAI'

If you have feedback or need assistance with the MCP directory API, please join our Discord server