memory-mcp-server

v1.4.1
@nhatnguyen9317/memory-mcp-server Checked 1 day ago Published 16 days ago

MCP server for persisting agent long-term memory and step-by-step reasoning traces in SQLite

These tools were reported by the server itself during our smoke test (tools/list), not copied from the README.

memory_get Get Memory

Retrieve a single memory by its id.

ParameterTypeDescription
id *stringThe memory id, e.g. 'mem_...'.

memory_update Update Memory

Correct a recalled memory that turned out wrong or outdated. Only the fields you pass change. `tags`/`metadata` replace the whole value; `tags_append`/`tags_remove`/`metadata_patch` change it incrementally. Pass at least one field.

ParameterTypeDescription
id *stringThe memory id.
contentstringNew content.
importanceintegerNew importance.
metadataobjectReplaces the whole metadata object.
metadata_patchobjectKeys to merge into metadata (shallow).
tagsarrayReplaces all tags.
tags_appendarrayTags to add.
tags_removearrayTags to remove.
typestringNew type.

memory_record_usage_feedback Record Memory Usage Feedback

Record how a recalled memory turned out — usefulness is one of: used, ignored, irrelevant, stale, unsafe_to_use. For the common 'used' case, prefer used_memory_ids on reasoning_complete_session; call this tool directly for tasks without a session, or the moment a recalled memory turns out stale or wrong. Feedback is a first-party learning signal for recall quality and is always persisted locally, regardless of the MEMORY_TELEMETRY setting.

ParameterTypeDescription
memory_id *string
usefulness *string
agent_idstring
event_idstring
reasonstring

reasoning_start_session Start Reasoning Session

Start a new reasoning session to record a multi-step chain of thought for a task or question. Call this once at the start of a non-trivial task, then log each step with reasoning_add_step, and finish with reasoning_complete_session. Args: - title (string, required): Short description of the task/question, e.g. "Diagnose flaky checkout test". - agent_id (string, optional): Identifier for the agent/persona running this session. - workspace (string, optional): Absolute path of the project directory you are working in. Pass it: the server's own working directory is often "/" or your home di…

ParameterTypeDescription
title *stringShort description of the task/question this reasoning session is about, e.g. 'Diagnose flaky checkout test'.
agent_idstringOptional identifier for the agent/persona running this session.
workspacestringAbsolute path of the project directory you are working in. Pass it so recall prefers this project's memories and your conclusion is saved under it. If omitted the server uses its own working directory…

reasoning_add_step Add Reasoning Step

Append one step (thought / action / observation) — or a batch of steps — to an existing reasoning session. Steps are numbered automatically in the order added. Args: - session_id (string, required): Id from reasoning_start_session. - thought (string, optional): The reasoning/thinking at this step. - action (string, optional): The action taken, if any. - observation (string, optional): The result observed, if any. - steps (array, optional): Batch mode — log up to 20 steps in one call, each {thought?, action?, observation?} with at least one field. Use INSTEAD of the top-level f…

ParameterTypeDescription
session_id *stringThe session id returned by reasoning_start_session.
actionstringThe action taken at this step, if any (e.g. a tool call description).
observationstringThe result/observation from the action, if any.
stepsarrayBatch mode: log several steps in one call (each entry needs at least one of thought/action/observation). Use INSTEAD of the top-level thought/action/observation fields, e.g. to record the trace of wor…
thoughtstringThe agent's reasoning/thinking at this step.

reasoning_find Find Past Reasoning

Find past work that your current context does not contain, then read it. Call it when the user refers to earlier work, a past decision or a previous conversation you don't have ("last time…", "continue the unfinished…", "I already discussed…"), or when a recalled memory's source is not enough to know why that conclusion was reached. Pass exactly one of: - query: searches past sessions' titles, conclusions and step text. Returns up to limit sessions (default 5), best match first, each with its conclusion and up to 2 matching step excerpts. - session_id: returns that session's full o…

ParameterTypeDescription
limitintegerFind mode: max sessions returned.
querystringFind mode: words to look for in past sessions' titles, conclusions and steps.
session_idstringRead mode: a session id (from a find result or a memory's source.session_id).

reasoning_complete_session Complete Reasoning Session

Mark a reasoning session as finished, recording its final conclusion. Optionally also persist the conclusion as a long-term memory so it can be recalled later without replaying the full trace. Args: - session_id (string, required): The session id. - conclusion (string, required): The final answer/decision reached. - status ('completed'|'abandoned', default 'completed'): Use 'abandoned' if the task was dropped without a real conclusion. - save_as_memory (boolean, default false): If true, also create a memory with this conclusion. - memory_mode ('auto'|'always'|'never', optional): 'au…

ParameterTypeDescription
conclusion *stringThe final conclusion/decision reached by this reasoning session.
session_id *stringThe session id to complete.
memory_importanceintegerImportance to use when a completion is persisted as memory.
memory_modestringPreferred memory persistence mode. 'auto' (default) does not save on its own — a memory is only created when save_as_memory=true or memory_mode='always'; 'never' skips saving and requires not_saved_…
memory_tagsarrayTags to attach to the created memory, only used when save_as_memory is true.
memory_typestringMemory type to use when a completion is persisted.
not_saved_reasonstringRequired when memory_mode='never' to explain why the conclusion should not be kept as durable memory.
save_as_memorybooleanIf true, also create a long-term memory (type='reasoning_summary') containing the conclusion, so it can be recalled later via memory_search.
statusstringFinal status: 'completed' if a conclusion was reached, 'abandoned' if the task was dropped.
used_memory_idsarrayIds of memories that were actually used/helpful during this session (e.g. ones returned in related_memories by reasoning_start_session). The server records a 'used' usage-feedback event for each, so r…

get_usage_guide Get Usage Guide

Return the versioned GUIDELINES.md file that defines how an agent should use this MCP.

ParameterTypeDescription
agent_idstring
client_namestring
client_versionstring