RememberStackremember.dev/docs

MCP tools

Pagination follows the shared Pagination and truncation contract (D154).

MCP (Model Context Protocol) lets agents call external tools. Use it for clients without a shell. Agents with shell access can use the CLI and load command help and results on demand. remember mcp gives an agent access to your memory. It is part of the remember package, runs next to the agent, and talks to one deployment. It speaks on standard input and output (the agent starts it), or over HTTP (agents connect to a URL).

How to connect an agent step by step: Connect your coding agent.

remember mcp

remember mcp [--read-only] [--api-url URL] [--api-key KEY] [--project PROJECT]
remember mcp --transport http [--bind HOST:PORT] [--read-only] [--api-url URL]

By default the server reads JSON-RPC 2.0 messages from standard input, one per line, and writes one response per line to standard output. It finds the deployment and key the same way as every other remember command: flags, then environment variables, then the credential file. See CLI: How the CLI finds your deployment. --transport http serves the same tools over HTTP; see Over HTTP.

--read-only leaves out the tools that change memory (ingest, archive_document, unarchive_document, forget_document and the four tag tools that change tags), and refuses calls to them with the error read_only. pipeline_readiness and search_documents only read, so they stay.

Protocol

MethodBehaviour
initializeRequires params.protocolVersion (any string). Answers with protocolVersion 2025-11-25, capabilities: {"tools": {}} and serverInfo: {"name": "remember", "version": "<package version>"}.
pingAnswers {}.
tools/listReturns the tool list; see below.
tools/callRuns one tool. params.name is required; params.arguments must be an object when present.
Notifications (no id)Accepted; no response.
Anything elseError -32601.

JSON-RPC error codes: -32700 for a line that is not JSON, -32600 for a message that is not a valid request, -32602 for bad initialize or tools/call parameters, -32603 for a failure while building the answer (for example tools/list when the deployment cannot be reached or rejects the key).

The server offers tools only: no resources and no prompts.

How tools/list is built

The remember package supplies the tool names, descriptions, input schemas and read-only and destructive hints. Tool results arrive when you call a tool. Each tool has a version number that rises when its arguments change in a way an older engine could not handle.

Every tools/list call reads GET /deployment and lists, in this order, each tool the deployment reports at the same version:

  1. ingest, pipeline_readiness, archive_document, unarchive_document, forget_document, search_documents, section_history, document_references, and the five tag tools list_tags, create_tag, update_tag, delete_tag and update_document_tags (with --read-only, only pipeline_readiness, search_documents, section_history, document_references and list_tags).
  2. The four assured operations: resolve_entity, claims_and_sources_context, facts_context, combined_context.
  3. Context expansion: adjacent_chunks.
  4. The seven SQL query tools, when the deployment serves the query space.

A tool the deployment does not serve, or serves at another version, is left out: upgrade remember or the engine so their versions match. If GET /deployment fails (unreachable, 401, 403), tools/list fails with -32603, so a wrong key never looks like an empty tool list. A full server lists 25 tools.

A deployment that does not process the facts layer does not report resolve_entity or facts_context, so they are left out. With --layers, the server also leaves out every tool that reads only layers outside the selection, and each remaining read uses only the selected layers. A call that needs a missing layer fails with layer_unavailable.

Every tool carries MCP tool annotations: readOnlyHint is true for a tool that only reads and false for ingest, archive_document, unarchive_document, forget_document and the four tag tools that change tags, and destructiveHint is true only for forget_document and delete_tag. Archiving is not destructive: the document stays as history and unarchive_document undoes it.

The server serves one deployment, so no tool takes a project argument; a call that passes one is refused with project_routing_unavailable. A call to a name that is not one of these tools is refused with unknown_tool. Neither reaches the deployment.

Over HTTP

remember mcp --transport http --api-url http://127.0.0.1:8000

The server listens at http://127.0.0.1:8765/mcp (Streamable HTTP, the MCP transport for servers an agent reaches by URL). --bind HOST:PORT changes the address.

RequestBehaviour
POST /mcpOne JSON-RPC message per request, answered with application/json; a notification gets 202 and no body.
initializeA successful one opens a session: the answer carries an Mcp-Session-Id header. Every later request must send it back.
Missing Mcp-Session-Id400.
MCP-Protocol-Version other than 2025-11-25400. The header is optional.
Unknown or expired session404: initialize again. A session unused for an hour expires.
DELETE /mcp with Mcp-Session-IdEnds the session (204).
GET /mcp405: the server never sends messages of its own.
Origin header that is not the server's own address403. This stops a web page from reaching the server through a hostname it controls.
More than 16 open connections503 with Retry-After: 1, and the connection is closed. An idle connection is closed after 30 seconds.
Body over 32 MiB413. Only an ingest body sent as content_base64 gets this big; use remember ingest for larger files.
A client that stops sending for 30 secondsThe connection is closed.

The HTTP server holds no key. It passes each caller's Authorization header to the engine unchanged with every call, so the engine decides what each caller may do, and a caller without a key reaches the engine without one. tools/list therefore shows every tool the deployment serves; a call the caller's key may not make returns insufficient_permission. --api-key and --project are refused with --transport http.

ingest does not offer the path body over HTTP: the caller may be on another machine.

It listens on a loopback address only; --bind with any other address is refused. To let agents on other machines reach it, put a reverse proxy in front of it that authenticates callers and terminates TLS.

Results

Every tools/call result has this shape:

{
  "content": [{"type": "text", "text": "<JSON>"}],
  "isError": false
}

The text is a JSON document: the tool's result on success, an error object when isError is true; see Errors.

ingest

Stores one document. Returns as soon as the bytes are stored; processing takes minutes. Call pipeline_readiness before expecting the content in results.

Give exactly one body: text, content_base64 or path.

ParameterTypeRequiredLimits and default
textstringone body is requiredNon-empty UTF-8 text. Needs filename. Default mime: the text type of the filename's extension (.md is text/markdown), else text/plain.
content_base64stringStandard base64, no data: prefix. Needs filename. Default mime: from the filename's extension (.md is text/markdown, .pdf is application/pdf; the full table is in Ingest files), else application/octet-stream.
pathstringA file on the machine running the server. Refused unless path ingest is enabled; see Ingest from a path. Default filename: the file's name. Default mime: from the extension of the file's real name, as for content_base64.
filenamestringwith text or content_base641–512 characters.
mimestringno1–255 characters. An explicit value always wins over the defaults above. The engine processes only media types it has a converter for; see File formats and converters.
titlestringnoAt most 512 characters.
source_kindstringno1–128 characters. Give with source_ref.
source_refstringno1–512 characters. Give with source_kind. The same pair later makes a new version of the same document.
versioning_mode"snapshot" or "living"noDefault "snapshot". "living" needs source_kind/source_ref.
source_modified_atstringnoISO 8601 timestamp with Z or a numeric UTC offset. Needs source_kind/source_ref.
source_version_refstringno1–512 characters. Needs source_kind/source_ref.
version_keystringno1–512 characters. A permanent name for this version, unique within the document. A new key always creates a version; an existing key is refused unless it re-sends the latest version's bytes. Needs source_kind/source_ref.
effective_fromstringnoInclusive start of the period this version's text is in force, with a UTC offset. Needs source_kind/source_ref and versioning_mode "snapshot".
effective_untilstringnoExclusive end of that period with a UTC offset, later than effective_from. Without it the period lasts until the next declared start.
tagsarray of stringsnoAt most 64, no repeats, each 1–128 characters after Unicode NFC. Registered tags, by name (any letter case) or tag_id, to add to the document. Ingest never removes a tag. An unregistered tag refuses the whole call with unknown_tag before anything is stored. See list_tags.
allow_forgottenbooleannoDefault false. Add back content of a forgotten document. Without it such content is refused with document_forgotten; with it, it is refused with forget_not_complete while that forget is still erasing, and otherwise comes back under a new doc_id. The tool description tells the agent to set it only after the user confirms.

ingest is at tool version 4; the allow_forgotten argument raised it from 3. Unknown keys are refused. What a key and a period do: Versions in force. The input schema enforces the one-body rule with oneOf.

Success result:

{
  "deployment_id": "…",
  "doc_id": "…",
  "version_id": "…",
  "content_hash": "…",
  "created": true,
  "mime": "text/markdown",
  "title": "…",
  "versioning_mode": "snapshot",
  "parked": null,
  "version_key": null,
  "pipeline": {
    "status": "accepted_not_ready",
    "next_tool": "pipeline_readiness",
    "poll_with": {
      "version_ids": ["…"],
      "require": {"pipeline": true, "p1": true, "live_graph": true, "p3": false}
    },
    "guidance": "Ingest accepted. Wait until pipeline_readiness.ready is true …"
  }
}

created: false means these exact bytes were already stored; no new processing starts, and one readiness check tells the agent whether the content is already available.

parked: "no_route" means the file's conversion is parked waiting for a conversion route for its media type. The bytes are stored, but they are not read until an operator adds a route if needed and runs remember ops resume-no-route. The reply then has pipeline.status parked_no_route, no next_tool or poll_with, and guidance telling the agent to tell the user instead of polling readiness.

The server does not check body size itself. The deployment refuses a body over its limit, and the tool returns body_too_large.

Ingest from a path

The path body is off by default. To allow it, list the directories the server may read:

export REMEMBERSTACK_MCP_INGEST_ROOTS='["/home/john/notes", "/srv/specs"]'
# or: REMEMBERSTACK_MCP_INGEST_ROOTS=/home/john/notes,/srv/specs
VariableDefaultMeaning
REMEMBERSTACK_MCP_INGEST_ROOTSempty: path refusedA JSON array or a comma-separated list of directories.
REMEMBERSTACK_MCP_PATH_READ_MAX_BYTES268435456 (256 MiB)The largest file the server reads from a path. It protects the server process; it is not the deployment's upload limit.

Rules for a path:

  • ~ is expanded and the path is resolved fully, following symbolic links. The result must be inside a listed directory (path_not_allowed).
  • The target must exist and be readable (path_unreadable).
  • It must be a regular file, not a directory, pipe or device (path_not_regular_file).
  • Its size is checked before and while reading (path_too_large).

The path is read on the machine running remember mcp, never on the engine host.

pipeline_readiness

Checks whether ingested versions are processed and ready to be found.

ParameterTypeRequiredLimits
version_idsarray of stringsyes1–1,000 version UUIDs from ingest.
requireobjectyesExactly four booleans: pipeline, p1, live_graph, p3. For ordinary use: pipeline, p1 and live_graph true, p3 false.

The result is the readiness report: ready, versions (each with stages and their status), capabilities, model_bindings, build_revision, document_binding_generation. Field detail: Result types.

The tool description tells the agent how to poll: wait about 30 seconds after ingest, then every 30–60 seconds; treat a failed stage as retrying and keep polling; stop at once and report the version and stage when a stage is dead_letter; stop and report after 20–30 minutes without ready. An ingest that returned created: false is polled the same way, because an earlier run of the same bytes may still be processing. See Wait until a document is queryable.

archive_document

Archives one document, every version of it: the memory stops believing it, and it stays readable as history. Its claims stop counting as evidence, and facts that only it supported are closed with a recorded retraction; facts other documents also support stay. Reads leave the document out unless they set include_archived.

ParameterTypeRequiredLimits
doc_idstringyesThe document's UUID, as ingest returned it or a result cites it. No other arguments are accepted.

The result is a DocumentArchive: doc_id, archived_at, claims_retired, relations_closed, observations_closed. Archiving an archived document returns the same archived_at with zero counts.

The tool description tells the agent to archive when the user says a document no longer holds (a dead plan, an outdated policy, a replaced price list), never to tidy up, and never as a way to correct one fact: to correct one, ingest a document that says the right thing. The token needs write scope. See POST /documents/{doc_id}/archive.

unarchive_document

Undoes an archive exactly: the document's claims count as evidence again, and the facts its archive closed reopen when they have support again. Its only model call is a best-effort refresh of the entity profiles whose facts changed.

ParameterTypeRequiredLimits
doc_idstringyesThe archived document's UUID. No other arguments are accepted.

The result is a DocumentUnarchive: doc_id, claims_restored, facts_reopened. A document that is not archived returns zero counts. The tool description tells the agent to use it only when the user says an archived document holds again. The token needs write scope. See POST /documents/{doc_id}/unarchive.

forget_document

Erases one document, every version of it, and everything derived only from it, for good. The document leaves every read at once and its doc_id answers as unknown; what was derived from it is erased in the background. Facts other documents also support stay, reworded from what survives. There is no undo: the content can only be ingested again with allow_forgotten.

ParameterTypeRequiredLimits
doc_idstringyesThe document's UUID, as ingest returned it or a result cites it.
confirmtrueyesMust be true. Without it the call is refused with confirmation_required and nothing is forgotten. No other arguments are accepted.

The result is the Forget record: forget_id, doc_id, status (erasing, then waiting_for_redaction while an authored knowledge page still cites the document, then complete), requested_at, completed_at, blocking_k_paths and last_error. A repeat returns the same record.

The tool description tells the agent to forget only when the user asks to forget or erase a specific document, to confirm with the user first, naming the document, and only then to pass confirm: true; never to tidy up or to correct a fact. See POST /documents/{doc_id}/forget.

search_documents

Finds documents (files) by the names they were stored under, their general metadata and their text. The tool description tells the agent to use it when the user names or describes a file ("find Q3_sales_2025.xlsx", "emails from Alice") rather than asking about its content.

ParameterTypeRequiredLimits
querystringno1–4,096 characters. Words from the file name, title, source path or text.
familyarray of stringsnoFormat families: markdown, text, other_text, code, config, log, html, ebook, notebook, email, word, presentation, pdf, spreadsheet, delimited, dataset, image, media, archive, binary.
authors, recipientsarray of stringsnoNames or addresses; any listed term matches.
created_from, created_to, modified_from, modified_tostringnoISO 8601 with a timezone, inclusive.
language, thread_refstringnoExact match.
doc_idsarray of stringsnoDocument UUIDs.
tagsobjectno{"all": [...], "any": [...], "none": [...]}: tag names or ids the document carries (every one), carries at least one of, or carries none of. At least one non-empty list; up to 32 tags each, none twice. An unregistered tag is unknown_tag.
include_archivedbooleannoDefault false. Also return archived documents, each with archived_at.
versions"current" or "all"noDefault "current".
timeobjectnoDefault {"mode": "current"}. For a document with declared effective periods, which editions are candidates; the four forms are under facts_context.
kintegernoRanked results with query: 1–200; default 20.
limitintegernoBrowse page size without query: 1–200; default 50.
cursorstringnoThe previous page's next_cursor; only without query.

search_documents is at tool version 5, and claims_and_sources_context, facts_context and combined_context at 6, 6 and 7: include_archived raised each by one. Unknown keys are refused. The result is a DocumentSearchPage: documents (each with doc_id, version_id, file_name, title, family, status, authors, recipients, dates, p3_path, served_version, effective, matching_editions, overview and archived_at), next_cursor, truncated, as_of, people_matched and scope_pending. When a people filter matches several different people, people_matched lists each with a document count and the description tells the agent to narrow the filter instead of guessing. The token needs read scope. How matching and paging work: POST /documents/search.

p3_path resolves the selected served version's corpus folder only behind a matching nullable publication marker. It is null for historical, raw-only, unpublished, updating and failed publications. served_version describes currency independently. After a type/topic/title move call search_documents again with doc_ids. Offline compute sha256(UUID(doc_id).bytes).hexdigest()[:24] and run find <root> -type d -name '*--<suffix>'; only the suffix is stable. Check doc_id and displayed version in document.json. See Filesystem views.

section_history

Follows one section of a document across its versions. A section key is the stable id a heading carries in the source: per-diem in ## 4. Per-diem allowance {#per-diem}.

ParameterTypeRequiredLimits and default
doc_idstringyesThe document's UUID.
section_keystringyes1–200 characters from A–Z a–z 0–9 _ . : / -, without the #.
timeobjectnoDefault {"mode": "history"}; the forms are under facts_context.
limitintegerno1–200; default 50.
cursorstringnoThe previous page's next_cursor.

The result is a SectionHistoryPage: one row per version with status present, absent, not_indexed or processing, and on the first page the amends references aimed at the section. An unknown or forgotten document is document_not_found. The token needs read scope. See GET …/sections/{section_key}/history.

document_references

Lists what a passage, section or document references and what references it, each reference resolved against the target versions in force during its source window.

ParameterTypeRequiredLimits and default
chunk_idstringone of chunk_id, doc_idA passage's chunk id: its version and section are the source.
doc_idstringone of chunk_id, doc_idA document's UUID.
section_keystringnoWith doc_id: the section and its subsections.
direction"outgoing", "incoming" or "both"noDefault "both".
kindsarray of stringsno1–7 of cites, links_to, attaches, replies_to, refers_to, amends, implements.
timeobjectnoDefault {"mode": "current"}; with chunk_id, the chunk's version's in-force time up to now.
limitintegerno1–200; default 50.
cursorstringnoThe previous page's next_cursor. A short page with a cursor means keep paging.

The result is a DocumentReferencesPage. An unknown document is document_not_found, an unknown passage chunk_not_found. The token needs read scope. See POST /documents/references.

Apart from the period arguments of ingest, no MCP tool changes effective periods or supplies references; use the HTTP API or the SDK for those.

Tag tools

Tags are names such as project:billing-migration, each with a description, that say how documents are organized. A tag is registered before any document carries it. What they are for: Tag documents. All five tools are at tool version 1. Wherever a tool takes a tag, it accepts the name in any letter case or the tag_id; for update_tag and delete_tag, remember mcp looks the id up from the name before calling the deployment. Unknown keys are refused.

list_tags

Lists the registered tags. The tool description tells the agent to call it before tagging a document, and before registering a tag, so it reuses an existing one.

ParameterTypeRequiredLimits
querystringno1–200 characters. Keeps tags whose name or description contains it, ignoring letter case.

The result is a TagList: tags, each with tag_id, name, description, created_at and updated_at, ordered by name. See GET /tags.

create_tag

ParameterTypeRequiredLimits
namestringyes1–128 characters, no whitespace or control characters. Unique ignoring letter case.
descriptionstringyesAt most 2,000 characters: what the tag means and when to apply it.

The result is the new Tag. A name already registered in any letter case is conflict. See POST /tags.

update_tag

ParameterTypeRequiredLimits
tagstringyesThe tag's name or tag_id, 1–128 characters after Unicode NFC.
namestringnoThe new name, with the rules of create_tag.
descriptionstringnoThe new description.

Give name, description or both. Documents keep the tag; the old name stops working at once. The result is the changed Tag.

delete_tag

ParameterTypeRequiredLimits
tagstringyesThe tag's name or tag_id, 1–128 characters after Unicode NFC.

Deletes the tag and removes it from every document that carries it. The result is the deleted Tag. The tool description tells the agent to use it only when the user asks.

update_document_tags

ParameterTypeRequiredLimits
doc_idstringyesThe document's UUID.
addarray of stringsnoAt most 64, no repeats. Tags to add.
removearray of stringsnoAt most 64, no repeats. Tags to remove.
setarray of stringsnoAt most 64, no repeats. The complete set; excludes add and remove. [] removes every tag.

Changes the document's tags in one step and returns DocumentTags: doc_id and the tags afterwards. Every tag must be registered; any unregistered one refuses the whole call with unknown_tag. Removing a registered tag the document does not carry is not an error. Changing tags never reprocesses the document. An unknown or forgotten document is document_not_found. See POST /documents/{doc_id}/tags.

Assured operations

These four tools are the deployment's assured operations. Their input schemas come from the remember package, as for every tool. Behaviour and results: Assured operations.

resolve_entity

Resolves a name to ranked candidate entities; never guesses silently.

ParameterTypeRequiredLimits
namestringyesAt least 1 character.

claims_and_sources_context

What sources said: current claims and the source passages that confirm them.

ParameterTypeRequiredLimits and default
querystringyes1–8,192 characters.
entity_idsarray of UUID stringsno1–20, unique.
kintegerno1–100; default 50.
candidate_kintegerno1–400; omitted means max(4*k, 60) per search channel; not smaller than k.
documentsobjectnoOnly what matching documents say; the fields are under facts_context.
timeobjectnoDefault {"mode": "current"}; the forms are under facts_context. Which versions of documents with declared effective periods are read.

facts_context

What the memory holds true: relations and observations under a time scope, with a bounded look at the entities' neighbourhood.

ParameterTypeRequiredLimits and default
querystringyes1–8,192 characters.
entity_idsarray of UUID stringsno1–19, unique.
kintegerno1–100; default 50.
candidate_kintegerno1–400; omitted means max(4*k, 60) per search channel; not smaller than k.
evidence_per_factintegerno1–5; default 3.
hopsintegerno1–2; default 1.
predicatestringno1–200 characters.
documentsobjectnoOnly facts supported by matching documents. See below.
timeobjectnoDefault {"mode": "current"}. See below.

time is one of:

{"mode": "current"}
{"mode": "at", "at": "2026-09-01T00:00:00Z"}
{"mode": "overlap", "from": "2026-07-01T00:00:00Z", "to": "2026-09-30T23:59:59Z"}
{"mode": "history"}

Timestamps are ISO 8601 date-times. What each mode means: Time. For documents with declared effective periods, time also decides which versions count as evidence: Text in force.

documents limits the read to certain documents, with the fields of search_documents' filters: family, authors, recipients, created_from, created_to, modified_from, modified_to, language, thread_ref, doc_ids, tags ({"all": [...], "any": [...], "none": [...]}) and include_archived (default false). Call list_tags before filtering by tag; an unregistered tag is unknown_tag. Archived documents are left out unless include_archived is true; then each claim and passage from one carries "archived": true, and its claims never count as current support. Supporting evidence then comes only from matching documents, while contradicting evidence and competing facts from every other document stay in the answer, marked "in_documents_filter": false: The documents filter.

combined_context

Both of the above in one call, returned as ContextBundle/v2. The same k applies separately to facts, claims and chunks; candidate_k bounds each search channel, rather than the total across channels.

ParameterTypeRequiredLimits and default
querystringyes1–8,192 characters.
kintegerno1–100 per evidence type; default 50.
candidate_kintegerno1–400; omitted means max(4*k, 60) per search channel; not smaller than k.
entity_idsarray of UUID stringsno1–19, unique.
hopsintegerno1–2; default 1.
predicatestringno1–200 characters.
documentsobjectnoAs in facts_context; applies to both halves.
timeobjectnoAs in facts_context; applies to both halves.

For every operation, unknown keys are refused, and integers must be whole numbers.

Context expansion tool

adjacent_chunks

Retrieve neighbouring chunks preceding and succeeding a target chunk within the same document to expand conversational or narrative context. Returns an Envelope containing surrounding chunks ordered by ordinal.

ParameterTypeRequiredLimits and default
chunk_idstring (UUID)yesTarget chunk UUID to expand around.
windowintegernoNumber of neighbouring chunks on each side (1 or 2, default 1).

SQL query tools

SQL queries run over the query space (memory_v1): prepared, read-only views and functions. The engine parses every statement and validates it against the query space before it runs; anything outside it is rejected. See Query space memory_v1.

All seven tools refuse unknown keys, wrong types (including null for a string field), booleans in place of integers, and out-of-range numbers.

ToolParametersResult
query_sqlsql (string, required); parameters (array of values for $1, $2, …); max_rows (integer 0–1,000)QueryResult/v1
explain_sqlsql (string, required); parameters (array)QueryResult/v1 with the plan; the statement does not run
describe_query_spacepattern (string, shell-style filter over view names); include_examples (boolean, default false)The query space description
search_query_spacequery (string, required); k (integer 1–25, default 10)A list of {kind, name, score, purpose, tags}; searches the query space's own documentation, never your data
list_saved_queriesnamespace (identifier); status (string)Saved-query summaries; without status, active versions only
describe_saved_querynamespace, name (identifiers, required); version (integer ≥ 1)One saved query: SQL, parameters, declared columns, validation state
run_saved_querynamespace, name (identifiers, required); version (integer ≥ 1); parameters (array); max_rows (integer 0–1,000)QueryResult/v1

Identifiers (namespace, name) must match ^[a-z][a-z0-9_]*$. See Saved queries.

Errors

Errors come back as a tool result with isError: true, so the agent can read them. Every tool returns the same JSON:

{
  "error": {
    "code": "rate_limited",
    "status_code": 429,
    "detail": "…",
    "retryable": true,
    "agent_action": "Wait retry_after seconds (if given), then retry; …",
    "retry_after": 7
  }
}
FieldMeaning
codeA stable code: the deployment's own code when it sent one (SQL query errors, rate_limited), else one of the codes below.
status_codeThe deployment's HTTP status. 0 when no answer arrived; null when the call never reached the deployment (the server refused it itself).
detailWhat went wrong.
retryableWhether the same call can succeed later.
agent_actionWhat the agent should do next.
retry_afterSeconds to wait, when the deployment said.
reason_code, request_idPresent only when known.
codestatus_coderetryableWhen
invalid_argumentsnullnoMissing, unknown or malformed arguments; not exactly one body; bad base64; bad UUID; bad timestamp.
unknown_toolnullnoThe name is not one of the server's tools.
project_routing_unavailablenullnoThe call passed a project argument.
read_onlynullnoA tool that changes memory, on a --read-only server.
source_lineage_pairnullnoOnly one of source_kind and source_ref, or lineage-only fields without them.
encoding_errornullnotext cannot be encoded as UTF-8.
empty_bodynull, or the deployment'snoThe body is empty.
path_not_allowednullnoPath ingest is off, or the path is outside the listed directories, or contains a NUL byte.
path_unreadablenullnoThe path does not exist or cannot be read.
path_not_regular_filenullnoDirectory, pipe, device or other special file.
path_too_largenullnoLarger than the read limit.
confirmation_requirednullnoforget_document without confirm: true. Nothing was forgotten.
document_not_found404noarchive_document, unarchive_document, forget_document: no such document (forgetting a forgotten document again returns its existing record). section_history, document_references, update_document_tags: no such document, or it is forgotten.
document_forgotten409noingest of content that belongs to a forgotten document, without allow_forgotten.
forget_not_complete409noingest with allow_forgotten while the matching forget is still erasing.
unknown_tag422, or 404 for update_tag and delete_tagnoA tag the call names is not registered. detail names every one.
conflict409nocreate_tag or update_tag: a tag with that name, in any letter case, is already registered.
tag_limit_exceeded409noThe deployment would have more than 10,000 tags, or the document more than 64. Nothing changed.
chunk_not_found404nodocument_references: no such passage, or its document is deleted.
body_too_large413noThe deployment refused the body as too large.
unauthorized401noThe key is missing, wrong, expired or revoked.
insufficient_permission403noThe key may not do this on this deployment.
rate_limited429yesThe key or the deployment sent too many requests; wait retry_after seconds.
concurrency_limited429yesToo many calls at once; wait retry_after seconds.
transport_error0yesNo answer from the deployment.
SQL query codesas sentas the codeA SQL query tool failed; the codes are in Errors and status codes.
engine_client_errorthe 4xx statusnoAny other 4xx from the deployment.
engine_unavailablethe 5xx statusyesA 5xx from the deployment. Retry 3–5 times with back-off (2 s to 30 s); then report an outage.
local_backend_errornullnoThe deployment's answer did not match the expected shape.
internal_errornullnoAn unexpected failure in the server.

Configuration that remember setup writes

remember setup writes one remember entry per agent, in one of these shapes:

ShapeWhenWhat the agent does
Stdio entryA self-hosted engineStarts <launcher> <args> with REMEMBER_API_URL; the server reads the key from the credential file.
URL entry--mcp-url, engine without a key, agent accepts URL entriesConnects to your remember mcp --transport http server.
URL entry with key header--mcp-url with --api-key, agent can refer to a variable in a headerConnects to that URL and sends Authorization: Bearer with the value of REMEMBER_API_KEY from its own environment.

Claude Code and Codex take URL entries only when their installed command line supports them (see remember setup); otherwise they get the stdio entry. A key is never written into any of these files: a URL entry names the REMEMBER_API_KEY variable, never its value.

In a stdio entry, <launcher> and <args> are one of:

Situationcommandargs
A remember binary installed outside a virtual environment or cacheabsolute path of remember["mcp"]
Otherwise, when uvx is installedabsolute path of uvx["remember", "mcp"]

A stdio entry's env block holds exactly one variable: REMEMBER_API_URL for a self-hosted engine (default http://127.0.0.1:8000).

Existing files are merged: other servers and settings are kept, and the remember entry is replaced. A file whose content would not change is not rewritten, and a rewritten file keeps its permissions.

Cursor

<project>/.cursor/mcp.json:

{
  "mcpServers": {
    "remember": {
      "command": "/Users/john/.local/bin/remember",
      "args": ["mcp"],
      "env": {
        "REMEMBER_API_URL": "http://127.0.0.1:8000"
      }
    }
  }
}

A URL entry is { "url": "http://127.0.0.1:8765/mcp" }. With a key header:

{
  "mcpServers": {
    "remember": {
      "url": "http://127.0.0.1:8765/mcp",
      "headers": { "Authorization": "Bearer ${env:REMEMBER_API_KEY}" }
    }
  }
}

Cursor replaces ${env:REMEMBER_API_KEY} with the variable's value when it connects.

It also writes a rule file, <project>/.cursor/rules/remember.mdc, replacing any earlier version:

---
description: Use Remember bitemporal memory for codebase facts, architecture, and past decisions
globs: *
alwaysApply: false
---
# Remember Memory Integration
 
Before making architectural decisions, refactoring core subsystems, or answering
questions about past codebase designs, consult Remember bitemporal memory via the
available MCP tools (`facts_context`, `combined_context`, `claims_and_sources_context`, `resolve_entity`, `query_sql`).
 
## Retrieval Discipline
1. **Resolve entities first:** Use `resolve_entity` to obtain canonical entity IDs for people, projects, modules, or concepts.
2. **Query facts first:** Use `facts_context` (with `time.mode="history"` for historical context or achievements) as the primary authority for adjudicated truth.
3. **Fall back to claims only when needed:** Use `claims_and_sources_context` if facts are missing or verbatim source text is required.
4. **Use `query_sql`** to run sandboxed SQL against `facts_current` or `graph_edges_current`.
 
## Temporal Semantics
- `valid_from` / `valid_until`: When the fact was true in the real world. Granularity is given by `valid_precision` (`instant`, `day`, `month`, `quarter`, `year`, `open`, `unknown`). `open` indicates an ongoing state with a known start date and no recorded end date.
- `asserted_at`: Strictly when the source made the statement (message sent / page published). Unresolved relative phrases in claim text (e.g. "last week", "yesterday") are relative to `asserted_at`. Never confuse speech time (`asserted_at`) with event validity (`valid_from`/`valid_until`).
- Check past decisions and bitemporal validity before asserting assumptions.
- Never guess historical rationale when it is recorded in Remember.

Claude Code

remember setup runs Claude Code's own command in the project directory, after removing any earlier remember entry with claude mcp remove --scope local remember:

claude mcp add --scope local remember -e REMEMBER_API_URL=http://127.0.0.1:8000 -- /Users/john/.local/bin/remember mcp

A URL entry is added with claude mcp add --scope local --transport http remember <url>. Claude Code does not get the key-header shape; with a key it gets the stdio entry. When claude is not on PATH, remember setup prints the command for you to run.

Claude Desktop

Always a stdio entry, as JSON like Cursor's (the mcpServers.remember entry, no rule file), merged into Claude Desktop's configuration file:

SystemFile
macOS~/Library/Application Support/Claude/claude_desktop_config.json
Windows%APPDATA%\Claude\claude_desktop_config.json
Linux$XDG_CONFIG_HOME/Claude/claude_desktop_config.json, default ~/.config/Claude/claude_desktop_config.json

Restart Claude Desktop after the change.

Codex

<project>/.codex/config.toml:

[mcp_servers.remember]
command = "/Users/john/.local/bin/remember"
args = ["mcp"]
 
[mcp_servers.remember.env]
REMEMBER_API_URL = "http://127.0.0.1:8000"

A URL entry is url = "<url>" in that table; with a key header it adds bearer_token_env_var = "REMEMBER_API_KEY".

Any earlier [mcp_servers.remember] and [mcp_servers.remember.*] tables are removed first; the rest of the file is kept. Codex loads a project's .codex/config.toml only when you trust the project in Codex.

Antigravity

Setup writes a stdio mcpServers.remember entry in <project>/.agents/mcp_config.json. If <project>/.agents/skills/remember/SKILL.md is missing, setup creates it with the starter guidance below. Setup preserves an existing skill, including one from the skill installer.

---
name: remember
description: Open bitemporal memory infrastructure for AI agents. Use when looking up past decisions, system architecture, factual evidence, or attested codebase knowledge.
---
 
# Remember Bitemporal Memory Skill
 
You have access to Remember, an open bitemporal memory infrastructure for AI agents.
Use the Remember MCP tools (`facts_context`, `combined_context`, `claims_and_sources_context`, `resolve_entity`, `query_sql`, `describe_query_space`)
to query past system decisions, architectural records, and entity-relationship knowledge graphs.
 
## Preferred Retrieval Flow
1. **Entity resolution first (`resolve_entity`)**: When an inquiry involves a named person, organization, module, file, or concept, resolve it first with `resolve_entity` to obtain the canonical `entity_id`.
2. **Fact layer first (`facts_context`)**: Query `facts_context` (anchored by `entity_ids` when available, or by semantic text query) as the primary authority for established facts, biography, attributes, relationships, and history.
   - Use `time.mode="history"` for biography, achievements, and "has ever" questions so historical and completed facts remain visible.
   - Use `time.mode="current"` or `"at"` for what holds at an instant, and `"overlap"` for a requested interval.
3. **Sources fallback (`claims_and_sources_context`)**: Only fall back to `claims_and_sources_context` if `facts_context` lacks the answer, or if the inquiry specifically demands verbatim quotes, speaker dialogue details, or raw source context.
4. **Combined context (`combined_context`)**: Use when both adjudicated facts and source claims are needed side by side.
 
## Dates and Temporal Semantics
Do not collapse distinct temporal dimensions into a single generic date:
 
- **Facts carry `validity` with `valid_from`, `valid_until`, and `valid_precision`:**
  - `valid_from` / `valid_until`: Real-world event or state validity ("When did this happen or hold true in the world?"). Answer event-time questions using these bounds.
  - `valid_precision`: The granularity of the validity window (`instant`, `day`, `month`, `quarter`, `year`, `open`, or `unknown`).
  - `open`: Represents an ongoing state with a known start date and no recorded end date (still true/current).
  - `unknown`: No usable real-world date was given in the source. Undated facts are clean prose without temporal bracket annotations.
- **Evidence rows (claims) carry `asserted_at`:**
  - `asserted_at`: Strictly **when the source made this statement** (when the message was sent, conversation occurred, or page was published).
  - Unresolved relative phrases: If claim text still contains a relative phrase (*"last week"*, *"yesterday"*, *"two months ago"*), evaluate it relative to that row's `asserted_at`.
  - **Never confuse speech time (`asserted_at`) with real-world event validity (`valid_from` / `valid_until`).**
- **System transaction timestamps (`ingested_at`, `invalidated_at`):**
  - Record when the database learned or superseded the record. Never present system ingestion time as an event or conversation date.

remember doctor checks the Cursor, Antigravity, Codex and Claude Desktop files; see CLI.