store_memory
The foundation. Everything else in Memory MCP depends on what gets stored here. One required field — the rest is convention.
Parameters #
| Parameter | Type | Required | Description |
|---|---|---|---|
content | string | Yes | The memory content — free-form text, conversation pairs, notes, summaries |
labels | string | No | Comma-separated topic tags. Substring-matched on retrieval |
source | string | No | Origin 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 "/"