MCP
utility

Memory

A simple persistent knowledge graph — store entities, relations, and observations across runs.

Requires Growth plan or above.

Enable Memory

Stateless — no credentials required. Toggle Memory on at /dashboard/connections. The graph is scoped per-app and persists across requests.

Example

Record an entity with observations from a chat turn so future turns can recall it.

app/api/remember/route.ts
export async function POST() {
const res = await fetch('https://leash.build/api/integrations/memory/create_entities', {
method: 'POST',
headers: {
'x-api-key': process.env.LEASH_API_KEY!,
'content-type': 'application/json',
},
body: JSON.stringify({
entities: [
{
name: 'Acme Corp',
entityType: 'Company',
observations: [
'Evaluating Leash for Q3 rollout',
'Decision maker: VP Eng',
],
},
],
}),
})
const { data } = await res.json()
// data =>
// {
// created: [
// {
// name: 'Acme Corp',
// entityType: 'Company',
// observations: [
// 'Evaluating Leash for Q3 rollout',
// 'Decision maker: VP Eng'
// ]
// }
// ]
// }
return Response.json(data)
}

Available tools

  • create_entities — register new entities with observations.
  • add_observations — append observations to an existing entity.
  • create_relations — link entities (e.g. Alice -- works_at --> Acme).
  • read_graph — dump the full graph.
  • search_nodes — find nodes whose name/observations match a query.
  • open_nodes — fetch specific nodes by name.
  • delete_entities / delete_observations / delete_relations — cleanup.

Common gotchas

  • Entity names are the primary key. create_entities with an existing name silently no-ops; use add_observations for updates.
  • search_nodes is substring-based, not semantic. Spelling variants miss. For fuzzy recall, store synonyms as observations.
  • The graph is per-app. Two apps cannot share memory; spin up a shared knowledge store if you need cross-app context.

See the Memory MCP server source for the underlying provider docs.

Other languages: see SDK overview.