Guide
Add document search to Claude Code
After this, Claude Code can answer from your own PDFs and quote the page it read. About five minutes, most of it waiting for the first query.
1. Give Claude Code the tool
Paste this into a Claude Code session and let it work:
Fetch https://retrievr.io/install and follow it.It opens a page for you to approve, writes a key to ~/.config/retrievr/credentials without ever printing it, downloads the MCP server, and tells you the entry to add. Approve the sign-in when it asks.
2. Or do it by hand
If you would rather type every command yourself, this is the same flow. Start the device exchange:
curl -fsSL https://retrievr.io/connect -o /tmp/retrievr-connect.sh
less /tmp/retrievr-connect.sh
sh /tmp/retrievr-connect.sh beginIt prints a short code and a URL. Approve it in the browser, then finish — this writes the key to disk:
sh /tmp/retrievr-connect.sh finishThen fetch the server and register it with Claude Code. -s user makes the tool available in every project; leave it off for this one only:
mkdir -p ~/.config/retrievr
curl -fsSL https://raw.githubusercontent.com/retrievr-io/retrievr_mcp/main/mcp.mjs \
-o ~/.config/retrievr/mcp.mjs
less ~/.config/retrievr/mcp.mjs
claude mcp add retrievr -s user -- node ~/.config/retrievr/mcp.mjsA project can carry the same thing in .mcp.json instead, which is the form to commit if a team should share it:
{
"mcpServers": {
"retrievr": {
"command": "node",
"args": ["~/.config/retrievr/mcp.mjs"]
}
}
}3. Check it is there
Restart the session — the tool list is read when a session starts — then ask /mcp and look for retrievr with three tools: retrievr_search, retrievr_documents and retrievr_delete_document.
4. Ask it something
Upload a document from your library — the first five documents need no payment, and after that one $5 top-up unlocks uploading — then ask in plain language:
In the lease, what does it say about termination?
Which of my documents mentions the notice period?A search covers your own library and nothing else, because that is all there is. “In the lease and the proposal, what does it say about budgets?” searches only those two, which is how you keep a question out of the other forty documents you uploaded and never think about.
Ready when you ask
The service is always ready. A query is answered in well under a second, whenever it arrives, and there is nothing to start on your side: no server to run, no index to build before the first question. Install the tool and ask.
A failed call is reported as a tool result, not as a broken server — so if something else is wrong, the message says what: a missing key, a spent balance, or a document name that matches nothing.
What it costs
$0.01 per query, charged when the query is accepted. Uploading and indexing are free. The full price list, or the same guide for Cursor.