agent-history-mcp
Provides semantic search over local Hermes agent session logs, enabling retrieval of relevant conversation chunks based on meaning.
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., "@agent-history-mcpsearch for discussions about error handling in the payment module"
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.
agent-history-mcp
A tiny, generic MCP server that does semantic search over your local AI-agent session logs and returns the most relevant chunks — never whole transcripts.
Most "search my Claude history" tools are hardcoded to ~/.claude/projects and do keyword
matching. This one is multi-agent (Claude Code + Hermes out of the box, plus any extra
JSONL log dir you point it at) and semantic (local embeddings + vector similarity), so
you can ask what you meant rather than what you typed.
What it searches
Agent | Source | Notes |
Claude Code |
| One session per file. |
Hermes |
| Opened read-only. |
Anything else |
| Any directory of |
Everything runs locally. The embedding model (Xenova/all-MiniLM-L6-v2, ~25 MB) downloads
once on first run and is cached; after that it works offline. The index and model cache live
in ~/.agent-history-mcp/ — nothing about your conversations ever leaves your machine,
and none of it is part of this repo.
Related MCP server: chronicle-mcp
Install
# from npm (once published)
claude mcp add agent-history -s user -- npx -y agent-history-mcp
# or from a local checkout
npm install
npm run build
claude mcp add agent-history -s user -- node /absolute/path/to/agent-history-mcp/dist/index.jsAny MCP client works — the config is just a stdio command:
{
"mcpServers": {
"agent-history": { "command": "npx", "args": ["-y", "agent-history-mcp"] }
}
}Tools
search(query, k?=8, agent?, project?)— semantic search; returns ranked chunks, each with achunkId, agent, session id, cwd, and timestamp.get_context(chunkId, radius?=2)— expand a hit into its neighboring chunks from the same session (bounded — still not the whole transcript).list_agents()— which stores are present locally and how many sessions/chunks are indexed.
Configuration (optional)
Create ~/.agent-history-mcp/config.json:
{
"claudeRoot": "~/.claude/projects",
"hermesDb": "~/.hermes/state.db",
"extraRoots": [{ "agent": "codex", "dir": "/path/to/codex/sessions" }],
"model": "Xenova/all-MiniLM-L6-v2",
"maxChunkChars": 1200
}Set AGENT_HISTORY_HOME to relocate the cache/index directory.
How it works
Discover sessions cheaply (file mtime/size, or SQLite row counts) — no content read.
Chunk each changed session into role-prefixed, size-bounded chunks.
Embed each chunk locally (mean-pooled, L2-normalized → cosine = dot product).
Cache per session as a sidecar JSON under
~/.agent-history-mcp/index/; only new/changed sessions are re-embedded on later runs.Search by embedding the query and brute-forcing cosine over the in-memory vectors — exact and plenty fast at personal scale.
No server, no external vector DB, no API keys.
Roadmap
Today it's local-only. The plan is to run it as a small daemon on every machine and search your entire cross-device agent memory over your Tailscale tailnet — federated, private, WireGuard-encrypted, no public ports. See ROADMAP.md.
License
MIT
This server cannot be installed
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 Servers
- Flicense-qualityDmaintenanceEnables semantic search over local notes and documents using natural language queries. Supports multiple file types (Markdown, Python, HTML, JSON, CSV, text) with fast local embeddings and persistent ChromaDB vector storage.1
- Alicense-qualityBmaintenanceIndexes and searches agent conversation logs from Antigravity and Cursor workspaces, enabling semantic search, token analysis, and benchmarking over local SQLite storage.19MIT
- AlicenseBqualityBmaintenanceProvides local, agentic semantic recall over Claude Code session history, enabling the agent to search past discussions semantically, expand turns, and grep transcripts.511MIT
- Alicense-qualityBmaintenanceEnables AI coding agents to perform semantic code search locally, finding code by meaning rather than exact keywords.3MIT
Related MCP Connectors
Persistent memory for AI agents. Search, store, and recall across sessions.
Securely search and manage workspace context files for AI agents and teams.
Long-term memory for AI assistants. Hybrid retrieval, query expansion, auto-topics.
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/TerminalGravity/agent-history-mcp'
If you have feedback or need assistance with the MCP directory API, please join our Discord server