Longhand logo

Longhand

by Wynelson94

Stores Claude Code session history locally for semantic search, replay, timelines, and project-aware recall.

Install Longhand

Pick your client, then add it in one click or paste the config.

STDIOPython
~/Library/Application Support/Claude/claude_desktop_config.json
claude_desktop_config.json
{
  "mcpServers": {
    "wynelson94-longhand": {
      "command": "uvx",
      "args": [
        "longhand"
      ]
    }
  }
}

Settings → Developer → Edit Config, merge this into mcpServers, then fully quit and reopen Claude Desktop.

We couldn’t confirm it starts correctly

We ran the install command but it didn't respond within our test window — this can mean a slow first-time install rather than a real problem.

uvx longhand

No response to initialize.

This is an experimental automated check and can have false negatives — missing environment variables, a slow cold install, etc. It doesn’t necessarily mean something’s wrong. Last checked 12d ago.

Overview

Wynelson94/longhand MCP server captures Claude Code session JSONL and stores it verbatim in a local SQLite and ChromaDB-backed archive. It installs hooks to ingest completed and in-progress sessions, then exposes MCP tools and CLI commands for fuzzy recall, search, timelines, file history, replay, and project status. The server makes no API calls and does not summarize stored content. Reach for it when you need to find earlier fixes, decisions, conversations, or file changes across local Claude Code history.

Use cases

  • Recall an earlier fix across Claude Code sessions
  • Search historical conversations by natural language
  • Replay file changes from a previous session
  • Inspect live session timelines before completion
  • Check project status and index freshness

Key features

  • Verbatim local session archiving
  • SQLite and ChromaDB indexing
  • Natural-language semantic recall
  • Session timelines and file replay
  • Hook-based live ingestion
  • Project-aware status and reconciliation

Security & health

What it can reach and how reliably it runs — from our own checks, not the maintainer’s claims.

ActiveLast checked 1d ago

Recent health check succeeded.

3/4 checks healthy over the last 78d

Supply-chain signal

No high-severity advisories surfaced by our automated scan.

Critical 0High 0Medium 0Low 0

Scanned 10d ago via OSV.dev · longhand (PyPI)

Adoption & maintenance

Factual signals from GitHub, npm, and our automated checks — not a rating.

GitHub stars14Stargazers on the source repository.
Last commit1mo agoMost recent push to the default branch.
Install checkInconclusiveDidn't respond in our test window — often a slow first install.
Directory activity1 viewsConfig copies, upvotes, and views on AllMCPs.

How Longhand works

What Wynelson94/longhand does

Wynelson94/longhand preserves Claude Code history as a local, searchable archive. It captures session JSONL before Claude Code rotates older files, including tool calls, file edits, and thinking blocks. Stored records remain available after the original transcript files are deleted.

The archive uses SQLite for structured data and ChromaDB for semantic retrieval. Longhand does not send data to an external API, summarize sessions, or decide which parts of a conversation are worth retaining. The result is a local history layer for finding previous work rather than a generated memory summary.

How it works

Installation is provided through PyPI as longhand. Running longhand setup ingests existing Claude Code history, installs the relevant hooks, and configures MCP access. The hooks support both a session-ending analysis pass and live ingestion while a session is still active. Live ingestion writes events without embeddings, so semantic recall becomes available after the session-end pass or a reconciliation run.

The MCP server can query the indexed archive using natural-language recall and structured search. Session-oriented tools expose lists, timelines, file history, and replay data. Project-aware status and recall can help distinguish work by project, while the optional reconciler checks for transcripts that have not reached the index. In version 1.x, reconciliation defaults to a dry run unless fix=true is supplied.

Wynelson94/longhand also supports a sandboxed longhand demo command. The demo uses a fake three-session corpus and does not modify the real ~/.claude or ~/.longhand directories.

Tools and capabilities

The documented capabilities include:

  • Fuzzy, natural-language recall across sessions.
  • Semantic search with optional session and context-event controls.
  • Session listing and event timelines, including tail retrieval.
  • File-history lookup and deterministic file replay.
  • Project status and recall with Git-aware context.
  • Plan-history listing for Write and Edit activity involving Claude Code plan files.
  • Reconciliation for detecting or repairing index gaps.

Wynelson94/longhand keeps raw history available for follow-up inspection. Recall results can point to a session or provide a search pattern for drilling into more context, rather than requiring the entire source transcript to be returned at once.

Setup and configuration

Install the package with pip install longhand, then run longhand setup. The setup command handles initial history ingestion, hook installation, and MCP configuration. A session archive can be shared with Codex according to the project’s Codex documentation, while the primary workflow targets Claude Code.

The store can be moved by setting LONGHAND_DATA_DIR; this relocation applies to the CLI, hooks, and MCP server. The provided notes state that longhand config --set still writes to ~/.longhand/config.json even when the data directory is relocated. JSON output is available from status and doctor for scripting.

Limitations and notes

Only history captured by Longhand can be recovered. Sessions that were rotated or deleted before installation are not available unless their JSONL files still exist for initial ingestion. Live-ingested events are queryable through session and file-oriented tools, but recall and semantic search require the later analysis pass.

The project documents Python 3.10 or newer and an MIT license. Hook failures are recorded as breadcrumbs in ~/.longhand/logs/ and surfaced by diagnostic checks rather than causing the hooks to exit nonzero. Database migrations are automatic for the supported 0.11+ store format in later 1.x releases.

Reviews

No reviews yet — be the first to share how it worked for you.

Frequently Asked Questions about Longhand

Wynelson94/longhand is an MCP server that connects Claude Code session history to a local SQLite and ChromaDB archive. Its main tools support fuzzy recall, search, session listing, timelines, file-history lookup, deterministic replay, project status, and index reconciliation without external API calls.

Install it with `pip install longhand`, then run `longhand setup`. Setup ingests existing Claude Code history, installs hooks, and configures MCP access for the local archive.

Yes, the project documents sharing one memory archive between Claude Code and Codex. The primary setup and capture workflow described by the README targets Claude Code.

By default, the project uses local `~/.longhand` data and Claude Code history under `~/.claude`. Set `LONGHAND_DATA_DIR` to relocate the store for the CLI, hooks, and MCP server.

No. The documented workflow is local and makes zero API calls. Session content is indexed on the machine in SQLite and ChromaDB.

Related MCP servers

Add a badge to your READMEShow it’s listed — live SVG, Markdown or HTML.

AllMCPs Directory Badge

Full Badge Customizer

Showcase your server listing on GitHub or your project documentation. Embed this dynamic SVG badge to highlight official listing status and live engagement.

Badge Style:
Live Dynamic SVG PreviewLonghand AllMCPs Directory Badge
Markdown (GitHub README)
[![AllMCPs](https://allmcps.com/api/badge/wynelson94-longhand?style=directory)](https://allmcps.com/mcp/wynelson94-longhand)
HTML Embed
<a href="https://allmcps.com/mcp/wynelson94-longhand"><img src="https://allmcps.com/api/badge/wynelson94-longhand?style=directory" alt="Longhand on AllMCPs" /></a>