quivr mcp on your machine to pass its tool calls to Quivr. Quivr finds the passages; the agent’s model writes the answer.
- You ask the agent a question.
- The agent calls a Quivr tool, such as
search. Its MCP client hands the call toquivr mcp, a program it started on your machine. quivr mcpsends the request to Quivr’s HTTP API with your API key. Quivr checks the key and returns the matching passages with their sources.- The agent’s model reads the passages and writes the answer, citing them.
Prerequisites
- An AI agent that supports MCP, such as Claude Desktop, Claude Code or Cursor, with its own account.
-
The
quivrcommand, built from your Quivr checkout with Go 1.27.3. Run this in the checkout, then check it withcommand -v quivr: -
jq, for the checks below. -
A Quivr address and an API key. Quivr’s MCP tools come in two profiles:
readto search and read,ingestto also add text. Each needs these key permissions:- To try it on your machine, follow the Quickstart.
make devstarts Quivr and prints its address.eval "$(make -s env)"setsQUIVR_API_URLandQUIVR_API_KEYin your shell, with a local key that has every permission this guide uses. - For an existing installation, ask its operator for its address and a key with the permissions of the profile you will use.
- To try it on your machine, follow the Quickstart.
Add Quivr to your agent
1
Pick a profile
The profile picks the tools the agent sees:
No profile can withdraw or delete a document, or rebuild a Corpus’s search index. Start with
read.2
Add the server to your agent's settings
MCP clients read an
mcpServers entry like this one:--profile is required. Replace the two values with your own; on your machine, make -s env prints both. If the client cannot find quivr, put the full path that command -v quivr prints in command.Where the entry goes depends on the client:In Claude Code, run this command from the project where you will use Quivr. It adds Quivr to that project only; add
--scope user to use it in every project (installation scopes).3
Restart the agent
Most clients start their MCP servers when they start, so restart the agent or reload its MCP servers.
Check the local command
This lists the toolsquivr mcp offers, without an agent and without contacting Quivr. Run it in the shell where QUIVR_API_URL and QUIVR_API_KEY are set:
--profile ingest, the list also has ingest_text and read_receipt.
Check the connection
Ask the agent a question that reaches Quivr, using a word that appears in your documents:list_corpora, then search, and quote a passage with its source. What it writes depends on its model; this prompt was not run against a model for this page. If a call fails, the agent receives a tool error:
Cite a source
Quivr stores each document as a Record. Each text a Record has had is a Version: a correction adds a new Version, and older ones stay readable. A Version’s text is split into Parts, such as its title and its body. Eachsearch hit carries what a citation needs:
A hit from a local Quivr, trimmed to the fields a citation needs, with its identifiers shortened:
body Part, its whole text here.
read_record with the hit’s record_id and version_id returns the Record and that whole Version, so the agent can read the passage in context. If the returned record.current_version_id differs from the hit’s version_id, the Record has changed since: a newer Version replaced it, or it was withdrawn.
To check a quote from a text Record, such as one added with ingest_text, find the Part in that result: the item of version.manifest.parts whose key is the hit’s part_key. The slice of its content.text from start to end equals excerpt.text. jq slices strings by code point, so .content.text[0:39] gives the passage above.
Add text
With theingest profile, ingest_text adds a text to a Corpus. It takes:
corpus_id, fromlist_corpora;record_key, the agent’s stable name for the Record;text;- optionally a
namespace, which groups record keys and defaults tomcp, and anidempotency_key(see retries below).
record_key together. To correct a Record, send the new text with all three unchanged; changing any of them creates another Record.
Follow the Receipt
ingest_text answers with a Receipt, Quivr’s note that it accepted the text, before the text is searchable. Call read_receipt with its receipt_id until one of these holds:
Anything else, such as
state pending or a Version still building, means Quivr is still working: call again, for example once a second. On a local Quivr, a short text became searchable in about a second.
Retry a call
Without anidempotency_key, the tool derives one from corpus_id, namespace, record_key and text. Repeating the same call returns the same Receipt instead of adding a duplicate.
With your own idempotency_key, repeating the key with the same arguments returns the same Receipt. The same key with different arguments fails with idempotency_conflict.
Sending, under a new key, the text the Record last received returns duplicate and changes nothing.
Go back to an earlier text
Sending an earlier text again creates a new Version containing that text, which becomes current once it is searchable. The earlier Version keeps its ownversion_id.
- After the correction is searchable, send the earlier text without an
idempotency_key. The tool sees that its earlier Receipt was replaced and submits the text again. Going back to the same text works 16 times; the next attempt stops withconflict, and you pass your own key then. - Before the correction is searchable, pass a new
idempotency_key, any string you have not used before, and reuse it only to retry this same call. Without one, the call replays the earlier Receipt and the correction still becomes current.
Who sees what
The API key decides everything, on the server. The profile only narrows which tools the agent sees; it never widens access.
A failed call reaches the agent as a tool error, usually with an error code and, for common codes, a hint, so the agent can correct the call.
Clean up
To disconnect the agent, delete thequivr entry from its settings; in Claude Code, run claude mcp remove quivr from the same project. Disconnecting leaves in Quivr the Records an agent added. To remove one from search, withdraw it.
Next
- Search: the search modes and filters the agent’s
searchtool uses. - MCP reference: every tool with its arguments.