Skip to main content
Glama
WhimsicalityLabs

whimsicality-db

Official

whimsicality-db

장기 실행 에이전트를 위한 작업 일지. SQLite 기반 MCP 서버로, 세션 추적, 이벤트 로깅, FTS5 검색을 제공합니다. 여러 컨텍스트 창에 걸쳐 작업하는 에이전트가 결정 사항을 기억하고, 과거 이벤트를 검색하며, 자신의 진행 상황을 추적할 수 있게 해줍니다.

왜 만들어졌나

장기 작업을 수행하는 에이전트에게는 문제가 있습니다. 컨텍스트 창이 가득 차면, 자신이 무엇을 결정했고, 무엇을 시도했으며, 무엇이 남았는지 잃어버립니다. 대화 기록이 화면 밖으로 사라지고, 에이전트는 이미 도달했던 결론을 다시 도출하게 됩니다.

whimsicality-db는 영구 작업 일지로 이 문제를 해결합니다:

  1. 세션 생성: db_session_create({ id: "refactor-auth", name: "Refactor auth system" })

  2. 이벤트 로깅: db_event_log({ session_id: "refactor-auth", event_type: "decision", content: "Chose JWT over session cookies for stateless auth" })

  3. 과거 결정 검색: db_search({ query: "auth decision", collections: ["events"] })

  4. 컨텍스트 창 간 할 일 추적: db_todo_add({ title: "Implement JWT verification", session_id: "refactor-auth" })

컨텍스트 창이 재설정된 후 에이전트가 돌아오면, 세션 로그를 검색하여 전체 대화를 다시 읽지 않고도 중단했던 지점부터 작업을 재개합니다.

Related MCP server: MCP Tools

빠른 시작

{
  "mcpServers": {
    "whimsicality-db": {
      "command": "npx",
      "args": ["whimsicality-db"]
    }
  }
}

데이터는 ~/.whimsicality/db-storage/whimsicality.db에 저장됩니다(SQLite, WAL 모드). WHIMSICALITY_DB_DIR을 설정하여 경로를 변경할 수 있습니다.

whimsicality-mcp에서 마이그레이션

더 이상 사용되지 않는 whimsicality-mcp 패키지를 사용했다면, 데이터를 가져오세요:

db_import({ source_dir: "~/.whimsicality/mcp-storage" })

메모리 항목, 문서, 압축된 캐시 청크를 통합 entries 테이블로 가져옵니다.

도구 (총 21개, 스키마 약 2,700 토큰)

메모리 — 키-값 사실 (4)

도구

설명

db_memory_set

키-값 사실을 저장합니다. 네임스페이스로 구분됩니다.

db_memory_get

키로 값을 불러옵니다.

db_memory_list

네임스페이스의 키를 나열합니다.

db_memory_delete

메모리 키를 삭제합니다.

항목 — 자동 압축이 포함된 통합 텍스트 저장소 (5)

기존의 docs, cache, context 컬렉션을 대체합니다. 작은 텍스트는 그대로 저장되고 FTS5로 인덱싱됩니다. 큰 텍스트(64KB 초과)는 brotli로 자동 압축되고 읽을 때 페이지 단위로 제공됩니다. 태그와 소스는 선택 사항입니다.

도구

설명

db_entry_save

텍스트를 저장합니다. 큰 경우 자동 압축됩니다. 태그와 소스는 선택 사항입니다.

db_entry_read

ID로 항목을 읽습니다. offset+length로 페이지 단위 지원.

db_entry_list

항목을 나열합니다. 선택적 태그 필터.

db_entry_by_tags

주어진 태그 중 하나라도 일치하는 항목을 가져옵니다.

db_entry_delete

항목을 삭제합니다.

할 일 — 컨텍스트 창 간 작업 추적 (4)

도구

설명

db_todo_add

우선순위, 태그, 세션 링크와 함께 할 일을 추가합니다.

db_todo_list

할 일을 나열합니다. 상태/태그/세션으로 필터링.

db_todo_update

할 일을 업데이트합니다. 빈 문자열은 필드를 지웁니다.

db_todo_delete

할 일을 삭제합니다.

세션 — 장기 작업 컨테이너 (3)

도구

설명

db_session_create

장기 작업을 위한 세션을 생성하거나 업데이트합니다.

db_session_list

세션을 나열합니다. 선택적 상태 필터. id를 전달하면 하나를 가져옵니다.

db_session_update

세션을 업데이트합니다. 빈 문자열은 이름/설명을 지웁니다.

이벤트 — 세션 로그 (2)

도구

설명

db_event_log

세션에 이벤트를 기록합니다. FTS5 검색 가능.

db_event_list

이벤트를 나열합니다. 세션/유형으로 필터링.

검색 + 통계 + 가져오기 (3)

도구

설명

db_search

컬렉션 전체에 걸친 통합 FTS5 검색. BM25 점수로 순위가 매겨진 결과를 반환합니다.

db_stats

데이터베이스 통계: 개수와 크기.

db_import

whimsicality-mcp 저장소 디렉터리에서 데이터를 가져옵니다.

아키텍처

┌──────────────────────────────────────────────────────────┐
│ SQLite Database (WAL mode)                               │
│                                                          │
│  memory       ─── memory_fts (FTS5)                     │
│  entries      ─── entries_fts (FTS5)                    │
│    ├─ small:  content_text (plain, FTS5-indexed)        │
│    └─ large:  content (brotli BLOB) + title (FTS5)      │
│  entry_tags   ── normalized tag join table               │
│  todos        ─── todos_fts  (FTS5)                     │
│  todo_tags    ── normalized tag join table               │
│  sessions     (no FTS — small, direct query)            │
│  events       ─── events_fts (FTS5)                     │
│                                                          │
│  Triggers keep FTS5 indexes in sync automatically.      │
│  WAL mode: concurrent readers + 1 writer.               │
│  CHECK constraints on status columns.                   │
│  Schema version migrations (v1→v2→v3).                  │
└──────────────────────────────────────────────────────────┘

통합 검색

db_search({ query, collections, top_k })는 한 번의 호출로 메모리, 항목, 할 일, 이벤트를 검색합니다. 결과는 병합되어 BM25 점수(높을수록 좋음)로 순위가 매겨집니다. 각 결과에는 컬렉션, ID, 점수, 그리고 해당되는 경우 일치 항목 중심의 발췌문이 포함됩니다.

자동 압축

64KB를 초과하는 항목은 자동으로 brotli 압축됩니다. 제목/요약은 FTS5 인덱싱을 위해 일반 텍스트로 저장됩니다. db_entry_read는 offset+length 페이지 단위로 요청 시 압축을 해제합니다.

네이티브 모듈 참고 사항

이 패키지는 네이티브 Node.js 애드온인 better-sqlite3에 의존합니다. npm install은 일반적으로 사전 빌드된 바이너리를 자동으로 찾습니다. 그렇지 않은 경우 node-gyp가 소스에서 컴파일합니다 — Python 3와 C++ 컴파일러가 필요합니다. Node 22.5+에는 FTS5가 내장된 node:sqlite가 포함되어 있어, 향후 의존성 없는 경로가 될 수 있습니다.

스키마 마이그레이션

schema_version 테이블은 데이터베이스 스키마 버전을 추적합니다. 서버는 열 때 버전을 읽고 마이그레이션을 순차적으로 적용합니다: v1→v2(태그 조인 테이블), v2→v3(docs/cache/context를 병합한 통합 entries 테이블).

어떤 컬렉션을 언제 사용할까

  • 메모리: 정확한 키로 불러오고 싶은 작은 키-값 쌍(사실, 설정)

  • 항목: 모든 텍스트 콘텐츠 — 문서, 참조 자료, 대용량 콘텐츠. 자동 압축, 선택적 태그, 페이지 단위 읽기

  • 할 일: 모델이 컨텍스트 창 간에 추적하는 작업

  • 세션: 장기 작업 컨테이너(이벤트와 할 일을 그룹화)

  • 이벤트: 세션 내 시간순 로그(결정, 이정표, 오류)

구성

변수

기본값

설명

WHIMSICALITY_DB_DIR

~/.whimsicality/db-storage

데이터베이스 저장 디렉터리

개발

git clone https://github.com/WhimsicalityLabs/Whimsicality-DB.git
cd Whimsicality-DB
npm install
npm test

67개 테스트: 64개 인프로세스(저장소, 검색, 항목, 할 일, 세션, 이벤트, 검증, 가져오기) + 3개 bin 스모크(실제 bin/whimsicality-db.js 진입점을 실행).

라이선스

MIT

A
license - permissive license
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
    B
    quality
    A
    maintenance
    Provides context management and todo persistence with AI second opinions from ChatGPT and Claude. Enables saving code snippets, conversations, and todos across sessions with full-text search capabilities.
    3
    3
    MIT
  • A
    license
    A
    quality
    C
    maintenance
    Provides persistent session memory for AI assistants, enabling them to store, search, and retrieve conversation summaries across sessions via the Model Context Protocol.
    10
    MIT
  • A
    license
    Not graded
    quality
    A
    maintenance
    Enables persistent multimodal context storage for LLM agents with thread-based scoping, metadata filtering, and hybrid search capabilities.
    8
    Elastic 2.0

View all related MCP servers

Related MCP Connectors

  • Persistent memory for AI agents. Search, store, and recall across sessions.

  • Universal memory for AI agents and tools. Save, organize and search context anywhere.

  • 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/WhimsicalityLabs/Whimsicality-DB'

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