Longhand
@Wynelson94
About Longhand
Lossless local memory for Claude Code. The full, unabbreviated version. Every tool call, every file edit, every thinking block — stored verbatim on your machine. Persistent memory without tokens.
Basic information
Config
Add this server to your MCP-compatible client using the configuration below.
{
"mcpServers": {
"longhand": {
"command": "longhand",
"args": [
"mcp-server"
]
}
}
}Tools
No tools detected
We auto-extract tools from the README. The maintainer can list them under a ## Tools heading to populate this section.
Overview
What is Longhand?
Longhand is a local MCP server that captures every tool call, file edit, and thinking block from every Claude Code session verbatim into a SQLite database on your machine. It provides persistent, searchable memory without any API calls, summaries, or AI decisions about what to keep. It is for anyone using Claude Code who wants to retain session history beyond Claude Code’s default file rotation.
How to use Longhand?
Install via pip: pip install longhand. Run longhand setup to ingest existing history, install hooks, and configure MCP. Then use longhand recall "natural-language query" to search. For large histories, use longhand setup --skip-analysis for a fast path, followed by longhand reanalyze for full semantic capabilities.
Key features of Longhand
- Zero API calls – fully local, offline-capable.
- Stores verbatim events – no lossy summarization.
- Natural-language recall across ~126ms for 20+ sessions.
- Deterministic replay of past file states and diffs.
- First-class support for Claude Code thinking blocks.
- Completely portable between models and model versions.
Use cases of Longhand
- Search past fixes or decisions by fuzzy description.
- Review thinking blocks to understand past reasoning.
- Reproduce exact file state at any point in a previous session.
- Preserve history before Claude Code rotates source JSONL files.
- Integrate with or replace other memory tools without losing data.
FAQ from Longhand
How is Longhand different from claude-mem?
claude-mem stores AI-generated summaries and observations; Longhand stores verbatim events from the raw JSONL files. Longhand makes no LLM calls, keeps thinking blocks, and preserves every diff for deterministic replay.
What are the runtime requirements?
Python 3.10–3.13 are fully supported. On Python 3.14, chromadb is pinned to a version below 1.0 due to segfaults. The server uses a local SQLite database and ChromaDB instance; no external dependencies are required.
Where does Longhand store session data?
All data lives on your machine in a SQLite file and ChromaDB index – never leaves your computer. Typical storage footprint is 200–400 MB for regular users, ~1 GB for heavy users.
Does Longhand use many tokens for recall?
No – tools are capped by design. A full recall across 100+ sessions returns roughly 4K tokens, compared to 10–50× more for reading a raw session JSONL.
How long does initial backfill take for large histories?
First-time backfill on histories >1 GB takes 10–30 minutes on an M-class Mac (mostly embedding model run on all cores). Use longhand setup --skip-analysis for a ~1-minute fast path; exact-text search, timelines, and file history work immediately.
More Other MCP servers
🪟 Windows-MCP
CursorTouchMCP Server for Computer Use in Windows
XcodeBuildMCP
cameroncookeA Model Context Protocol (MCP) server and CLI that provides tools for agent use when working on iOS and macOS projects.
MaxKB
1Panel-dev🔥 MaxKB is an open-source platform for building enterprise-grade agents. 强大易用的开源企业级智能体平台。
FastMCP v2 🚀
jlowin🚀 The fast, Pythonic way to build MCP servers and clients.
MCP Toolbox for Databases
googleapisMCP Toolbox for Databases is an open source MCP server for databases.
Comments