whimsicality-db
Officialwhimsicality-db
長時間実行エージェントのためのワークジャーナル。SQLiteバックエンドのMCPサーバーで、セッション追跡、イベントログ、FTS5検索を備えています — 複数のコンテキストウィンドウにまたがって作業するエージェントが、決定事項を思い出し、過去のイベントを検索し、自分の進捗を追跡できるようにします。
なぜこれが存在するのか
長期的な作業を行うエージェントには問題があります。コンテキストウィンドウが満杯になると、自分が何を決定したか、何を試したか、何が残っているかを追跡できなくなります。会話履歴がスクロールアウトし、エージェントはすでに到達した結論を再導出することになります。
whimsicality-db は、永続的なワークジャーナルでこれを解決します:
セッションを作成 タスク用:
db_session_create({ id: "refactor-auth", name: "Refactor auth system" })イベントを記録 発生時に:
db_event_log({ session_id: "refactor-auth", event_type: "decision", content: "Chose JWT over session cookies for stateless auth" })過去の決定を検索:
db_search({ query: "auth decision", collections: ["events"] })コンテキストウィンドウをまたいでTODOを追跡:
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" })メモリエントリ、ドキュメント、圧縮キャッシュチャンクを統合エントリテーブルにインポートします。
ツール(合計21、スキーマ~2,700トークン)
メモリ — キーと値のファクト(4)
Tool | Description |
| キーと値のファクトを保存します。名前空間付き。 |
| キーで値を取得します。 |
| 名前空間内のキーを一覧表示します。 |
| メモリキーを削除します。 |
エントリ — 自動圧縮付き統合テキストストア(5)
古いdocs、cache、contextコレクションを置き換えます。小さなテキストはそのまま保存され、FTS5でインデックス化されます。大きなテキスト(>64KB)はbrotliで自動圧縮され、読み取り時にページングされます。タグとソースはオプションです。
Tool | Description |
| テキストを保存します。大きい場合は自動圧縮。タグとソースはオプション。 |
| IDでエントリを読み取ります。offset+lengthによるページングをサポート。 |
| エントリを一覧表示します。タグフィルタはオプション。 |
| 指定されたタグのいずれかに一致するエントリを取得します。 |
| エントリを削除します。 |
TODO — コンテキストウィンドウをまたいだタスク追跡(4)
Tool | Description |
| 優先度、タグ、セッションリンク付きでTODOを追加します。 |
| TODOを一覧表示します。ステータス/タグ/セッションでフィルタリング。 |
| TODOを更新します。空文字列でフィールドをクリア。 |
| TODOを削除します。 |
セッション — 長期タスクのコンテナ(3)
Tool | Description |
| 長期タスク用のセッションを作成または更新します。 |
| セッションを一覧表示します。オプションのステータスフィルタ。idを渡すと1件取得。 |
| セッションを更新します。空文字列で名前/説明をクリア。 |
イベント — セッションログ(2)
Tool | Description |
| セッション内のイベントを記録します。FTS5で検索可能。 |
| イベントを一覧表示します。セッション/タイプでフィルタリング。 |
検索 + 統計 + インポート(3)
Tool | Description |
| コレクション全体での統合FTS5検索。BM25スコア付きのランク付けされた結果を返します。 |
| データベース統計:件数とサイズ。 |
| 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 }) は、メモリ、エントリ、TODO、イベントを1回の呼び出しで検索します。結果はマージされ、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を統合したエントリテーブル)。
どのコレクションをいつ使うか
メモリ: 正確なキーで呼び出したい小さなキーと値のペア(ファクト、設定)
エントリ: 任意のテキストコンテンツ — ドキュメント、参照、大きなコンテンツ。自動圧縮、タグはオプション、ページング読み取り
TODO: モデルがコンテキストウィンドウをまたいで追跡しているタスク
セッション: 長期タスクのコンテナ(イベントとTODOをグループ化)
イベント: セッション内の時系列ログ(決定、マイルストーン、エラー)
設定
Variable | Default | Description |
|
| データベースストレージディレクトリ |
開発
git clone https://github.com/WhimsicalityLabs/Whimsicality-DB.git
cd Whimsicality-DB
npm install
npm test67テスト:64のインプロセステスト(ストア、検索、エントリ、TODO、セッション、イベント、バリデーション、インポート)+ 3のbinスモークテスト(実際の bin/whimsicality-db.js エントリポイントを起動)。
ライセンス
MIT
This server cannot be installed
Maintenance
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
- 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
- AlicenseBqualityAmaintenanceProvides 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.33MIT
- AlicenseAqualityCmaintenanceProvides persistent session memory for AI assistants, enabling them to store, search, and retrieve conversation summaries across sessions via the Model Context Protocol.10MIT
- AlicenseNot gradedqualityAmaintenanceEnables persistent multimodal context storage for LLM agents with thread-based scoping, metadata filtering, and hybrid search capabilities.8Elastic 2.0
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.
Latest Blog Posts
- Who's Calling? MCP Hosts Are an Identity Blind Spot (And the Spec Knows It)By Om-Shree-0709 on .mcpAgent IdentityOAuth 2.1
- Your AI Chatbot Just Exposed Your CEO's Salary to an InternBy Om-Shree-0709 on .Agent IdentityMCP SecurityOAuth Delegation
- Why MCP Servers Need Execution Sandboxing (And Why Your Current Stack Isn't Enough)By Om-Shree-0709 on .Agentic AiPrompt InjectionWebAssembly
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