claude-lens
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., "@claude-lensHow did I fix the auth bug in betterclaw?"
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.
claude-lens
MCP server that gives Claude Code searchable memory across all past sessions.
Indexes every Claude Code session JSONL file into a SQLite database with FTS5 full-text search. Claude gets tools to search conversations, find past tool calls, filter by project or date, and look up errors it's solved before.
How it works
Claude Code stores sessions as JSONL files in ~/.claude/projects/. claude-lens parses these on startup, builds an FTS5 search index, and exposes 9 tools via MCP. Claude's agent loop decides when to search its own history — no manual invocation needed.
This is active recall, not passive RAG. Claude decides what to search for, reads results, and can drill deeper with follow-up queries. Same pattern as a human using a search engine — multiple targeted queries beat one blind retrieval.
Related MCP server: conversation-search
Tools
Tool | What it does |
| Full-text search across all session messages |
| Search past Bash commands, file edits, grep patterns |
| Read a full session transcript |
| Quick metadata: project, model, tools used, files touched |
| List sessions for a specific project |
| Find sessions within a date range |
| All projects with session counts |
| Overall index statistics |
| Find past tool errors and how they were resolved |
Install
git clone https://github.com/jasonpaulmichaels/claude-lens.git
cd claude-lens
bash scripts/install.shOr manually:
# Sync repo to runtime install location
rsync -a --exclude=node_modules --exclude=.git --exclude=test \
./ ~/.claude/mods/claude-lens/
cd ~/.claude/mods/claude-lens && npm install --omit=dev
# Register MCP server (user scope so it's available everywhere)
claude mcp add -s user claude-lens -- node ~/.claude/mods/claude-lens/src/index.jsinstall.sh does this for you. Source repo stays separate from runtime install — edit source, re-run install.sh to deploy.
Restart Claude Code after installing. First startup indexes all sessions (takes a few minutes). Subsequent startups are incremental (<5 seconds).
Usage
Just use Claude Code normally. When context from past sessions would help, Claude will search automatically. You can also ask directly:
"What was I working on last week?"
"How did I fix the auth bug in betterclaw?"
"Find the session where I set up the cloudflare tunnel"
"What command did I run to rebuild the kernel module?"
"Show me errors I hit while working on listforge"
Requirements
Node.js 20+
Claude Code with MCP support
Data
Sessions indexed from:
~/.claude/projects/Database stored at:
~/.claude-lens/claude-lens.dbSubagent sessions are skipped
Tool outputs truncated to 500 chars to keep DB manageable
Incremental indexing via file mtime tracking
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
- -licenseNot gradedqualityNot gradedmaintenanceEnables comprehensive search and analysis of Claude Code conversation history using full-text search, optional semantic vector search, and conversation management tools. Provides fast SQLite-based indexing with role-based filtering, project organization, and hybrid search capabilities combining keyword and semantic matching.
- FlicenseNot gradedqualityDmaintenanceFull-text search over Claude Code conversation history using SQLite FTS5, exposing indexed transcripts as MCP tools for searching, browsing, and reading turns.3
- AlicenseAqualityDmaintenanceEnables Claude Code to search, browse, and read its own past conversation history across all projects using BM25 keyword search.118MIT
- AlicenseNot gradedqualityDmaintenanceEnables searching and browsing past Claude Code conversations directly from within an active Claude session, with full-text search and cost tracking.MIT
Related MCP Connectors
Search your AI chat history (ChatGPT, Claude, Codex) from any MCP client. Remote, private, read-only
Code intelligence for coding agents: semantic, AST, graph, and full-text search. 279+ languages.
Cross-agent artifact workspace with provenance across Claude Code, Codex, Cursor, LangGraph.
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/sanchez314c/claude-lens'
If you have feedback or need assistance with the MCP directory API, please join our Discord server