local-claude-chat-history-mcp
Searches and browses local Claude Code and Cowork session histories stored on your machine, enabling questions about past work without uploading data.
README
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 |
|---|---|---|
code |
~/.claude/projects/**/*.jsonl |
Claude Code CLI/desktop sessions |
cowork |
~/Library/Application Support/Claude/local-agent-mode-sessions (macOS) |
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-history
Or 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-mcp
Claude Code (plain MCP server)
claude mcp add claude-history -- npx -y github:daniellmorris/local-claude-chat-history-mcp
Claude Desktop / other MCP clients
{
"mcpServers": {
"claude-history": {
"command": "npx",
"args": ["-y", "github:daniellmorris/local-claude-chat-history-mcp"]
}
}
}
Tools
search_history
Full-text search across both sources, newest sessions first.
| Param | Default | Description |
|---|---|---|
query |
— | Case-insensitive substring (or regex with regex: true) |
source |
all |
all | code | cowork |
project |
— | Substring filter on project path or session title |
role |
any |
user | assistant |
after / before |
— | ISO date bounds (e.g. 2026-07-09) |
limit / maxPerSession |
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 |
|---|---|
CLAUDE_CODE_HISTORY_DIR |
Override ~/.claude/projects |
CLAUDE_COWORK_SESSIONS_DIR |
Override the Cowork sessions directory |
Development
npm install
npx @modelcontextprotocol/inspector node index.js
The plugin ships a dependency-free bundle at dist/server.mjs (committed to the repo). After changing index.js or lib/, rebuild it:
npm run build
License
MIT
Recommended Servers
playwright-mcp
A Model Context Protocol server that enables LLMs to interact with web pages through structured accessibility snapshots without requiring vision models or screenshots.
Magic Component Platform (MCP)
An AI-powered tool that generates modern UI components from natural language descriptions, integrating with popular IDEs to streamline UI development workflow.
Audiense Insights MCP Server
Enables interaction with Audiense Insights accounts via the Model Context Protocol, facilitating the extraction and analysis of marketing insights and audience data including demographics, behavior, and influencer engagement.
VeyraX MCP
Single MCP tool to connect all your favorite tools: Gmail, Calendar and 40 more.
graphlit-mcp-server
The Model Context Protocol (MCP) Server enables integration between MCP clients and the Graphlit service. Ingest anything from Slack to Gmail to podcast feeds, in addition to web crawling, into a Graphlit project - and then retrieve relevant contents from the MCP client.
Kagi MCP Server
An MCP server that integrates Kagi search capabilities with Claude AI, enabling Claude to perform real-time web searches when answering questions that require up-to-date information.
E2B
Using MCP to run code via e2b.
Neon Database
MCP server for interacting with Neon Management API and databases
Exa Search
A Model Context Protocol (MCP) server lets AI assistants like Claude use the Exa AI Search API for web searches. This setup allows AI models to get real-time web information in a safe and controlled way.
Qdrant Server
This repository is an example of how to create a MCP server for Qdrant, a vector search engine.