Skip to main content
Glama

wasurenagusa

AI 코딩 에이전트가 실수로부터 배우도록 가르치세요.

npm version License: MIT Node.js Ko-fi

wasurenagusa(물망초) — "나를 잊지 마세요"라는 꽃말을 가진 일본 꽃입니다.


문제점

AI 코딩 에이전트는 강력하지만 기억상실증에 걸려 있습니다. 모든 세션은 처음부터 다시 시작됩니다. 프로젝트 관례, 과거의 결정, 힘들게 배운 교훈들이 세션이 끝나는 순간 사라집니다.

기존 솔루션들은 수동 작업이 필요하거나, 컨텍스트 창을 압도할 때까지 원시 메모리를 저장하기만 합니다.

Related MCP server: memory-bank-mcp

해결책

wasurenagusa는 단순히 기억하는 것이 아니라 학습하는 MCP 서버입니다.

  1. 실수를 자동으로 감지 — 재시도 패턴, 사용자 불만, 반복되는 실패를 포착합니다.

  2. 교훈을 원칙으로 요약 — LLM이 수백 개의 원시 항목을 몇 가지 실행 가능한 규칙으로 압축합니다.

  3. 부정을 긍정으로 변환 — 각 원칙과 함께 positiveRule을 생성합니다. "X를 하지 마세요"가 "대신 Y를 하세요"로 바뀝니다. 연구에 따르면 LLM은 금지 사항보다 긍정적인 지시를 훨씬 더 잘 따릅니다 (Pink Elephant 문제).

  4. 설정을 테마로 압축 — LLM이 흩어진 설정을 일관된 요약으로 그룹화하여 포트나 경로 같은 사실을 보존합니다.

  5. 중요한 것만 주입 — 통합된 지혜와 활성 설정만 주입합니다. 템플릿 비대화나 중복 항목이 없습니다.

  6. 하이브리드 검색 (전체 텍스트 + 의미론적) — SQLite 기반 저장소와 로컬 임베딩 추론(외부 API 불필요)을 사용합니다. 일본어 지원 전체 텍스트 검색과 벡터 의미론적 검색을 병합하고 중복을 제거합니다. 완전히 오프라인으로 작동합니다.

  7. 스마트 태그 검색 — LLM이 생성한 가중치 태그와 복합 점수(최신성, 태그 가중치, 접근 빈도)를 사용하여 데이터를 삭제하지 않고도 검색 우선순위를 최적화합니다.

  8. 메모리 보관/복원 — 컨텍스트 창 공간을 절약하기 위해 메모리를 활성 컨텍스트 밖으로 일시적으로 보관했다가 필요할 때 복원합니다. 서브 에이전트가 있는 긴 세션에 이상적입니다.

Claude Code 훅을 통해 완전히 자동화됨 — 설정 후 추가 구성 불필요.

실제 영향

8개의 프로덕션 프로젝트(프로젝트 간 메모리 공유 포함)에서 저자가 매일 사용한 결과:

1,581 "dont" entries   →  5-9 principles per project    (LLM consolidation)
  each with positiveRule  →  affirmative-only injection  (Pink Elephant fix)
29 config entries      →  4-5 thematic summaries        (LLM consolidation)
21,800 chars raw data  →  6,200 chars injected           (71% reduction)

데모

  1. 세션 1: Claude가 포트 3000을 사용함 — 사용자가 8080으로 수정함

  2. 중지 훅: wasurenagusa가 대화를 자동 분석하고 실수를 기록함

  3. 세션 2: Claude가 지시 없이도 올바르게 포트 8080을 사용함


왜 wasurenagusa인가

대부분의 메모리 도구는 무슨 일이 일어났는지 저장합니다. wasurenagusa는 AI에게 왜 잘못되었는지를 가르치고, 같은 실수를 반복하지 않도록 보장합니다.

이것은 메모리 뱅크가 아닙니다. 학습 시스템입니다.

wasurenagusa

claude-mem

mcp-memory-service

CLAUDE.md

실수 자동 감지

예 (재시도 + 감정)

아니오

아니오

아니오

자동 통합 (LLM)

예 (dont→원칙, 설정→테마)

아니오

예 (감쇠 기반)

아니오

벡터 의미론적 검색

예 (로컬 추론, 오프라인)

예 (ChromaDB)

예 (SQLite-vec / ChromaDB)

아니오

메모리 계층 (단기/중기/장기)

예 (코사인 거리 임계값)

아니오

아니오

아니오

자동 승격 (강도)

예 (접근 횟수 → 강도 5)

아니오

아니오

아니오

훅을 통한 제로 노력

부분적

아니오

사람이 읽을 수 있는 저장소

아니오 (SQLite — v1 Markdown에서 자동 마이그레이션)

아니오 (SQLite)

아니오 (SQLite-vec)

다중 LLM 지원

Gemini / OpenAI / Anthropic (임베딩은 로컬 — API 키 불필요)

Claude 전용

로컬 (MiniLM-L6-v2)

해당 없음

토큰 효율적 검색

예 (인덱스 → 상세, 70-90% 절감)

예 (3계층)

해당 없음

아니오

프로젝트 간 메모리

예 (상위 5개 활성 프로젝트)

아니오

아니오

아니오

라이선스

MIT

AGPL-3.0

Apache-2.0

해당 없음


작동 원리

Session Start (Hook) — injection mode
  → Checks if consolidation is stale
  → Spawns background LLM worker if needed (non-blocking)
  → Spawns background embedding backfill worker (non-blocking)
  → Injects consolidated config + principles (layer 1) + recent 30-day entries (layer 2) + owner profile
  → Vector search injects semantically related short-term memories (layer 3)
  → Cross-project vector search injects related memories from other active projects (layer 4)
  → Only customized settings injected (defaults stripped)

Session Start (Hook) — agent mode
  → Injects dont summary + config index + owner profile (minimal footprint)
  → No vector search at startup (deferred to on-demand recall)

User Prompt (Hook) — agent mode
  → Injects 1-line reminder: "search memory if relevant"
  → Main agent spawns memory-recall sub-agent as needed
  → Sub-agent runs memory_search → returns summary only (no raw data in main context)
  → Survives compaction (re-injected on every user message)

During Session
  → memory_save auto-generates embedding via local inference (no API call)
  → memory_save enriches tags with LLM-assigned weights (0.0-1.0) (when API key available)
  → Theme shift triggers background re-tagging of related past entries
  → memory_search merges keyword + vector semantic + tag-weighted results
  → Vector hits increment access counts → auto-promote to intensity 5 at threshold

Session End (Hook)
  → LLM analyzes the conversation
  → Detects mistakes, frustration, retry patterns
  → Auto-saves lessons learned (with embedding)
  → Deduplicates against existing entries before saving
  → Updates active projects tracker (top 5 recent projects)

Background (async workers)
  → Consolidates "dont" entries → behavioral principles
  → Consolidates "config" entries → thematic summaries
  → Backfills embeddings for entries created before vector layer (20/run)
  → Results used in next session start

빠른 시작

💡 권장: 이 README를 Claude Code에 붙여넣고 wasurenagusa 설정을 요청하세요. 아래의 모든 과정을 자동으로 처리합니다.

사전 요구 사항

  • Node.js 18+

  • Claude Code (CLI)

  • 핵심 메모리 기능에 대해 외부 API 키 불필요 (임베딩은 로컬에서 실행)

  • 선택 사항: LLM 통합/분석을 위한 API 키 — Gemini / OpenAI / Anthropic

1. 설치

npm install -g wasurenagusa-mcp

또는 소스에서 설치:

git clone https://github.com/tsutushi0628/wasurenagusa-mcp.git
cd wasurenagusa-mcp
npm install && npm run build
npm link

npm run build는 CLI 진입점에 자동으로 chmod +x를 실행합니다. 수동 권한 설정이 필요 없습니다.

2. 구성

~/.wasurenagusa/.env 생성:

# Set at least one API key
GEMINI_API_KEY=your-key-here
# OPENAI_API_KEY=your-key-here
# ANTHROPIC_API_KEY=your-key-here

변수

필수

설명

GEMINI_API_KEY

셋 중 하나

Google Gemini API 키

OPENAI_API_KEY

셋 중 하나

OpenAI API 키

ANTHROPIC_API_KEY

셋 중 하나

Anthropic API 키

LLM_PROVIDER

아니오

gemini (기본값), openai, 또는 anthropic

LLM_MODEL

아니오

공급자의 기본 모델 재정의

MEMORY_DIR

아니오

메모리 디렉토리 (기본값: .wasurenagusa)

MAX_ENTRIES_PER_CATEGORY

아니오

자동 보관 전 카테고리당 항목 제한 (기본값: 100)

LOG_RETENTION_DAYS

아니오

로그 보관 기간 (일 단위, 기본값: 30)

SLACK_WEBHOOK_URL

아니오

자율 작업을 위한 Slack 알림

3. MCP 서버 등록

claude mcp add wasurenagusa -- wasurenagusa-mcp

4. 훅 설정

⚠️ 필수 — 이 단계를 수행하지 않으면 세션 시작 시 메모리가 주입되지 않습니다. 가장 흔히 놓치는 설정 단계입니다.

~/.claude/settings.json에 추가 (훅을 별도로 유지하려면 settings.local.json 사용):

{
  "hooks": {
    "SessionStart": [
      {
        "hooks": [
          {
            "type": "command",
            "command": "wasurenagusa-context",
            "timeout": 5
          }
        ]
      }
    ],
    "UserPromptSubmit": [
      {
        "hooks": [
          {
            "type": "command",
            "command": "wasurenagusa-context",
            "timeout": 5
          }
        ]
      }
    ],
    "Stop": [
      {
        "hooks": [
          {
            "type": "command",
            "command": "wasurenagusa-analyze",
            "timeout": 30
          }
        ]
      }
    ],
    "PreCompact": [
      {
        "hooks": [
          {
            "type": "command",
            "command": "wasurenagusa-context",
            "timeout": 15
          }
        ]
      }
    ]
  }
}

5. 사용 시작

Claude Code를 실행하세요. 끝입니다.

  • 첫 세션: .wasurenagusa/ 디렉토리가 자동으로 생성됩니다.

  • 첫 대화 후: 중지 훅이 중요한 컨텍스트를 분석하고 저장합니다.

  • 두 번째 세션부터: 축적된 지혜가 시작 시 자동으로 주입됩니다.

.wasurenagusa/.gitignore에 추가하세요. 프로젝트별 메모리 데이터가 포함되어 있습니다.


메모리 카테고리

카테고리

저장 내용

파일

config

API URL, 포트, 인증 위치

memory.db

dont

실수, 안티 패턴, 사용자 불만

memory.db

decision

아키텍처 결정, 기술 선택

memory.db

log

구현 기록, 해결된 오류

memory.db

snippet

자주 사용하는 명령어 및 쿼리

memory.db


MCP 도구

도구

설명

memory_get_context

구성 + 통합 원칙 가져오기 (세션 시작 시 자동 호출)

memory_search

가벼운 인덱스 검색 (ID, 제목, 태그만). 프로젝트 간 검색은 project: "active" 사용

memory_get_detail

ID로 전체 상세 정보 가져오기

memory_save

메모리 항목 명시적 저장

memory_stash

컨텍스트 창 공간을 절약하기 위해 메모리 일시 보관

memory_restore

이전에 보관된 메모리를 활성 컨텍스트로 복원

memory_delete

ID로 항목 삭제

task_submit

24/7 실행을 위한 자율 작업 제출

task_status

작업 실행 상태 확인

task_action_list

보류 중인 사람의 작업 목록 및 관리

project_init

프로젝트 품질 표준 초기화


CLI 명령어

명령어

목적

호출 주체

wasurenagusa-context

구성 + dont + 벡터 메모리를 stdout으로 출력

SessionStart / UserPromptSubmit / PreCompact 훅

wasurenagusa-analyze

대화 LLM 분석 및 자동 저장

중지 훅

wasurenagusa-backfill

벡터가 없는 항목에 대한 임베딩 생성

백그라운드 (자동 생성)

wasurenagusa-rebuild

손상된 메모리 데이터 복구 (중복 제거, 로그 재정렬)

수동

wasurenagusa-spec-update

사양 문서 자동 업데이트

cron / systemd 타이머

wasurenagusa-consolidate-all

모든 활성 프로젝트에 대해 통합 실행

수동 / 스케줄러

wasurenagusa-scheduler

야간 통합 스케줄러 설치/제거/상태 확인

수동


출력 모드

wasurenagusa는 SessionStart 훅에 대해 두 가지 출력 모드를 지원하며, .wasurenagusa/config.json을 통해 프로젝트별로 구성할 수 있습니다.

모드

설명

최적 대상

injection (기본값)

세션 시작 시 전체 메모리 텍스트 주입

서브 에이전트가 없는 환경 (Cursor, Windsurf 등)

agent

세션 시작 시 최소 인덱스 주입 + 사용자 메시지마다 메모리 회상 알림. 서브 에이전트를 통해 필요 시 상세 정보 검색

Claude Code + 에이전트 팀

구성

프로젝트의 .wasurenagusa/config.jsonoutputMode를 추가하세요:

{
  "outputMode": "agent"
}

파일이 없거나 outputMode가 설정되지 않은 경우 기본값은 "injection"입니다 (완전한 하위 호환성).

에이전트 모드를 위한 권장 CLAUDE.md 규칙

Claude Code 에이전트 팀과 함께 "agent" 모드를 사용할 때, 프로젝트의 CLAUDE.md에 다음 규칙을 추가하세요:

- Read/write memories via sub-agents (memory_search / memory_get_detail / memory_save)
- Do not bring raw memory data into the main context
- When system-reminder suggests memory recall, spawn a sub-agent to run memory_search and return summary only

고급 기능

벡터 메모리 계층

wasurenagusa는 로컬 임베딩으로 구동되는 생물학적 영감을 받은 메모리 시스템을 도입합니다. 모든 메모리는 384차원 벡터로 변환되어 키워드 매칭을 훨씬 뛰어넘는 의미 기반 검색을 가능하게 합니다.

코사인 거리 임계값을 가진 3계층 아키텍처:

계층

임계값

사용 사례

단기

≤ 0.2

매우 관련성 높음 — 세션 시작 시 자동 주입

중기

≤ 0.45

컨텍스트 관련 — memory_search 중 노출

장기

≤ 0.7

느슨하게 관련됨 — 발견 가능하지만 선제적으로 표시되지 않음

자동 승격: 메모리가 벡터 검색을 통해 검색될 때마다 접근 횟수가 증가합니다. 5회 검색 후 메모리는 자동으로 intensity: 5로 승격되어, 자주 필요한 지식이 통합 시 최대 가중치를 받도록 보장합니다. 오랫동안 휴면 상태였던 메모리는 관련성에 의해 "깨어날" 수 있으며 반복적인 접근을 통해 결국 최고 강도를 얻게 됩니다.

작동 방식:

memory_save
  → Text → local inference (Hugging Face Transformers) → embedding → SQLite (sqlite-vec)

memory_search "authentication setup"
  → Full-text search (FTS5, Japanese support) ─┐
  → Embed query → vector similarity search     ─┤→ merge, deduplicate → results
                                                └→ increment access count
                                                   → auto-promote if threshold met

SessionStart Hook
  → Embed project name → short-tier search → inject related memories

외부 API 불필요 — 임베딩은 @huggingface/transformers를 통해 로컬에서 생성됩니다. 데이터는 벡터 인덱싱을 위해 sqlite-vec과 함께 SQLite에 저장됩니다. 완전히 오프라인으로 작동합니다.

v1에서 자동 마이그레이션 — 기존 Markdown 기반 메모리 파일은 첫 실행 시 SQLite로 자동 마이그레이션됩니다. 수동 단계가 필요 없습니다.

스마트 태그 검색

스마트 태그 검색은 데이터를 삭제하거나 잊어버리지 않고도 세 가지 메커니즘을 통해 검색 정밀도를 향상시킵니다:

  1. 저장 시 가중치 태그 강화 — 메모리를 저장할 때 LLM이 설명 태그를 생성하고 각각에 가중치(0.0-1.0)를 할당합니다. 포트 번호나 API 엔드포인트 같은 구체적인 사실은 높은 가중치를 받고, 일반적인 카테고리는 낮은 가중치를 받습니다.

  2. 테마 변경 시 백그라운드 재태그 지정 — 새로운 주제가 감지되면 백그라운드 작업자가 관련 과거 항목의 태그를 업데이트하여 새로운 컨텍스트 하에서도 검색 가능하도록 유지합니다.

  3. 복합 점수 — 검색 결과는 최신성, 태그 가중치, 접근 빈도를 혼합하여 순위가 매겨지며, 가장 관련성 높은 메모리를 먼저 노출합니다.

모든 메모리는 전체 충실도로 보존됩니다. 스마트 태그 검색은 *

Install Server
A
license - permissive license
A
quality
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

  • A
    license
    Not graded
    quality
    D
    maintenance
    A self-hosted MCP server that provides AI assistants with a shared, persistent SQLite-backed memory for storing and retrieving project context, decisions, and discoveries. It enables cross-session continuity and team-wide knowledge sharing to keep AI coding tools aligned and informed.
    3
    MIT
  • A
    license
    B
    quality
    B
    maintenance
    An MCP server that gives AI assistants persistent memory across sessions. It stores project context, decisions, and progress in structured markdown files as well as a knowledge graph and sequential thinking for better memory storage.
    36
    37
    1
    MIT
  • A
    license
    A
    quality
    A
    maintenance
    A local MCP server that gives AI assistants a long-term memory by capturing sessions verbatim and surfacing relevant context automatically.
    14
    794
    MIT

View all related MCP servers

Related MCP Connectors

  • Cloud-hosted MCP server for durable AI memory

  • Driflyte MCP server which lets AI assistants query topic-specific knowledge from web and GitHub.

  • An MCP memory server. One memory your agents share — across models, devices and apps.

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/tsutushi0628/wasurenagusa-mcp'

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