A community-driven registry for Claude, Cursor, Windsurf, Cline & more. Not affiliated with Anthropic.
Are you the author? Sign in to claim
MCP server that audits RAG retrieval - logs what chunks the model saw before any answer was generated
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:
await mcp.call("retrieval_diff", {
run_id_a: "support-bot-before-embedding-refresh",
run_id_b: "support-bot-after-embedding-refresh",
match_by: "source"
});
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:
npx retrieval-lens
Add retrieval-lens to Claude Code with one command:
claude mcp add retrieval-lens npx retrieval-lens
Then call retrieval_observe after every retrieval step in your RAG pipeline:
await mcp.call("retrieval_observe", {
run_id: crypto.randomUUID(),
query: "what is the refund policy?",
chunks: [
{ content: "Refunds are processed within 5 days...", score: 0.91, source: "policy.md", rank: 1 },
{ content: "Contact support for refund requests...", score: 0.74, source: "faq.md", rank: 2 }
],
pipeline_tag: "support-bot"
});
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
MCP server integration for DaVinci Resolve Studio
Run Claude Code as an MCP server so any agent can delegate coding tasks to it
Browser automation using accessibility snapshots instead of screenshots
A Jetbrains IDE IntelliJ plugin aimed to provide coding agents the ability to leverage intelliJ's indexing of the codeba