feat(mcp-configs): add longhand for lossless Claude Code session history#1503
feat(mcp-configs): add longhand for lossless Claude Code session history#1503Wynelson94 wants to merge 2 commits into
Conversation
Adds longhand as a third memory option alongside the existing memory (@modelcontextprotocol/server-memory) and omega-memory entries. The existing two store synthesized memory — an assistant chooses what to record and structures it into graphs. Longhand solves a different problem: lossless capture of what Claude Code already writes to ~/.claude/projects/*.jsonl (tool calls, file edits, thinking blocks). Claude Code rotates those files after a few weeks; Longhand indexes them into local SQLite + ChromaDB before they're gone. Use cases the synthesized-memory servers don't cover: - "Show me the exact edit I made to auth.ts three weeks ago" - "Find the webhook fix from that session with the stripe bug" - "Replay the file state when I committed abc123" Complement, not replacement. Per CONTRIBUTING.md's unvetted-package guidance: - MIT licensed, published on PyPI as `longhand` - Official MCP Registry listing (io.github.Wynelson94/longhand) - PulseMCP-listed, Glama A/A/A tier (security, license, quality) - 171 passing unit tests, security-audited with zero critical findings Context-window footprint: a full `recall` returns ~4K tokens (smaller than reading a single raw JSONL), consistent with the context_warning note in _comments. Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
📝 WalkthroughWalkthroughA new MCP server configuration entry Changes
Estimated code review effort🎯 1 (Trivial) | ⏱️ ~3 minutes Poem
🚥 Pre-merge checks | ✅ 3✅ Passed checks (3 passed)
✏️ Tip: You can configure your own custom pre-merge checks in the settings. ✨ Finishing Touches🧪 Generate unit tests (beta)
Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. Comment |
Greptile SummaryThis PR adds Confidence Score: 5/5Safe to merge once the two previously-flagged style items (command invocation pattern and description length) are resolved by the author. No new P0 or P1 issues were found. The mcp-configs/mcp-servers.json — specifically the Important Files Changed
Flowchart%%{init: {'theme': 'neutral'}}%%
flowchart TD
A["Claude Code session ends"] -->|"writes verbatim log"| B["~/.claude/projects/*.jsonl"]
B -->|"auto-ingest hook"| C["longhand MCP server"]
C -->|"indexes into"| D["Local SQLite"]
C -->|"indexes into"| E["Local ChromaDB"]
D & E -->|"17 MCP tools exposed"| F["Claude Code (recall, replay, search)"]
B -->|"rotated after weeks"| G["Lost without longhand"]
style G fill:#f88,stroke:#c00
Reviews (2): Last reviewed commit: "docs(mcp-configs): tighten longhand desc..." | Re-trigger Greptile |
There was a problem hiding this comment.
1 issue found across 1 file
Prompt for AI agents (unresolved issues)
Check if these issues are valid — if so, understand the root cause of each and fix them. If appropriate, use sub-agents to investigate and fix each issue separately.
<file name="mcp-configs/mcp-servers.json">
<violation number="1" location="mcp-configs/mcp-servers.json:45">
P1: Use `uvx` instead of bare `longhand` command to match the convention for Python-based MCP servers in this file. `"command": "longhand"` will silently fail for any user who hasn't already run `pip install longhand` globally — `uvx` resolves and runs the PyPI package on demand without that prerequisite, consistent with how `omega-memory` is configured.</violation>
</file>
Reply with feedback, questions, or to request a fix. Tag @cubic-dev-ai to re-run a review.
| "command": "longhand", | ||
| "args": ["mcp-server"], |
There was a problem hiding this comment.
P1: Use uvx instead of bare longhand command to match the convention for Python-based MCP servers in this file. "command": "longhand" will silently fail for any user who hasn't already run pip install longhand globally — uvx resolves and runs the PyPI package on demand without that prerequisite, consistent with how omega-memory is configured.
Prompt for AI agents
Check if this issue is valid — if so, understand the root cause and fix it. At mcp-configs/mcp-servers.json, line 45:
<comment>Use `uvx` instead of bare `longhand` command to match the convention for Python-based MCP servers in this file. `"command": "longhand"` will silently fail for any user who hasn't already run `pip install longhand` globally — `uvx` resolves and runs the PyPI package on demand without that prerequisite, consistent with how `omega-memory` is configured.</comment>
<file context>
@@ -41,6 +41,11 @@
"description": "Persistent agent memory with semantic search, multi-agent coordination, and knowledge graphs — run via uvx (richer than the basic memory store)"
},
+ "longhand": {
+ "command": "longhand",
+ "args": ["mcp-server"],
+ "description": "Lossless Claude Code session history — indexes every tool call, file edit, and thinking block from ~/.claude/projects into local SQLite + ChromaDB. Complementary to memory/omega-memory (which store synthesized memory); Longhand indexes raw session truth before Claude Code rotates the JSONL. 17 tools incl. recall, search_in_context, replay_file, recall_project_status. Install: pip install longhand && longhand setup. ~126ms queries, zero API calls."
</file context>
| "command": "longhand", | |
| "args": ["mcp-server"], | |
| "command": "uvx", | |
| "args": ["longhand", "mcp-server"], |
Trim the longhand entry's description to align with the one-line convention used by comparable entries in this file. Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
|
Thanks for the reviews. Keeping Trimmed the description in 29b5ca0 to match the convention used by comparable entries. |
|
Thanks for the PR. This has been idle for several weeks and is not merge-ready against the moving main branch, so I am closing it to keep the queue tractable. Reopen is welcome with a current rebase and focused scope; maintainers may also port the useful parts into a fresh PR where appropriate. |
What this does
Adds
longhandas a third memory option inmcp-configs/mcp-servers.json, alongside the existingmemory(@modelcontextprotocol/server-memory) andomega-memoryentries.Why
The two existing memory servers store synthesized memory — an assistant chooses what to record, structures it into a knowledge graph, and the record is a summarization of past interactions.
Longhand solves a different problem: lossless capture of what Claude Code already writes to disk. Claude Code writes every session to
~/.claude/projects/*.jsonl(tool calls, file edits, thinking blocks, all verbatim). Claude Code rotates these files after a few weeks; Longhand indexes them into local SQLite + ChromaDB before they're gone and exposes 17 tools for fuzzy recall across the full session history.Use cases
memoryandomega-memorydon't cover:Raw session records, not synthesized memory. Complement, not replacement.
Differentiation
memoryomega-memorylonghandUnvetted-package check
Per
CONTRIBUTING.md's skill adaptation policy ("do not ship a skill whose main value is telling users to install an unvetted package"):longhand(currently v0.5.11)io.github.Wynelson94/longhand)Write-up: https://dev.to/wynelson94/why-i-built-a-lossless-alternative-to-ai-memory-summarization-40cl
Context-window footprint
The
_comments.context_warningnotes: "Keep under 10 MCPs enabled to preserve context window." Longhand is designed with token budget in mind — a fullrecallcall across 100+ sessions returns ~4K tokens (smaller than reading a single raw JSONL would cost). Token budget is an explicit README section.How to enable
Setup:
pip install longhand && longhand setup— ingests existing~/.claude/projects/history and installs the auto-ingest hook so new sessions are captured on close.Happy to adjust the description or placement. Thanks for maintaining this.
Summary by cubic
Add
longhandas a third memory option inmcp-configs/mcp-servers.jsonfor lossless Claude Code session history. It indexes raw~/.claude/projects/*.jsonlinto local SQLite + ChromaDB, complements@modelcontextprotocol/server-memoryandomega-memory, and the config description is now one line for consistency.New Features
longhandentry withcommand: "longhand"andargs: ["mcp-server"].Migration
pip install longhand && longhand setup.Written for commit 29b5ca0. Summary will update on new commits.
Summary by CodeRabbit
New Features
Chores