retrievr

Guide

Add document search to Cursor

After this, Cursor's agent can answer from your own PDFs and quote the page it read. Use the agent — the tool is called by the model, so it does nothing in inline completion.

1. Let the agent install it

Paste this into an agent chat and let it work:

Fetch https://retrievr.io/install and follow it.

It opens a page for you to approve, stores a key at ~/.config/retrievr/credentials without printing it, downloads the MCP server, and prints the config entry. You still have to switch the server on in Cursor — step 3.

2. Or do it by hand

Start the device exchange, approve it in the browser, then finish:

curl -fsSL https://retrievr.io/connect -o /tmp/retrievr-connect.sh
less /tmp/retrievr-connect.sh
sh /tmp/retrievr-connect.sh begin
# approve the code in the browser
sh /tmp/retrievr-connect.sh finish

Then download the server:

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

3. Register it with Cursor

Cursor reads MCP servers from ~/.cursor/mcp.json for every project, or from .cursor/mcp.json inside a project for that project only. Cursor Settings → MCP has an “add” button that opens the same file. Add:

{
  "mcpServers": {
    "retrievr": {
      "command": "node",
      "args": ["~/.config/retrievr/mcp.mjs"]
    }
  }
}

Then open Cursor Settings → MCP and check that retrievr is listed and enabled — a server added to the file but left toggled off never reaches the agent. The tool list is read at session start, so reload the window afterwards.

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 the agent:

In the lease, what does it say about termination?
Search my own documents for the notice period.

Passages come back with their citation — title, author, section, character range and licence — so the agent can quote rather than paraphrase. A search covers your own library and nothing else; there is no shared corpus and no second place the answer could come from.

When the first query hangs

The embedder scales to zero, and the first call after a quiet spell has taken over two minutes while it loads. A retry is another accepted query and another cent — so it is cheaper to wait than to reinstall, and nothing is charged for the time itself.

A failure arrives as a tool result rather than a dead server, so the message names the problem: no key yet, a spent balance, or a document name that matched 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 Claude Code.