Skip to main content
MCP server CX Codex

Longhand — Claude Code MCP server: what it does, how to install

Longhand keeps Claude Code session history on your machine and retrieves it with natural-language queries. It is useful when an old fix or decision needs to be found without API calls.

Install into Claude Code · Platform CLI All methods and platforms ↓
claude mcp add longhand -- uvx longhand
Open on GitHub

What Longhand does

Longhand records Claude Code activity locally, including tool calls, file edits, and reasoning records. It stores that history in SQLite, then lets you search across sessions with fuzzy natural-language queries. Previous context remains available after the original session files are rotated or deleted.

Run longhand setup to ingest existing history, install hooks, and configure MCP. The CLI also provides longhand recall and longhand status, while the server exposes session search and timeline access. Longhand targets Python 3.10+, so that requirement applies when you install it through uvx.

What it helps with

  • find an old fix across Claude Code sessions
  • recover context after a break
  • inspect events from a previous session
  • keep Claude Code history in local storage

Example prompts for the agent

  • Find the earlier fix for the Stripe webhook problem from last week.
  • Show the latest events from the session where authentication changed.
  • Summarize the recent sessions for this project.

How to install Longhand

Platform CLI

claude mcp add longhand -- uvx longhand

uvx runs the command named after the package; if the README names another one, use uvx --from longhand <command>

Step by step, with commands for each platform: How to add an MCP server to Claude Code, Codex, Cursor, VS Code, Gemini CLI and more

Questions about Longhand

How do I install Longhand in Claude Code?

Run claude mcp add longhand -- uvx longhand.

What does Longhand do?

It keeps Claude Code session history in a local SQLite store and retrieves relevant context through natural-language queries. The server works without API requests.

What does longhand setup configure?

It imports existing history, installs hooks, and configures the MCP server.

Similar MCP servers

MCP servers catalog →

From the same set2

Project sponsors

Companies that keep this analytics open
Gold sponsor

Impressions, clicks and code copies — open statistics. We keep the numbers public for the same reason NeBlask itself is public. Become a sponsor