MCP tools

Weavekeep's MCP server offers your agent four tools: recall, remember, timeline and forget. Your agent calls them; the CLI has the same operations for you.

The server

Your agent starts the server with weavekeep serve. It talks over stdio and runs on your machine. weavekeep install registers it as weavekeep with each agent.

  • Default project. Tools that take project default to the folder the server was started in, or the --project given to serve. Paths are made absolute. A project the agent passes is read the way the default is: a subfolder of a repository, or a linked git worktree, means the repository, unless memory is already filed under exactly that path.
  • Memory files. When the server starts, it syncs that project's memory files. recall reads in your edits first; remember and forget rewrite the files afterwards.
  • Errors. A failed call comes back as a tool error with a short message. The server keeps running.
  • Instructions. When your agent connects, the server tells it in four short lines how to use the tools: when you state a lasting rule, preference or decision, also save it with remember, so your other agents learn it; recall at the start of a task and before proposing, re-deciding or asking something that may be settled; forget when you say a memory is wrong; never store secrets. Agents with Weavekeep's hooks get the same rules at session start, and each tool's own description says what to pass and what comes back.

Other MCP clients

Any MCP client that can start a stdio server can use the four tools. Add Weavekeep to the client's MCP servers, in the form that client uses. Other agents has the setup for Gemini CLI, OpenCode, Goose and other open-source CLI agents. Most clients take JSON like this:

{
  "mcpServers": {
    "weavekeep": {
      "command": "weavekeep",
      "args": ["serve"]
    }
  }
}
  • Project. The client starts the server in a folder of its choosing, and that folder becomes the default project. To pin it, add "--project", "/path/to/project" to args.
  • Command not found. A client started from a desktop app may not see your shell's PATH. Then use the form weavekeep install writes for Cursor: the full path to node as command, and the full path to Weavekeep's dist/cli/index.js followed by serve as args. See Cursor.
  • What it gets. The tools and the server's instructions. Sessions in that client are not recorded, and they do not start with memory: that needs the hooks weavekeep install adds for Claude Code, Codex and Cursor.

recall

Search memory with keywords. Read-only.

ParameterTypeRequiredWhat it does
querystringYesKeywords to search for. Short and concrete works best: file names, symbols, error text
projectstringNoAbsolute path of the project to search. Default: the server's project
scoperepo, dir or userNoOnly return facts with this scope
limitinteger, 1 to 50NoResults per page. Default: 10
cursorstringNoThe next_cursor value from an earlier call, to get the next page

Returns one line per result, best first. Facts and session events are ranked together:

- [fact 01a1600e-1053-70e4-8e88-452e43d63996] decision: Payments go through Stripe Checkout
- [assistant 01a1600e-3793-72ad-b60e-d439a4f7eebe 2026-10-21T20:01Z] Fixed the cart total rounding bug in src/cart/total.ts. Tests pass.
next_cursor: MTA=
  • Fact lines: [fact <id>] <subject> <predicate>: <value>, the value up to 300 characters. A decision of the searched project shows no subject or project; one of another project ends in (<scope> <project>), and one saved for every project in (applies everywhere).
  • Event lines: [<kind> [tool] <id> <time>] <text>, the time to the minute, where the text is about 160 characters of the item around the match, with … where it was cut. For more of an event, the agent calls timeline with its id as around. Kinds are user, assistant, tool_call, tool_result, note and compact_summary. The note remember stores next to a decision or fact is not listed again (the fact line is the answer; timeline shows it), and neither are Weavekeep's own tool calls and results or the agent harness's internal notices.
  • With nothing found: (no memory matched "<query>").

Limits. A page is at most about 4,000 characters (roughly 1,200 tokens); a page of 10 results is usually about 2,500. Each line is at most 360 characters. When more results exist, the last line is next_cursor: <value>; pass it back with the same query. The next page continues after the last result shown, wherever that result now ranks. This is best effort: results saved or forgotten between calls are handled, but a result whose rank changes between calls (semantic search can move one) may repeat or be skipped. A larger limit adds pages, not a longer page. Paging stops after 200 results in total. Past the last page: (no more results).

The search itself works as described in Search your memory. Memory saved for every project is included in any project's search. With semantic search on, results found by meaning are merged in; if the model does not answer within 2 seconds, the result is keyword-only.

remember

Save a lasting rule, preference or decision, so your agents see it at the start of every later session in the project. Only text is needed: a call with just text saves a decision.

ParameterTypeRequiredWhat it does
textstringYesThe rule, preference, decision or fact, in one or two sentences. At most 4,000 characters; empty text is refused
kinddecision, fact or noteNoDefault: decision
scoperepo, dir or userNoDefault: repo. user applies it to every project
projectstringNoAbsolute project path. Default: the server's project
subjectstringFor factWhat the fact is about, up to 200 characters. For decision it defaults to the project path, or user with scope: "user"
predicatestringFor factThe relation, for example uses, owner, deploy_via, up to 200 characters
questionsstring or list of stringsNo2 to 4 short questions the memory answers, in your words (a string is one question per line). recall and the memory added to your prompts find the memory by them; they are never shown. Up to 1,024 characters in all

What each kind does:

KindStored asReplaces
decision (default)A decision, in decisions.md, added to the context at session start. With a predicate, it is stored under that predicate and shows in facts.mdNothing without predicate. With predicate, the current decision on that topic
factA fact, in facts.mdThe current fact with the same subject, predicate and project
noteFree text only. recall finds it, but it is not in the memory files or shown at session startNothing

A replaced fact is marked as expired, not deleted.

Returns the new ids, and for a decision up to three similar saved decisions of the same project (or, for scope: "user", of every project), with their ids:

remembered decision as event 01a1600e-1051-77d1-9d12-d7c2ece8e5ba in session manual:/home/you/projects/shop
fact 01a1600e-1053-70e4-8e88-452e43d63996: /home/you/projects/shop decision = Payments go through Stripe Checkout
(added alongside earlier decisions; nothing was superseded)
Similar saved decisions:
- [fact 01a15f2c-88a0-7b31-9e0e-3c1f7a2b9d10] decision: Payments go through PayPal for now
If one of these is now outdated or replaced by what you just saved, call `forget` with its id.

The agent decides; Weavekeep never retires a decision on its own. With nothing similar saved, the last three lines are left out.

The result shows the saved text on one line, cut at 300 characters. A fact without both subject and predicate is refused with an error, and nothing is stored. Saving the same decision or fact again (same text up to case, spacing and a final period, same scope and project) stores nothing and replies already saved: fact <id>: …, unless it brings other questions: then the saved one is replaced by one with the new questions (the old one is marked as expired, not deleted). Everything passes through the secret filter before it is saved.

Why questions. recall is keyword search: a rule such as "Use pnpm, never npm" is not found by "how do I install dependencies?", because the two share no word. The agent that saves it knows how you would ask, so it adds a few questions, and they are searched with the rule as if they were part of its text. With questions, the result has one more line: index questions: 2 saved (searched by recall, never shown).

timeline

List what happened, in time order. Read-only.

ParameterTypeRequiredWhat it does
aroundstringNoAn ISO 8601 timestamp or an event id to center the list on. Default: the most recent events
projectstringNoAbsolute project path. Default: the server's project, or the event's own project when around is an event id
limitinteger, 1 to 200NoLines to return. Default: 50

Returns one line per event:

2026-10-21T20:01:46.689Z s1 01a1600e-36c3-71fc-b0f7-cbd9d5a41042 user fix the cart total rounding bug in src/cart/total.ts
2026-10-21T20:01:46.798Z s1 01a1600e-3730-727f-a18b-66696c006a36 tool_call Edit {"file_path":"/home/you/projects/shop/src/cart/total.ts"}

The format is <timestamp> <session id> <event id> <kind> [tool] <text>, with the text cut to 80 characters. When around is an event id, that event's line shows up to 1,200 characters, so the agent can read more of a recall result. An around that is neither a known event id nor a timestamp (a fact id, a forgotten event) returns an error. With nothing found: (no events).

Limits. Output is at most about 12,000 characters. If lines were cut, the last line says how many and suggests narrowing with around or limit.

forget

Hide one item from future recall. The agent calls it when you say a memory is wrong, and when a decision it just saved replaces one that remember listed as similar.

ParameterTypeRequiredWhat it does
idstringYesA full fact id or event id, as shown by recall or timeline
reasonstringNoWhy it is being forgotten. Stored with the item

The tool works out whether the id is a fact or an event:

  • Forgetting a fact also hides the note remember stored with it.
  • Forgetting an event also expires every fact taken from it.

Nothing is deleted: the item is marked with the time it was forgotten, as the output below shows. See Forget and export.

Returns one line per item hidden:

fact 01a1600e-1053-70e4-8e88-452e43d63996: expired_at set
event 01a1600e-1051-77d1-9d12-d7c2ece8e5ba: deleted_at set (source of fact 01a1600e-1053-70e4-8e88-452e43d63996)

Forgetting an item that is already hidden changes nothing and replies <fact|event> <id>: already hidden; nothing changed. An unknown id returns an error: no fact or event with id <id>; copy the id from a recall or timeline line. Unlike weavekeep forget in the terminal, this tool needs the full id.

On this page