The memory-mcp platform is currently in development. The Self-hosted Community Edition is available now!

store_memory

The foundation. Everything else in Memory MCP depends on what gets stored here. One required field — the rest is convention.

Parameters #

ParameterTypeRequiredDescription
contentstringYesThe memory content — free-form text, conversation pairs, notes, summaries
labelsstringNoComma-separated topic tags. Substring-matched on retrieval
sourcestringNoOrigin identifier — who or what stored this memory

What Happens on Store #

Beyond saving the content, Memory MCP automatically computes similarity against existing memories. Any memory scoring 70% or above is linked as a related memory — bidirectionally. The new memory gets references to its neighbours, and those neighbours get a reference back.

This happens silently at store time. The result is a self-building knowledge graph — no curation required. See get_memory to explore the graph.


labels and source must not contain commas or ! characters — these are reserved for filtering syntax in retrieve_memories. A fix is planned for a future release.


Examples #

# Minimal — content only
store_memory(content: "Decided to use pgvector over Qdrant for the embedding store")

# With labels
store_memory(
  content: "User prefers dark mode and keyboard shortcuts",
  labels: "preferences,ui"
)

# With source
store_memory(
  content: "The authentication flow uses OAuth2 with PKCE",
  labels: "architecture,auth",
  source: "agent:sonnet:main"
)

Power Combinations #

Model attribution via source — use the provider/model format to track which AI stored what. Works great with memory_stats to audit by model:

store_memory(
  content: "Summarised the Q3 roadmap discussion",
  source: "anthropic/claude-sonnet-4.6"
)

Other examples seen in the wild: openai/gpt-4o, moonshotai/kimi-k2.5, google/gemini-2.5-pro — any consistent convention works, as long as you use it everywhere.

Date labels for temporal search — dates stored as labels (2026-03-01) are searchable via retrieve_memories but intentionally excluded from trending_labels. So you can find memories from a specific date without polluting the trending signal:

store_memory(
  content: "Shipped v0.8.0 with full L1/L2/L3 wake-up cascade",
  labels: "milestone,2026-03-01"
)
# Later: retrieve_memories(labels: "2026-03-01") → everything from that date
# trending_labels → date never appears, only real topics

Provenance tracking — use structured source conventions consistently and memory_stats becomes a powerful audit tool:

# Store with structured source
store_memory(content: "...", source: "anthropic/claude-sonnet-4.6")
store_memory(content: "...", source: "openai/gpt-4o")

# Later — audit by provider using memory_stats(source: "/")
# Returns a breakdown of all sources containing "/"
?

AI Assistant

0/500