Chatvault

io.github.CloudCorpRecords由 GitHub 帳號 CloudCorpRecords 發布v0.1.0更新於 Nov 7, 2026

Search and read your local AI chat-history corpus: full-text search, transcripts, inventory.

概覽

AI 產生的概覽

搜尋並讀取本機的 AI 聊天紀錄 JSON 語料庫,讓助理在不把歷史外傳的前提下查找、重開與盤點過往對話。

可以做什麼
  • 以全文搜尋對話,支援平台、標題、日期與比對模式篩選,回傳排序後的片段
  • 依 id 讀取完整對話逐字稿,或取出某則訊息中保留的圖片
  • 依時間順序或最近更新列出對話,並分頁瀏覽含 id、平台、標題與指紋的精簡清單
  • 回報語料庫狀態:最近一次收到資料的時間與對話數量
  • 新增或更新對話,並記錄一則長期記憶事實(預設停用,待審閱後啟用)
適用情境
適合把匯出的 AI 聊天紀錄以 JSON 形式保存在自己電腦上,並希望助理檢索這些紀錄、重開先前的討論,或在回答前確認既有歷史的情況。它是本機索引,而非連接線上聊天服務的介面。
執行需求
透過 npx 或 Docker 以 stdio 在本機執行。選用環境變數 CHATVAULT_CORPUS_DIR 指定語料庫資料夾(預設 ~/.chatvault/corpus);選用 CHATVAULT_READ_ONLY=1 可停用兩個寫入工具。不需要帳號、API 金鑰或網路連線。
安裝前請注意
語料庫包含私密聊天紀錄,助理可讀取其中的對話與保存的圖片。有兩個工具會寫入語料庫:save_conversation 新增或更新對話,save_memory 將事實附加到 memories.json;若只想唯讀使用,請設定 CHATVAULT_READ_ONLY=1。儲存的記憶預設停用,需經你審閱後才會啟用。

安裝

在 SourceWeft 中

  1. 開啟 儀表板中的 Chatvault,將其新增到工作區。
  2. 為需要使用其工具的對話啟用該服務。

Desktop only,透過 STDIO。 STDIO 服務會啟動本機處理程序,因此需要 SourceWeft 桌面主機。

其他 MCP 客戶端

參照 儲存庫 中的啟動說明。

README

chatvault

Your past AI chats are already on your disk. chatvault lets an MCP client search them, reopen them, and take stock of them — without any of that history leaving the machine. There is no account, no upload and no network call: the server reads a folder of JSON files that you control.

Configuration

  • CHATVAULT_CORPUS_DIR (optional) — where the corpus lives. Defaults to ~/.chatvault/corpus.
  • CHATVAULT_READ_ONLY (optional) — set to 1 to make the two write tools (save_conversation, save_memory) refuse with an error naming the mode. Reads keep working.

Corpus layout

One JSON file per conversation, plus memories.json:

json
{  "id": "abc",  "platform": "claude",  "title": "Planning a trip",  "updatedAt": "2026-10-01T12:00:00.000Z",  "messages": [    { "role": "user", "text": "Where should we go?" },    { "role": "assistant", "text": "Some ideas..." }  ]}

A message may also carry formattedText and images ({mime, dataBase64} entries holding retained image bytes). A conversation may carry a localTitle. An empty or missing corpus directory is fine: searches and lists simply come back empty.

Every conversation has a content fingerprint, fp2: followed by a SHA-256 hex digest. The digest covers the title, the local title when set, and every message in order — its index, role, text, formatted text when present, and each image's mime and retained bytes. Timestamps and derived fields are left out, so re-saving the same content keeps the same fingerprint while a rename or an edited message changes it. The exact serialisation (canonical JSON with sorted keys) is a labelled reconstruction.

Tools

  • search_conversations — tokenised full-text search over titles and message text. Required: query. Optional: platform (exact match), title (substring), date_from and date_to (against updatedAt), and match_mode — any (default), all, or phrase. Results are ranked by match count, then recency, and carry snippets.
  • get_conversation_image — the stored image for a message. Required: conversation_id, message_index, image_index. Returns the mime type and base64 bytes; a missing image is an honest error.
  • get_conversation — the full transcript for id, with a contentFingerprint field.
  • list_conversations — conversations by updatedAt. Optional order (newest_first default, or oldest_first) and limit.
  • list_recent — most recently updated conversations with title, a short summary (an excerpt of the first user message — a reconstruction), and platform. Optional limit.
  • conversation_inventory — a snapshot-paged inventory of compact {id, platform, title, fingerprint} items. Call with no arguments to start a scan, then pass each page's nextCursor back as cursor. Pages hold at most 100 items; limit can make them smaller. At most eight snapshots are held, and an unknown or expired cursor is an error asking you to start a new scan.
  • corpus_status — {lastReceivedAt, count} for the corpus; lastReceivedAt is null when the corpus is empty.
  • save_conversation — add or update a conversation. Required: platform, title, messages. When id is omitted one is assigned (chatvault:<n>). Returns {id, fingerprint}.
  • save_memory — store a durable fact from text. The record is appended to memories.json turned off (enabled: false) until you review and enable it, and the stored record is returned.

Search and list results also carry a corpus block — {lastReceivedAt, count} — so a caller can tell how fresh and how large the corpus behind an answer is.

CLI

bash
npx @reneturcios/chatvault corpus_status '{}'npx @reneturcios/chatvault search_conversations '{"query":"trip"}'npx @reneturcios/chatvault --version

Output is the tool's result text. Exit codes: 0 on success, 1 on an error result, 2 on a usage error.

MCP server

bash
npx -y @reneturcios/chatvault mcp

MCP client config:

json
{  "mcpServers": {    "chatvault": {      "command": "npx",      "args": ["-y", "@reneturcios/chatvault", "mcp"],      "env": {        "CHATVAULT_CORPUS_DIR": "/path/to/corpus"      }    }  }}

Docker

bash
docker run -i -v /path/to/corpus:/corpus -e CHATVAULT_CORPUS_DIR=/corpus ghcr.io/cloudcorprecords/chatvaultdocker run --rm ghcr.io/cloudcorprecords/chatvault --version

Development

bash
npm installnpm run build   # tsc -> dist/npm test        # tsx --test test/*.test.ts (temp corpus dirs, no network)npm run dev     # run the CLI from source

License

MIT — Copyright (c) 2026 Rene Turcios

來源:README.md,提交 e985e46

工具

9

search_conversations

Full-text search across every past conversation. Returns ranked matches with highlighted snippets. Supports platform, title, date_from/date_to filters and a match_mode (any / all / phrase).

輸入參數query必填titledate_toplatformdate_frommatch_mode

get_conversation_image

Read a retained local raster image using the message and image index returned by get_conversation. No private provider URL fetching or OCR.

輸入參數image_index必填message_index必填conversation_id必填

get_conversation

Fetch the full transcript of one conversation by its id (the id field from search results). The response carries contentFingerprint, the current fingerprint of the returned transcript.

輸入參數id必填

list_conversations

List conversations by chronology, including oldest-first for questions about the user's earliest chat.

輸入參數limitorder

list_recent

List the most recently updated conversations with title, summary, and platform.

輸入參數limit

conversation_inventory

Paginated, read-only inventory of every conversation as compact metadata: id, platform, title, and a versioned content fingerprint. Call with no arguments to start a scan, then pass each page's nextCursor back as cursor until a page comes back without one. Pages hold up to 100 items.

輸入參數limitcursor

corpus_status

Report when the corpus last received data and how many conversations it holds.

無需輸入參數。

save_conversation

Add or update a conversation in the corpus, so MCP is also an ingestion route.

輸入參數idtitle必填messages必填platform必填

save_memory

Record a durable fact (a decision, preference, or correction) worth carrying into later chats. Stored turned off until the user reviews and enables it.

輸入參數text必填

版本歷史

1
  1. v0.1.0最新Nov 4, 2026

評分

已滿足適用檢查項的 90%

該評分衡量此收錄條目的完整程度,依據註冊中心條目、端點與公開來源計算得出。它不是對伺服器本身的評價,也不表示伺服器安全或目前可用:可連通性是帶日期的檢查結果,評分也不包含安裝量或使用者評價。

  • 近 30 天內可連通25 分
  • 已宣告認證方式10 分

    請在註冊中心條目中宣告憑證請求標頭,或保持端點能夠回應探測,以便判定其認證方式。

  • 已列出工具必需15 分
  • 描述必需15 分
  • 圖示10 分
  • 文件15 分
  • 授權條款10 分