Docs
Build with Stale

MCP tools

Give any agent a memory that can say “I’m not sure that’s still true.” Thirteen tools, one endpoint, and no way for the agent to approve its own mistakes.

The endpoint

URLhttps://YOUR-HOST/api/mcp
TransportStreamable HTTP, stateless (a fresh server for every request, JSON responses)
MethodsPOST for calls. GET and DELETE are also routed to the same handler.
AuthAuthorization: Bearer sk_… (an API key)
Role neededmember or higher. The key decides which workspace the agent can see.
Server namestale-memory

Connect a client

  1. Make a keyIn the app, open Settings → API keys and create one. It is shown once; Stale only keeps a hash.
  2. Add the serverPick your client below.
  3. Ask something“What is stale in memory right now?” should call memory_overview.
Claude Code
claude mcp add --transport http stale https://YOUR-HOST/api/mcp \ --header "Authorization: Bearer sk_YOUR_KEY"
Any client that reads an mcpServers config
{ "mcpServers": { "stale": { "type": "http", "url": "https://YOUR-HOST/api/mcp", "headers": { "Authorization": "Bearer sk_YOUR_KEY" } } } }

The loop your agent should follow

The server ships these instructions to the agent automatically. In human words:

  1. Register sources, and mark untrusted ones honestly.
  2. Remember facts with a source, and derive beliefs and decisions from the nodes they rely on.
  3. Propose every action with propose_action before doing it.
  4. Check with check_action right before acting. Never act on a blocked action.
  5. Update with update_fact when the world changes, then repair with repair_plan and resolve, root-first.

Explore every tool

Pick a tool to see its arguments, when to call it, and a ready-to-send payload.

13 tools, grouped by the job they do.

Record

remember

Store a fact, or a belief or decision derived from existing nodes.

Use it when: Whenever the agent learns something. Facts need a source. Beliefs and decisions need the nodes they depend on.

Arguments

kind *fact | belief | decision · Actions use propose_action instead.
content *string · One clear statement.
source_idstring · Required for facts.
depends_onstring[] · Required for beliefs and decisions. Every dependency must be currently valid; you cannot build on stale knowledge.
confidencenumber 0–1 · How sure you are.
idstring · Optional fixed id. Up to 64 characters: letters, digits, _ . : -

Example call

{ "jsonrpc": "2.0", "id": 1, "method": "tools/call", "params": { "name": "remember", "arguments": { "kind": "fact", "content": "Renewal price is $9,000 per year", "source_id": "src_sales_call", "confidence": 0.9, "id": "fact_price" } } }

Returns

The stored node.

Not here on purpose: approve_action. Overriding the firewall is a human decision, available only through the REST API. An agent cannot approve its own blocked action.

When something goes wrong

Errors come back as an MCP tool result with isError: true and a JSON body the agent can read:

{ "error": "Cannot build on stale or superseded nodes", "details": { "blockers": [ ... ] } }

Typical causes: a dependency is stale or superseded (repair it first), a node id doesn’t exist, the id is already taken, or the action is blocked by the firewall (403).