MCP server for logging, replaying, comparing, and analyzing RAG retrieval runs locally.
Copy the AI prompt to install this server into Claude Code, Cursor, or another agent โ or use 1-click editor setup below.
We haven't yet run this listing's install command through our automated sandbox check. This isn't a red flag โ we're steadily working through the catalog.
๐ก Paste the JSON block into your client's configuration file under mcpServers, then restart the application.
Inspect callable tools, capabilities, and parameters exposed to AI agents by Retrieval Lens.
A black-box flight recorder for RAG retrieval inside MCP agents.
retrieval-lens is an MCP server that logs every retrieval step your RAG agent makes โ what chunks were retrieved, their scores, sources, and rankings โ so you can audit, replay, and diff retrieval runs after the fact.
When a RAG agent gives a wrong answer, you need to know: did retrieval fail, or did generation fail? Right now there's no easy way to answer that. Your observability tool shows you the LLM call. It doesn't show you which chunks the model saw before it answered, what scores they had, or how retrieval changed between yesterday and today.
retrieval-lens fixes that. Every retrieval run is logged. Nothing is hidden.
When your RAG agent gives a wrong answer, ask retrieval-lens what it saw:
See docs/demo-diff.png for real output from Claude Code.
| Tool | What it does |
|---|---|
retrieval_observe | Log a retrieval run โ query, chunks, scores, sources, rankings |
retrieval_query | Replay what the model saw before a specific answer |
retrieval_diff | Compare two retrieval runs โ what changed, what score drifted |
retrieval_stats | Aggregate score distributions, top sources, runs over time |
Run retrieval-lens directly with npx:
Add retrieval-lens to Claude Code with one command:
Then call retrieval_observe after every retrieval step in your RAG pipeline:
See examples/langchain-adapter.ts
See examples/llamaindex-adapter.ts
Those are full observability platforms. retrieval-lens is surgical:
๐ง Active development. Harness-first build using harness engineering principles.
MIT
Factual signals from GitHub, npm, and our automated checks โ not a rating.
No reviews yet โ be the first to share how this listing worked for you.
Showcase your server listing on GitHub or your project documentation. Embed this dynamic SVG badge to highlight official listing status and live engagement.
[](https://allmcps.com/mcp/vbj1808-retrieval-lens)<a href="https://allmcps.com/mcp/vbj1808-retrieval-lens"><img src="https://allmcps.com/api/badge/vbj1808-retrieval-lens?style=directory" alt="Retrieval Lens on AllMCPs" /></a>