Developers2026-09-05·9 min read

Turn Your Claude Conversations into a Knowledge Base Your Agent Can Search

If you live in Claude Code, your best work is trapped. Every session — the debugging arc that finally found the bug, the architecture trade-offs you settled, the working regex — is written to machine-local JSONL files under `~/.claude/projects/` that no other tool indexes, that don’t follow you to another machine, and that your agent can’t see in the next session. Anthropic’s own issue tracker is full of requests for cross-machine session transfer and portable memory. Meanwhile, your browser conversations with Claude face the same problem one level up: valuable, unsearchable, server-side. This guide shows how to fix both at once: consolidate your Claude conversations into a local Markdown vault with full-text search, then expose it to Claude Code, Cursor, or any MCP client — so the next session starts with everything the last ones learned.

Quick answer

Three steps. (1) The free XWX Exporter extension saves any claude.ai conversation as Markdown; the XWX Backup desktop app batch-imports your whole history — and reads Claude Code’s local sessions too — into ~/.xwx-backup/, one Markdown file per conversation with YAML frontmatter. (2) An SQLite full-text index makes every message searchable in milliseconds across all platforms. (3) The bundled MCP server (xwx-backup-vault-server) gives Claude Code, Cursor, or any MCP client eight tools — list, read, grep, move, and more — over that vault, so your agent can pull prior context instead of starting cold.

Why agent memory is still unsolved (and why it costs you daily)

The local-first design of Claude Code is a feature — until it isn’t:

  • Session transcripts live in `~/.claude/projects/*/*.jsonl`, keyed by machine-local paths. Switch machines, and the history that’s still on disk doesn’t come with you; Anthropic’s issue tracker carries long-running requests for cross-machine session transfer and portable project memory.
  • The desktop app and CLI don’t see the same sessions — each surface discovers conversations its own way, and on-disk transcripts can be invisible to the other surface’s session list.
  • Nothing indexes the content. JSONL is greppable if you enjoy grepping 40 MB of JSON with escaped newlines; there’s no full-text search, no frontmatter, no linking.
  • Browser conversations are a separate silo. The claude.ai half of your work has no local existence at all.

The result is the daily tax: re-explaining context, re-deriving decisions, re-finding the answer from last Tuesday. A knowledge base fixes it only if it’s local, searchable, and reachable from your agent — which is exactly the three properties the rest of this guide builds.

Why Markdown + MCP is the pragmatic architecture

The MCP ecosystem already leans this way — a wave of vault servers (mnemos, vault-mcp, claude-code-vault and others) chose the same shape for good reasons:

PropertyWhy it matters for agent memory
Plain Markdown filesAny tool can read them; nothing is locked in a database; Git-diffable and grep-able forever
YAML frontmatterStructured fields (platform, model, dates, tags) give agents — and Dataview — something to filter on
Full-text indexMillisecond search over everything, across platforms, without vector infrastructure
MCP accessYour agent reads prior context in-session instead of you re-pasting it

XWX Backup adopts the same shape and adds the missing piece at the front: an ingestion pipeline that actually gets your conversations into Markdown — from claude.ai and ten other platforms, with hash-based dedupe and scheduled sync — plus an MCP server preconfigured for that vault.

Step 1: Get the conversations into a local vault

Browser conversations (claude.ai, ChatGPT, Gemini, and more): install the free XWX Exporter extension, then the XWX Backup desktop app (Windows). Pair them once — locally, no passwords involved. Pick platforms and a count, or filter to specific Projects and organizations, and batch-export everything into the vault at ~/.xwx-backup/: one Markdown file per conversation, frontmatter included, already-saved conversations skipped on re-runs. Enable scheduled export and new conversations flow in on their own.

XWX Backup batch export selecting Claude platforms and conversation counts
XWX Backup batch export selecting Claude platforms and conversation counts

Step 2: Bring Claude Code sessions into the same vault

The desktop app’s knowledge-base paths can index local folders — which means your ~/.claude/projects/ transcripts can be read, searched, and cited alongside everything else. Copy or sync the JSONL sessions you care about into the vault structure (or add the folder as a knowledge-base path), and they join the same search index. This is the bridge for the cross-machine problem: sessions from your workstation become searchable on your laptop the moment the vault syncs — no export/import gymnastics, no hand-tarring ~/.claude (which would drag your live credentials along).

The vault is backed by an SQLite full-text index — trigram-based, so CJK text works too. Search matches message content across all platforms at once, returns snippets, and opens conversations in a reader view. Filters narrow by platform, account, date range, tag, and star; tags and stars persist in the frontmatter so external tools see them too.

The practical difference from platform search: ChatGPT and Claude search titles (and often only recent chats), and no platform can see across services. One local index sees all of them — which is why "find that error message from three weeks ago" stops being a 20-minute archaeology dig.

Full-text search across all archived AI conversations in XWX Backup
Full-text search across all archived AI conversations in XWX Backup

Step 4: Give your agent access with the MCP server

xwx-backup-vault-server is an MCP server that exposes the vault to any MCP client — Claude Code, Cursor, Codex CLI, and friends. Install it inside Claude Code:

text
/plugin marketplace add egroup-labs/xwx-backup.work
/plugin install xwx-backup-vault@xwx-backup-plugins

(A standalone installer script is available for other setups — see the project’s MCP README.)

Once connected, the agent gets eight tools over your conversation vault:

ToolWhat the agent can do
list_vault / list_directoryBrowse archived conversations
read_filePull a full prior conversation into context
grep_vaultRegex-search every message — error strings, API names, decisions
move_file / update_file / write_file / delete_fileReorganize the archive, append summaries, curate

A session that starts with "check my vault for the WebSocket reconnect issue" finds the thread from August — code, constraints, and the fix that worked — without you re-typing any of it.

Claude Code session using MCP tools to search the local conversation vault
Claude Code session using MCP tools to search the local conversation vault
tip: Set `XWX_BACKUP_VAULT_PATH` if your vault lives outside the default `~/.xwx-backup/vault` — for example, pointing at the Obsidian-synced subfolder keeps humans and agents on the same copy.

Workflows this unlocks

  • Session continuity across machines — vault on a synced folder; the new machine’s agent reads last week’s context instead of a summary of it.
  • Onboarding a fresh Claude Code instance — "read the last three sessions for this repo" beats a stale MEMORY.md written by hand.
  • Cross-model archaeology — the answer you got from ChatGPT in March and the one from Claude in July sit in one index; grep_vault sees both.
  • Feeding the vault forward — have the agent append a decision summary back into the vault (write_file), so the knowledge base compounds instead of just growing.

What stays on your machine (and what doesn’t)

The entire chain is local: conversations are read through your logged-in browser session, handed to the desktop app over localhost, and written to disk. The search index and MCP server read local files; the MCP tools operate on your disk, not on a remote service. No conversation content touches XWX servers. The usual caveat applies to any knowledge base: it’s only as private as the disk it lives on, so treat ~/.xwx-backup/ like any sensitive folder when choosing cloud sync.

Who this setup is for

  • Claude Code power users tired of cold-starting every session and of history that dies with the machine.
  • Multi-agent developers (Claude Code + Cursor + Codex CLI) who want one memory layer all of them can query.
  • Anyone consolidating AI history — browser chats and coding sessions — into one grep-able, agent-accessible archive.

If you mainly want the conversations in Obsidian rather than in an agent, start with syncing Claude conversations to Obsidian — same vault, human-facing.

Frequently Asked Questions

Can Claude Code search my previous conversations?+

Not by default — Claude Code sessions live in machine-local JSONL files with no built-in search or sync. The XWX Backup vault consolidates those transcripts and your claude.ai history into one Markdown archive, and its MCP server gives Claude Code search and read tools over it.

What is the xwx-backup-vault-server MCP server?+

It’s an MCP server bundled with XWX Backup that exposes your local conversation vault to any MCP client. It provides eight tools — list, read, write, update, delete, move, and regex grep over the Markdown files — and installs into Claude Code via its plugin marketplace.

Does this send my conversations to the cloud?+

No. Ingestion runs over localhost between the extension and the desktop app; the vault, search index, and MCP server all read local files. Conversation content never touches XWX servers.

Can other agents like Cursor or Codex CLI use the same vault?+

Yes. Anything that speaks MCP can connect to the same server and tools. The vault itself is plain Markdown, so tools without MCP can still grep or read the files directly.

How does this compare to RAG or embedding-based memory tools?+

It’s deliberately simpler: full-text search over verbatim transcripts instead of chunked embeddings. That means exact recall of what was actually said — error strings, code, citations — with no index drift and no API keys, at the cost of not doing fuzzy semantic matching. For prior-conversation retrieval, exact search is usually what you want.

Which platforms can feed the vault?+

Batch and scheduled ingestion cover 11 platforms with conversation lists: ChatGPT, Claude, Gemini, DeepSeek, Grok, Perplexity, Kimi, Microsoft Copilot, GitHub Copilot, Google AI Studio, and Tencent Yuanbao. Claude Code’s local JSONL sessions join via knowledge-base paths.

Related Articles