local-claude-chat-history-mcp
Click on "Install 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-mcpsearch 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: mcp-sessions
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.
| Name | Required | Description | Default |
|---|---|---|---|
| limit | No | Max messages to return | |
| offset | No | Skip this many messages | |
| source | No | History source: "code" = Claude Code (~/.claude/projects), "cowork" = Claude Cowork local desktop sessions, "all" = both | all |
| maxChars | No | Truncate each message to this many characters | |
| sessionId | Yes |
TDQS
Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?
No annotations provided, so description carries full burden. It discloses multiple behavioral traits: reads messages (read operation), supports pagination via offset/limit, truncation via maxChars, and source filtering. It does not mention side effects or return format, but for a read-only tool these are acceptable. No contradiction with annotations.
Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.
Is the description appropriately sized, front-loaded, and free of redundancy?
Two sentences, front-loaded with purpose, no wasted words. Efficient and clear.
Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.
Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?
Given 5 parameters, no output schema, and no annotations, the description covers key usage (source of IDs, pagination) but lacks details on return format, error handling, or session not found behavior. Completeness is adequate but not exceptional.
Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.
Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?
Schema already has descriptions for 4 of 5 parameters (80% coverage). Description adds context about pagination but does not detail all parameters beyond schema. Baseline 3 is appropriate; description adds minimal extra meaning.
Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.
Does the description clearly state what the tool does and how it differs from similar tools?
Description clearly states 'Read the messages of a single conversation session by ID', specifying the verb ('Read'), resource ('messages of a single conversation session'), and source of IDs (list_sessions or search_history). It distinguishes from sibling tools: list_sessions returns sessions, search_history searches, get_session reads a specific session's messages.
Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.
Does the description explain when to use this tool, when not to, or what alternatives exist?
Explicitly says to use after obtaining session ID from list_sessions or search_history, and mentions pagination for long sessions. Sibling tools are listed, providing context for when not to use this tool. Could be improved by explicitly stating when not to use, but adequate.
Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.
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.
| Name | Required | Description | Default |
|---|---|---|---|
| limit | No | ||
| source | No | History source: "code" = Claude Code (~/.claude/projects), "cowork" = Claude Cowork local desktop sessions, "all" = both | all |
| project | No | Case-insensitive substring filter on project path/name or session title |
TDQS
Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?
No annotations are provided, so the description carries the full burden. It discloses the tool lists recent sessions, orders them newest first, and covers multiple sources. It does not mention rate limits or output format, but for a list tool the behavioral disclosure is adequate.
Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.
Is the description appropriately sized, front-loaded, and free of redundancy?
Two sentences, front-loaded with purpose, no wasted words. Every sentence provides value (purpose, usage example, link to get_session).
Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.
Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?
With 3 optional parameters and no output schema, the description covers the tool's purpose, usage context, and ordering. It lacks a hint about the return format (e.g., session IDs, timestamps), but the context is largely complete for an agent to decide to use it.
Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.
Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?
Schema description coverage is 67% (source and project described, limit missing description). The tool description does not add further semantic meaning beyond the schema; it relies on schema for limit constraints and source/project descriptions, so baseline 3 is appropriate.
Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.
Does the description clearly state what the tool does and how it differs from similar tools?
The description uses a specific verb ('list') and resource ('local Claude sessions'), specifies ordering ('newest first'), and distinguishes from siblings by mentioning its use for finding a session ID to pass to get_session.
Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.
Does the description explain when to use this tool, when not to, or what alternatives exist?
The description explicitly states when to use it ('reviewing what you worked on today/this week' or 'find a session ID to pass to get_session'), providing clear context. It does not explicitly state when not to use it or directly compare to search_history, but the sibling tool names imply differentiation.
Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.
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".
| Name | Required | Description | Default |
|---|---|---|---|
| role | No | Only match messages from this role | any |
| after | No | Only sessions active after this ISO date (e.g. "2026-06-01") | |
| limit | No | Max total matches to return | |
| query | Yes | Text to search for (case-insensitive substring, or a regex when regex=true) | |
| regex | No | Treat query as a JavaScript regular expression | |
| before | No | Only messages before this ISO date | |
| source | No | History source: "code" = Claude Code (~/.claude/projects), "cowork" = Claude Cowork local desktop sessions, "all" = both | all |
| project | No | Case-insensitive substring filter on project path/name or session title | |
| maxPerSession | No | Max matches returned per session |
TDQS
Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?
With no annotations provided, the description carries full burden. It discloses the tool is read-only (search), returns snippets and session IDs, searches newest first, works on local storage, and supports sources (code, cowork). It doesn't mention regex or maxPerSession directly, but those are in the schema.
Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.
Is the description appropriately sized, front-loaded, and free of redundancy?
Three sentences with no wasted words. First sentence states the core function, second explains output and links to sibling tool, third gives examples and ordering. Front-loaded and efficient.
Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.
Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?
Given no output schema, the description adequately explains return values (snippets, session IDs) and ordering. It covers main behavioral aspects for a 9-parameter search tool, though it doesn't elaborate on all parameters (schema covers them).
Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.
Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?
Schema coverage is 100%, so baseline is 3. The description adds value beyond schema by explaining the search order, multiple sources, and the relationship to get_session, aiding the agent in understanding how parameters like source and ordering affect results.
Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.
Does the description clearly state what the tool does and how it differs from similar tools?
The description clearly states it performs full-text search across local conversation history from two sources (Claude Code and Claude Cowork), returns message snippets with session IDs, and differentiates from sibling tool get_session by directing users to read full conversations there. It also provides concrete example queries.
Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.
Does the description explain when to use this tool, when not to, or what alternatives exist?
The description gives explicit usage context ('good for questions like...'), states the ordering ('searches newest sessions first'), and references get_session as the tool for full conversations. However, it does not explicitly specify when not to use this tool or mention alternatives like list_sessions.
Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.
Tool Schema Changelog
Recent tool additions, removals, and schema changes observed during successful MCP inspections. Dates show when Glama detected each change.
3 tool updates
v0.1.0- First observed
get_session - First observed
list_sessions - First observed
search_history
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
Resources
Unclaimed servers have limited discoverability.
Looking for Admin?
If you are the server author, to access and configure the admin panel.
Related MCP Connectors
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
Share context and questions between Claude instances — VS Code, claude.ai web, and mobile.
Read-only search of your Sortio knowledge graph (files and entities) for Claude and ChatGPT.
Related MCP Servers
- AlicenseAqualityCmaintenanceSearches your local Claude Code conversation history to recall and resume past solutions.4441MIT
- AlicenseNot gradedqualityCmaintenanceSearch and browse Claude Code conversation history across all your projects.1MIT
- AlicenseNot gradedqualityDmaintenanceSearch and reference your Claude Code conversation history directly from Claude, with full-text search, conversation viewing, and project browsing.13MIT
- AlicenseNot gradedqualityDmaintenanceEnables searching and browsing past Claude Code conversations directly from within an active Claude session, with full-text search and cost tracking.MIT
Latest Blog Posts
- Who's Calling? MCP Hosts Are an Identity Blind Spot (And the Spec Knows It)By Om-Shree-0709 on .mcpAgent IdentityOAuth 2.1
- Your AI Chatbot Just Exposed Your CEO's Salary to an InternBy Om-Shree-0709 on .Agent IdentityMCP SecurityOAuth Delegation
- Why MCP Servers Need Execution Sandboxing (And Why Your Current Stack Isn't Enough)By Om-Shree-0709 on .Agentic AiPrompt InjectionWebAssembly
MCP directory API
We provide all the information about MCP servers via our MCP API.
curl -X GET 'https://glama.ai/api/mcp/v1/servers/daniellmorris/local-claude-chat-history-mcp'
If you have feedback or need assistance with the MCP directory API, please join our Discord server