AI Long-Term Memory MCP Server
AI 장기 기억 MCP 서버
AI 에이전트에게 영구적인 장기 기억을 제공하는 모델 컨텍스트 프로토콜(MCP) 서버입니다. Claude Code와 함께 실제 환경에서 사용하도록 설계되어 AI 시스템이 세션 간에도 기억을 유지할 수 있게 합니다.
주요 기능
계층적 기억 구조: 3단계 시스템 (사실 → 경험 → 의사결정 체인)
의미론적 검색: 코사인 유사도를 사용한 임베딩 기반 검색
기억 감쇠: 활성화 기반 감쇠 — 자주 호출되는 기억은 유지되고, 사용되지 않는 기억은 점차 사라짐
감정 인식: 감정의 가치와 강도를 저장하여 "섬광 기억(flashbulb memory)" 효과 구현
자동 표면화(Auto-Surface): 대화 문맥에 의해 트리거되는 훅 기반 자동 기억 검색
중복 제거: 유사한 기억 자동 병합 (유사도 80% 초과 시)
Related MCP server: Recall
아키텍처
┌─────────────────────────────────────────┐
│ Claude Code │
│ (or any MCP client) │
├─────────────────────────────────────────┤
│ MCP Protocol │
├─────────────────────────────────────────┤
│ Memory MCP Server │
│ ┌───────────┐ ┌──────────────────┐ │
│ │ Write / │ │ Surface / │ │
│ │ Update / │ │ Search / │ │
│ │ Delete │ │ Read │ │
│ └─────┬─────┘ └────────┬─────────┘ │
│ │ │ │
│ ┌─────▼─────────────────▼─────────┐ │
│ │ SQLite Database │ │
│ │ memories + embeddings + decay │ │
│ └─────────────────────────────────┘ │
├─────────────────────────────────────────┤
│ Auto-Surface Hook │
│ (keyword matching on user input) │
└─────────────────────────────────────────┘기억 스키마
필드 | 타입 | 설명 |
| text | 짧은 제목 |
| text | 전체 내용 |
| text | 한 줄 요약 |
| text | 중간 압축 |
| int | 1=사실, 2=경험, 3=의사결정 체인 |
| int | 1-5 척도 |
| real | 0-10, 높을수록 섬광 기억 |
| real | -1 ~ 1, 부정에서 긍정 |
| text | 기분 설명 |
| text | 쉼표로 구분된 태그 |
| text | 메모/일기/피드백/프로젝트/사용자 |
| text | JSON 배열, 작성 시 생성 |
| int | 호출 횟수 |
| text | 마지막 호출 타임스탬프 |
| text | 활성/감쇠됨/만료됨 |
MCP 도구
도구 | 설명 |
| 자동 임베딩 및 중복 제거를 포함한 기억 생성 또는 업데이트 |
| ID로 특정 기억 읽기 |
| 임베딩 유사도를 사용한 의미론적 검색 |
| 중요도와 관련성에 따라 상위 기억 표면화 |
| 기존 기억 필드 업데이트 |
| 기억 소프트 삭제 |
| 감쇠 주기 실행 — 사용되지 않는 기억 비활성화 |
| 감쇠된 기억 영구 삭제 |
| 기억 시스템 통계 가져오기 |
감쇠 메커니즘
기억은 created_at이 아닌 last_activated를 기준으로 감쇠됩니다. 계속 호출되는 기억은 무기한 활성 상태로 유지됩니다. 감쇠 임계값:
낮은 중요도 (1-2) + 7일간 미호출 → 감쇠
중간 중요도 (3) + 14일간 미호출 → 감쇠
높은 중요도 (4-5) + 30일간 미호출 → 감쇠
고정된(Pinned) 기억은 절대 감쇠되지 않음
인간의 기억 통합 연구에서 영감을 받았으며, 8개의 논문을 참고했습니다 (설계 문서 참조).
자동 표면화 훅
auto_surface.cjs는 Claude Code의 UserPromptSubmit 훅으로 실행됩니다. 사용자 메시지가 입력될 때마다 다음을 수행합니다:
메시지에서 키워드 추출
기억 데이터베이스에서 일치 항목 검색
관련 기억을 대화 컨텍스트에 주입
이를 통해 명시적인 검색 명령 없이도 수동적인 회상이 가능합니다.
설정
npm installClaude Code MCP 설정에 추가:
{
"mcpServers": {
"memory": {
"command": "node",
"args": ["path/to/memory-mcp/index.js"]
}
}
}설계 결정
벡터 DB 대신 SQLite 사용: 배포가 간편하고 단일 파일로 관리되며, 1만 개 미만의 기억에 충분함
시간 기반 대신 활성화 기반 감쇠: 인간의 기억을 모방 — 사용된 기억은 강화되고, 사용되지 않는 기억은 사라짐
임베딩 중복 제거: 유사한 이벤트 반복으로 인한 기억 비대화 방지
계층적 구조: 사실(안정적), 경험(문맥적), 의사결정(실행 가능)을 분리
연구 참고 문헌
8개의 논문 연구를 기반으로 구축됨:
Generative Agents (Stanford, 2023): 기억 스트림, 성찰, 계획/반응
MemGPT (2023): OS에서 영감을 받은 페이지 관리가 포함된 계층적 기억
LUFY (2024): 감정 각성 가중치를 포함한 망각 메커니즘
MemoRAG (2024): 이중 점수를 사용하는 기억 기반 검색
Mem0 (2024): 자동 추출 및 중복 제거가 포함된 그래프 기반 기억
A-Mem (2024): 자기 조직화 에이전트 기억 네트워크
LoCoMo (2024): 긴 문맥 대화 기억 벤치마크
Chloe/Noah (커뮤니티): 4차원 동반자 AI 기억
각 논문의 영향에 대한 자세한 분석은 docs/design.md를 참조하세요.
상태
매일 활발히 사용 중. 17개 세션에 걸쳐 95개 이상의 기억 저장. 실제 사용 패턴에 따라 반복적으로 개선 중.
라이선스
MIT
This server cannot be deployed
Maintenance
Related MCP Connectors
Persistent memory for AI agents. Search, store, and recall across sessions.
Memory system for AI agents with semantic search. Store and recall memories with ease.
Persistent memory and knowledge management for AI agents with semantic search and 50+ tools.
Persistent memory for AI agents. Semantic search, memory graph, W3C DID identity.
Related MCP Servers
- FlicenseNot gradedqualityDmaintenanceProvides 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-
- FlicenseAqualityNot gradedmaintenanceProvides long-term memory storage for AI assistants with semantic search, enabling persistent storage of preferences, decisions, and context with relationship tracking between memories.19-
- AlicenseNot gradedqualityCmaintenanceProvides persistent, semantic memory storage for LLMs across sessions using vector embeddings and FAISS search. Features bio-inspired memory consolidation, intelligent forgetting, and semantic retrieval without API costs.MIT

Memsolus MCP Serverofficial
AlicenseAqualityDmaintenanceProvides persistent long-term memory for AI agents through semantic search and automated knowledge graph extraction. It enables agents to store, recall, and reason over facts, preferences, and relationships across multiple conversations and sessions.148 npmMIT