local-claude-chat-history-mcp
Click on "Deploy Server".
Wait a few minutes for the server to deploy. Once ready, it will show a "Started" state.
In the chat, type
@followed by the MCP server name and your instructions, e.g., "@local-claude-chat-history-mcp search for ADX proxy setup"
That's it! The server will respond to your query, and you can continue using it as needed.
Here is a step-by-step guide with screenshots.
local-claude-chat-history-mcp
An MCP server that searches your local Claude conversation history — the sessions Claude stores as files on your own machine.
Source | Location | What it is |
|
| Claude Code CLI/desktop sessions |
|
| Claude Cowork (local agent mode) sessions |
Everything runs locally over stdio — it only reads files already on disk, and nothing is uploaded anywhere.
Handy for questions like:
"What did I work on today / this week?"
"Which session was it where I set up the ADX proxy?"
"When did I last touch the leaderboard caching code?"
Scope — local only. This searches the transcripts Claude writes to disk (Claude Code and Claude Cowork). Your regular claude.ai / Claude Desktop chats are stored in Anthropic's cloud, not locally, so there is no local file for this tool to read and they are intentionally out of scope.
Usage
Claude Code plugin (recommended)
This repo is a Claude Code plugin and its own marketplace. Install it with:
# From GitHub
claude plugin marketplace add daniellmorris/local-claude-chat-history-mcp
claude plugin install local-claude-chat-history@local-claude-chat-history
# Or from a local checkout
claude plugin marketplace add /path/to/local-claude-chat-history-mcp
claude plugin install local-claude-chat-history@local-claude-chat-historyOr interactively inside Claude Code: /plugin marketplace add … then /plugin install local-claude-chat-history.
The plugin runs the bundled server at dist/server.mjs — no npm install needed on the machine that installs it.
For quick testing without installing:
claude --plugin-dir /path/to/local-claude-chat-history-mcpClaude Code (plain MCP server)
claude mcp add claude-history -- npx -y github:daniellmorris/local-claude-chat-history-mcpClaude Desktop / other MCP clients
{
"mcpServers": {
"claude-history": {
"command": "npx",
"args": ["-y", "github:daniellmorris/local-claude-chat-history-mcp"]
}
}
}Related MCP server: Claude Code History MCP
Tools
search_history
Full-text search across both sources, newest sessions first.
Param | Default | Description |
| — | Case-insensitive substring (or regex with |
|
|
|
| — | Substring filter on project path or session title |
|
|
|
| — | ISO date bounds (e.g. |
| 20 / 3 | Result caps |
Returns matching snippets with sessionIds.
list_sessions
Browse recent sessions (id, title, project, timestamps) with the same source/project filters. Great for "what did I do today".
get_session
Read a full conversation by sessionId, paginated with offset/limit, each message truncated to maxChars.
Configuration
All optional, via environment variables:
Variable | Purpose |
| Override |
| Override the Cowork sessions directory |
Development
npm install
npx @modelcontextprotocol/inspector node index.jsThe plugin ships a dependency-free bundle at dist/server.mjs (committed to the repo). After changing index.js or lib/, rebuild it:
npm run buildLicense
MIT
Available Tools
3 toolsget_sessionRead a Claude history sessionA
Read the messages of a single conversation session by ID (from list_sessions or search_history). Paginate long sessions with offset/limit.
Inputs: sessionId (required), limit, offset, source, +1 more.
list_sessionsList Claude history sessionsA
List recent local Claude sessions (Claude Code + Claude Cowork), newest first. Useful for reviewing what you worked on today/this week, or to find a session ID to pass to get_session.
Inputs: limit, source, project.
search_historySearch Claude historyA
Full-text search across local Claude Code and Claude Cowork conversation history stored on this machine. Returns matching message snippets with session IDs (use get_session to read the full conversation). Searches newest sessions first — good for questions like "what did I work on today" or "when did I last touch X".
Inputs: query (required), role, after, limit, +5 more.
Tool Schema Changelog
Recent tool additions, removals, and schema changes observed during successful MCP inspections.
Loading tool schema changelog…
TDQS
Scored across 3 tools
Each tool has a clearly distinct purpose: list_sessions for overview, search_history for finding specific content, and get_session for reading a full conversation. No overlap.
All tool names follow a consistent verb_noun pattern (get_session, list_sessions, search_history) with snake_case, making the tool surface predictable.
With 3 tools, the server is tightly scoped to its purpose—listing, searching, and reading chat history. No waste or missing core functionality.
The tool set covers the full lifecycle for a read-only history server: list to browse, search to find, and get to retrieve full content. No obvious gaps.
Maintenance
Related MCP Connectors
Work on your own computers from Claude or ChatGPT: run commands, edit and search files.
Your versioned prompt library: search, read, save and version prompts from Claude Code.
Persistent memory for Claude Code and Cursor. Stop re-explaining your project every session.
Search your AI chat history (ChatGPT, Claude, Codex) from any MCP client. Remote, private, read-only
Related MCP Servers
- AlicenseAqualityDmaintenanceSearches your local Claude Code conversation history to recall and resume past solutions.464 npm1MIT
- AlicenseNot gradedqualityDmaintenanceSearch and reference your Claude Code conversation history directly from Claude, with full-text search, conversation viewing, and project browsing.MIT
- AlicenseNot gradedqualityDmaintenanceEnables searching and browsing past Claude Code conversations directly from within an active Claude session, with full-text search and cost tracking.MIT
- AlicenseNot gradedqualityAmaintenanceEnables Claude Code to search and retrieve past chat history from Claude.ai exports and Claude Code sessions, allowing the AI to reference previous conversations and decisions.MIT