longterm-memory

v1.6.1
io.github.MarcelRoozekrans/longterm-memory Checked 8 hours ago Published 1 month ago

A fully local MCP server for long-term memory with semantic search

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

save_memory

Save information to long-term memory. The content will be embedded locally and indexed for semantic search. Use this to store facts, decisions, preferences, or any context worth remembering across sessions. Text inside <private>…</private> is removed before storing; content that looks like a secret (tokens, keys, passwords) is rejected.

ParameterTypeDescription
content *stringThe text content to store in memory
importancenumberImportance level 1-10 (default: 5). Higher = more resistant to decay
memory_typestringMemory category (default: general). Affects decay rate
metadataobjectOptional key-value metadata to attach to this memory (e.g. { "topic": "auth", "project": "api" })
tagsarrayOptional tags for categorization (e.g. ["personal", "preference"])

search_memory

Search long-term memory using semantic similarity. The query is embedded locally and compared against all stored memories using cosine similarity.

ParameterTypeDescription
query *stringNatural language search query describing what you're looking for
limitintegerMaximum number of results to return (default: 5)
thresholdnumberMinimum similarity score threshold, 0-1 (default: 0.3)

get_all_memories

Retrieve all stored memories, ordered by most recent first. Results are paginated.

ParameterTypeDescription
limitintegerMaximum number of memories to return (default: 50)
offsetintegerNumber of memories to skip for pagination (default: 0)

update_memory

Update an existing memory. Can modify content (triggers re-embedding), metadata, tags, importance, or memory type.

ParameterTypeDescription
id *stringThe UUID of the memory to update
contentstringNew text content (triggers re-embedding)
importancenumberNew importance level 1-10
memory_typestringNew memory category
metadataobjectNew metadata object
tagsarrayNew tags array

search_by_type

Search memories by category type (e.g. fact, preference, conversation). Returns memories ordered by importance.

ParameterTypeDescription
memory_type *stringThe memory type to filter by
limitintegerMaximum number of results (default: 20)

search_by_tags

Find memories that match any of the provided tags. Returns memories ordered by importance.

ParameterTypeDescription
tags *arrayTags to search for — matches memories containing ANY of these tags
limitintegerMaximum number of results (default: 20)

search_by_date_range

Find memories created within a specific date range. Use ISO date format.

ParameterTypeDescription
date_from *stringStart date in ISO format (e.g. "2026-01-01" or "2026-01-01T00:00:00Z")
date_tostringEnd date in ISO format (defaults to now)
limitintegerMaximum number of results (default: 50)

delete_memory

Delete a specific memory by its ID. Only delete when the user explicitly requests it or when a memory is confirmed outdated or incorrect.

ParameterTypeDescription
id *stringThe UUID of the memory to delete

delete_all_memories

Delete ALL stored memories. This action is irreversible. Only use when the user explicitly asks to clear all memories.

memory_stats

Get statistics about the memory store — total count and database location.

create_backup

Create a manual backup of the memory database and export all memories as JSON.