Home›Claude / Claude Code›Claudeの記憶を「メモ帳・日記・本棚」の3層に分ける — dejavu というOSSを作りました
Claudeの記憶を「メモ帳・日記・本棚」の3層に分ける — dejavu というOSSを作りました

Claudeの記憶を「メモ帳・日記・本棚」の3層に分ける — dejavu というOSSを作りましたdejavu is an open-source MCP server that organizes Claude's memory into three…

元記事を読むRead original articleqiita.com(新しいタブで開きます)(opens in a new tab)
AI2 点サマリ2 key points
  • Claude向けMCPサーバー「dejavu」は、AIの記憶を短期・中期・長期の3層構造で管理するOSSで、会話の継続性と知識の永続化を実現する。
  • セッションをまたいだ文脈保持が容易になり、より一貫性のあるAIアシスタント体験が得られる。
  • dejavu is an open-source MCP server that organizes Claude's memory into three layers—notepad, diary, and bookshelf—representing short-, mid-, and long-term storage.
  • This structured approach improves context retention across sessions and enables more consistent AI assistant interactions.

本ページの本文と要約は AI による自動生成です。日本語版と英語版は言語ごとに独立して生成されるため、表現や詳しさが異なる場合があります。正確性は元記事 (qiita.com) をご確認ください。The body and summaries are AI-generated independently for each language, so wording and detail may differ. Verify accuracy at the original source (qiita.com).

要約と収集メタデータに基づく AI 解説。元記事全文の転載・翻訳ではありません。AI explainer based on the summaries and collected metadata, not a copy or translation of the full source article.

大規模言語モデルは会話が終わるたびに文脈を忘れてしまう。この「記憶の断絶」を補うオープンソースの試みとして、Claude向けのMCPサーバー「dejavu」が公開された。AIの記憶を短期・中期・長期の3層に整理し、セッションをまたいだ一貫性のある対話を目指すツールだ。

dejavuの特徴は、記憶を役割ごとに分けた比喩的な設計にある。短期記憶は「メモ帳(notepad)」として直近のやり取りや作業中のメモを保持し、中期記憶は「日記(diary)」として時系列の出来事や経緯を記録する。そして長期記憶は「本棚(bookshelf)」として、繰り返し参照される知識や確立した情報を永続的に格納する。人間の記憶モデルになぞらえたこの階層構造により、AIが「今何をしているか」「これまで何があったか」「変わらない前提は何か」を切り分けて扱えるようになる。

背景にあるのはMCP(Model Context Protocol)だ。これはAnthropicが提唱した、AIモデルと外部ツールやデータソースを標準的な方法で接続するための仕組みで、対応するサーバーを追加することでClaudeなどの機能を拡張できる。dejavuもそうしたMCPサーバーの一つで、外部に記憶領域を持たせることで、モデル本体のコンテキストウィンドウの制約を補う狙いがあると見られる。

記憶の永続化はAIアシスタント分野で共通の課題となっている。OpenAIはChatGPTに会話をまたいで情報を覚える「メモリ」機能を導入しており、各社が独自のアプローチを模索している。dejavuのようなOSSツールは、こうした機能をユーザー自身が管理・カスタマイズできる点に価値があり、データの保存場所や扱いを自分でコントロールしたい利用者に向く可能性がある。

一方で、記憶をどの層に振り分けるかの判断精度や、蓄積した情報の検索・整理の効率は、実運用での使い勝手を左右する要素になりそうだ。導入を検討する際は、自身のワークフローに合うか、プライバシーやデータ管理の観点で問題がないかを見極めることが重要になるだろう。

dejavu is a newly published open-source Model Context Protocol (MCP) server that gives Anthropic's Claude a structured, persistent memory divided into three distinct layers. The project matters because large language models remain fundamentally stateless between conversations, and their context windows, though growing, are finite. Tools that let an assistant remember earlier work, stated preferences, and accumulated knowledge address one of the most common frustrations for people who use Claude for ongoing projects rather than one-off queries.

The core idea behind dejavu is a memory hierarchy that its author describes with everyday metaphors: a notepad, a diary, and a bookshelf. The notepad represents short-term storage for the immediate working context—transient notes relevant to the current task. The diary sits in the middle as medium-term memory, capturing session-by-session records that give continuity across days or weeks. The bookshelf serves as long-term storage for durable knowledge and reference material that should persist indefinitely. Separating memory this way is intended to mirror how people naturally distinguish between fleeting reminders, journaled experiences, and consolidated knowledge.

This layered design echoes established concepts from both computer science and cognitive psychology. It resembles the memory hierarchy in operating systems, where fast, small caches sit above slower, larger stores, and it parallels psychological models that separate short-term, working, and long-term memory. The practical benefit is that an assistant can decide what to keep close at hand versus what to archive, rather than treating all remembered information as an undifferentiated pool. This can help manage the trade-off between retrieval relevance and context-window cost.

Understanding dejavu requires a little background on MCP itself. The Model Context Protocol is an open standard that Anthropic introduced in late 2024 to standardize how AI applications connect to external tools, data sources, and services. An MCP server exposes capabilities—such as reading files, querying a database, or, in this case, storing and recalling memories—that an MCP client like Claude Desktop or other compatible applications can call. Because the protocol is open, developers can build servers in various languages and share them, and a growing ecosystem of community servers now covers everything from GitHub access to web search. dejavu fits this pattern as a specialized memory server.

In use, a memory-oriented MCP server typically works by letting the model write entries during a conversation and retrieve them later, so that context carried over from a previous session does not have to be pasted in manually. By assigning entries to the appropriate layer, dejavu appears designed to let Claude surface the most relevant material without overloading the prompt with everything it has ever recorded. The exact storage mechanism, retrieval strategy, and whether it relies on vector embeddings or simpler keyword lookup would depend on the implementation details in the repository.

dejavu enters a crowded and fast-moving space. Anthropic has been adding native memory features to Claude, and OpenAI offers memory in ChatGPT, while dedicated projects such as Mem0, Letta (formerly MemGPT), and Zep tackle persistent agent memory with vector stores and structured recall. Many of these systems similarly borrow the idea of tiered or hierarchical memory. An open-source, MCP-native option is notable because it can run locally, keeps data under the user's control, and integrates with any MCP-compatible client rather than being tied to a single vendor's product.

Prospective users should weigh a few practical considerations. Persistent memory raises questions about where data is stored, how it is secured, and how outdated or incorrect entries are pruned, since a memory that accumulates errors can degrade rather than improve an assistant's usefulness. As with most early-stage open-source tools, the maturity, documentation, and long-term maintenance of the project are worth checking before relying on it for important workflows.

For developers experimenting with Claude as a long-running collaborator, dejavu offers a conceptually clean approach to a genuine problem. Whether the three-layer metaphor proves more effective in practice than flat or purely vector-based memory will likely become clearer as users test it across real projects. Even so, the framing is an accessible entry point into the broader challenge of giving AI assistants a reliable sense of continuity, and it reflects a wider trend toward treating memory as a first-class component of practical AI systems rather than an afterthought.

ポコとTECHガイドPoko & TECH Guide

ポコと当サイトのTECHガイドが、記事の要約と収集した情報から読みどころを語るAI生成の対話です。Poko and TECH Dashboard's own TECH Guide discuss the article's highlights in an AI-generated conversation based on its summary and collected source details.

  1. ポコPokodejavuがClaudeの記憶を「メモ帳・日記・本棚」に分けるって、それぞれ何を覚えるの?dejavu splits Claude’s memory into a notepad, diary, and bookshelf. What does each one remember?
  2. TECHガイドTECH Guide簡単に言うとじゃな、記事では短期・中期・長期の記憶に対応し、情報を3層で整理する仕組みじゃよ。Simply put, the article says they represent short-, mid-, and long-term memory, organizing information into three layers.
  3. ポコPokoへえ、それって何がうれしいの?会話を終えても、前の話を覚えやすくなるってこと?Oh, nice! What’s the benefit? Does it make it easier for Claude to remember earlier context after a conversation ends?
  4. TECHガイドTECH Guideその理解でよいぞ。記事によれば、セッションをまたいで文脈を保ちやすくなり、知識も永続化できるそうじゃ。That’s the idea. According to the article, it helps retain context across sessions and preserve knowledge over time.
  5. ポコPokoつまり、記憶を期間別に整理して、Claudeとのやり取りをもっと一貫させるOSSなんだね!So it’s open-source software that sorts memory by time span and makes interactions with Claude more consistent!
  6. TECHガイドTECH Guideそうじゃな。記事の見どころは、この3層構造で会話の継続性と一貫性をどこまで高められるかじゃよ。Exactly. The key point to watch is how much this three-layer structure can improve continuity and consistency in conversations.
記事情報・収集記録Article details & collection record
出典Source
Qiita ClaudeコミュニティCommunity
公開日時 (JST)Published (JST)
収集日時 (JST)Collected (JST)
配信形式Format
ブログBlog
原文言語Source language
JA
重要度の位置づけImportance in this lane
MediumMedium priority(Claude / Claude Code 174件中、同等以上 138件)(138 of 174 Claude / Claude Code entries are equal or higher)
出典の平均重要度(掲載直近 30 件・最大 30 件)Source average (last 30 listed, up to 30)
2.0 / 31=情報 · 2=中 · 3=高1=Info · 2=Medium · 3=High
情報の寿命Half-life
中期 (チュートリアル)Medium-term (tutorial)

🧡Claude / Claude Code の他の記事More from Claude / Claude Codeもっと見る →View more →

ページ上部へScroll to top