Skip to main content

claude-archive-mcp

Local stdio MCP server that exposes your unified Claude chat history (claude.ai export + Claude Code sessions) to Claude Code as ranked, scoped, structured search.

Status: v1.10.0 · Author: Mike Andersen · License: MIT

When you reference past work — "did we settle this in nortam_dev last month?", "find the TAP routing analysis", "what did Claude Code commit on April 14?" — Claude Code reaches for this server instead of asking you to summarize.

Two sources, one index

Source source Origin
claude.ai export claude_ai ~/.claude/Exported_Chats/conversations.json + projects/
Claude Code sessions claude_code ~/.claude/projects/**/*.jsonl

Both feed one conversations table; the same tools search across both.

Tools

search_chats · get_chat · list_projects · list_recent_chats · search_within_chat · archive_stats · timeline · find_related_chats · get_digest · recall · get_session_lineage — eleven read-only, source-aware tools. See docs/TOOLS.md. The server also exposes a per-project resource (claude-archive://project/{source}/{identifier}) — a dynamic markdown project overview.

Digest: get_digest (tool) or python scripts/digest.py --weekly (also /digest) — a markdown activity recap over a rolling daily/weekly window; both share one aggregator.

Semantic search (optional): find_related_chats ranks conversations by embedding cosine. It needs the optional extra — pip install -e .[embeddings], then python scripts/embed.py --backfill (also /embed). The server itself stays inference-free.

Comprehension sidecars (v1.4.0): search_chats and find_related_chats each carry an additive semantic sidecar tier — matches against per-conversation, LLM-authored comprehension sidecars (an abstract plus entities/identifiers), searched by FTS and typed separately from the lexical and embedding rows. It is graceful under partial coverage (an un-covered conversation simply cannot appear), so it never regresses the existing results. Keeping the sidecar store current is an attended, Mike-armed task — see docs/SIDECAR_REFRESH.md.

Briefing packs (v1.10.0): claude-archive-brief --project <slug> writes a deterministic, read-only markdown pack answering what happened here recently, what is still open, what was decided, and what to open next -- every line carrying a locator you can open. Same library behind python scripts\brief.py, the viewer's /brief page, and the plugin's /archive:brief. It is an out-of-process surface, not a twelfth tool. See docs/BRIEFING.md.

Curated memory (v1.10.0, opt-in): an append-only store of Decision / Entity / Thread objects in a separate memory.db beside the archive. Curation is out of process -- claude-archive-curate carries six verbs (correct, supersede, dispute, pin, merge, forget), each an append, so no wording is ever rewritten; python scripts\memory.py and the viewer's /memory page read it. When the store exists, search_chats and find_related_chats rows gain a curated_status label (current / superseded / disputed / null) -- a label only, changing no count, no ordering and no selection. With no memory.db the key is absent, so responses are byte-identical to an install that never curated anything. No archive migration and no new MCP tool.

Install

See docs/INSTALL.md. In short (Windows PowerShell 5.1 -- these commands are 5.1-clean and run unchanged under PowerShell 7):

python -m venv .venv
.\.venv\Scripts\Activate.ps1
pip install -e .[dev]
python scripts\reindex.py        # build the index from both sources
python scripts\install_mcp.py    # register the server in ~/.claude.json

Then start a new Claude Code session and ask away (see INSTALL.md for details).

Web viewer (read-only, localhost)

A plain, server-rendered web UI for browsing the same index in a browser — a second, read-only consumer of the query layer (it adds no MCP tool and changes no contract).

python -m claude_archive_mcp.webui                 # opens http://127.0.0.1:8766/
python -m claude_archive_mcp.webui --port 9000     # same, on a different port
  • Pages (eleven): Home (recent conversations), Search (full-text, ranked), Conversation (with within-chat search, and a link to its Related page -- related is no longer rendered inline), Related (one conversation's neighbours across the structural, embedding and sidecar tiers, as its own actively-visited page), Timeline (a topic's activity over time, filterable by source/project), Digest (rolling daily/weekly activity digest), Stats (archive statistics with near-duplicate project names collapsed for reading), Observability (read-only adoption panels: archive tool adoption, web-UI engagement, and sidecar coverage), Brief (a briefing pack for one project or query), Cockpit (nine continuity health surfaces on one page), and Memory (the curated-memory objects, read-only). The query logic is reused from the same handlers the MCP tools wrap -- no duplicate logic, no MCP transport.
  • Posture (all enforced in code, proven by tests): binds 127.0.0.1 only (no config to widen it); opens the SQLite DB mode=ro, so it can never write or migrate; GET-only; no JavaScript; stdlib http.server (no extra dependencies).
  • Port: defaults to 8766; override with CLAUDE_ARCHIVE_WEBUI_PORT or the --port flag (the flag wins). The host is a hard rail — --port changes the port only, never the loopback bind. Index first (python scripts\reindex.py) — the viewer reads an existing DB and will not create one.
  • Freshness: the long-running viewer records a running-code stamp when it starts; python scripts\check_webui_stale.py reports whether the live process is serving stale code. Restarting the live process is a deliberate, attended action.

Documentation

Plan of record:

  • ROADMAP.md -- the canonical product roadmap (north star, principles, horizons, release sequence, do-not-reopen register)
  • docs/PROGRAM.md -- the operational truth layer (per-horizon state, evidence gates, closed rulings, dated baselines, recorded policies)
  • docs/ROADMAP-archive-mcp.md -- FROZEN-HISTORICAL as of 2026-08-13; prior-cycle evidence, not a plan

Reference:

Development

pip install -e .[dev]
ruff check .
ruff format --check .
mypy --strict src/
pytest

Conventions live in CLAUDE.md. The project is built in gated phases; do not chain past a phase gate.

Metadata

Release files for claude-archive-mcp 1.10.0

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for claude-archive-mcp 1.10.0
File Size Uploaded
claude_archive_mcp-1.10.0.tar.gz 2.2 MB Details

Built distribution (wheel)

Table of built distributions (wheels) for claude-archive-mcp 1.10.0
File Interpreter ABI Platform
claude_archive_mcp-1.10.0-py3-none-any.whl Python 3 none any Details

Total release size: 2.5 MB

Release files / claude_archive_mcp-1.10.0.tar.gz

Download URL claude_archive_mcp-1.10.0.tar.gz
Size 2.2 MB
Tags Source
SHA-256 checksum
How to use checksums
19052ff89ed55edbe2f0fe20b425903a678e2923cd958f40a705a1d9e43985fa
BLAKE2b-256 checksum
How to use checksums
8d86e7c9938ff69f2ab792a09dd1d841fe89dcc6ff9b35c5b5b7b5565442413a
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/7.0.0 CPython/3.12.10

Release files / claude_archive_mcp-1.10.0-py3-none-any.whl

Download URL claude_archive_mcp-1.10.0-py3-none-any.whl
Size 318.5 kB
Tags Python 3
SHA-256 checksum
How to use checksums
08a85b7071711126ab15cdb20b4c7666830249e51832ca96371d6651e93f409b
BLAKE2b-256 checksum
How to use checksums
4553a2dd5032ad4cdd780c479a3c51b8716b3dd2c2def27c295c0dd3b9a2d9cb
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/7.0.0 CPython/3.12.10

Release history Release notifications | RSS feed

1.14.0

2 release files

This release

1.10.0 This release

2 release files

1.9.0

2 release files

1.8.0

2 release files

1.7.2

2 release files

1.7.1

2 release files

1.7.0

2 release files

1.6.0

2 release files

1.5.0

2 release files

1.4.1

2 release files

1.4.0

2 release files

1.3.1

2 release files

1.3.0

2 release files

1.2.1

2 release files

1.1.0

2 release files

0.8.0

2 release files

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page