memora
Memora is an MCP memory layer that gives AI agents persistent, searchable long-term memory backed by SQLite, S3/R2, or Cloudflare D1.
Create and manage memories —
memory_create,memory_update,memory_delete, batch/bulk operations, and metadata merging with per-memory tags.Structured types — dedicated tools for TODOs, issues, sections, and hierarchical organization.
Absorb & consolidate —
memory_absorbclassifies incoming facts (duplicate/update/contradiction/related/new), dedups, links, and synthesizes related facts, with supersession lineage.Search — semantic (vector embeddings), full-text keyword, hybrid RRF search, and date/tag/metadata filters with lineage-aware following.
Topic digest —
memory_digest(topic)bundles relevant memories, open TODOs/issues, related edges, and source IDs.Knowledge graph — cross-references, typed links (
references,implements,supersedes, etc.), cluster detection, and importance boosting.Documents — store markdown as searchable fragment trees (claims, plan items, references, risks) with integrity guards.
Deduplication & merging — LLM-powered duplicate finding, merge strategies, and supersession detection.
Insights & analytics — stats, activity summaries, stale detection, consolidation suggestions, LLM pattern analysis, and a per-session bound-database report.
Visualization & export — live graph server, HTML graph export, JSON export/import, and image upload to R2.
Events & chat — poll/clear inter-agent event notifications and RAG-powered chat with tool calling.
Supports cloud storage sync via Cloudflare R2 for storing and syncing the SQLite database, with support for encryption and compression.
Renders Mermaid diagrams within the interactive knowledge graph visualization when viewing memory content.
Supports S3-compatible storage sync via MinIO for storing and syncing the SQLite database.
Provides a Telescope plugin for browsing and searching memories directly in Neovim with fuzzy search and preview capabilities.
Supports OpenAI embeddings for high-quality semantic search and cross-referencing of memories using text-embedding models.
Uses SQLite as the persistent storage backend for memories, with support for local storage and cloud sync.
Click on "Deploy Server".
Wait a few minutes for the server to deploy. Once ready, it will show a "Started" state.
In the chat, type
@followed by the MCP server name and your instructions, e.g., "@memora search for meeting notes about the Q3 project using semantic search"
That's it! The server will respond to your query, and you can continue using it as needed.
Here is a step-by-step guide with screenshots.
Features
Core Storage
💾 Persistent Storage - SQLite with optional cloud sync (S3, R2, D1)
🗄️ Multi-database routing - One process serves many stores; a workspace reaches its own at
/mcp/<name>(see Multi-database routing)📂 Hierarchical Organization - Section/subsection structure with auto-hierarchy assignment
📦 Export/Import - Backup and restore with merge strategies
Absorb & Lineage
🧬 Absorb - Feed facts in; an LLM classifies each against the store (duplicate / update / contradiction / related / new), skips duplicates, links relations, and consolidates related facts — with
dry_runpreview🌱 Supersession Lineage - Updates supersede old knowledge instead of deleting it; retrieval follows the chain to the current version by default (
followmodes:active,latest,full_history)Deleting any version retires the whole lineage (a deleted fact cannot reappear as an older version):
follow=latest/activehide every version,memory_geton one answersnot_foundwithretired: truenaming the delete ("retired by deleting #N"),follow=allstill reads it, and adding asupersedesedge to a retired id does not restore it.memory_absorbnever supersedes an item record (metadata.kind = "item-record"or tagitem-record): the fact is written and linkedrelated_toinstead. Todos and issues are protected by the type boundary (a plain fact never supersedes a typed one).
🗞️ Topic Digest -
memory_digest(topic)bundles relevant memories, open TODOs/issues, related edges, and source IDs into one retrieval
Search & Intelligence
🔍 Semantic Search - Vector embeddings (TF-IDF, sentence-transformers, OpenAI)
🎯 Advanced Queries - Full-text, date ranges, tag filters (AND/OR/NOT), hybrid search
🔀 Cross-references - Auto-linked related memories based on similarity
🤖 LLM Deduplication - Find and merge duplicates with AI-powered comparison
🔗 Memory Linking - Typed edges, importance boosting, and cluster detection
Document Storage
📄 Structured Documents - Store markdown documents as searchable fragment trees (claims, plan items, references, risks)
🔒 Fragment Integrity - Guards against accidental delete/merge/absorb of document fragments
🔍 Granular Search - Individual claims and findings are semantically searchable while the full document remains retrievable as a unit
Tools & Visualization
⚡ Memory Automation - Structured tools for TODOs, issues, and sections
🕸️ Knowledge Graph - Interactive visualization with Mermaid rendering and cluster overlays
🌐 Live Graph Server - Built-in HTTP server with cloud-hosted option (D1/Pages)
💬 Chat with Memories - RAG-powered chat panel with LLM tool calling to search, create, update, and delete memories via streaming chat
📡 Event Notifications - Poll-based system for inter-agent communication
📊 Statistics & Analytics - Tag usage, trends, and connection insights
🧠 Memory Insights - Activity summary, stale detection, consolidation suggestions, and LLM-powered pattern analysis
📜 Action History - Track all memory operations (create, update, delete, merge, boost, link) with grouped timeline view
Related MCP server: ClawMem MCP Server
JSON API (/api/v1)
The server can expose a plain JSON API at /api/v1/<store>/{health,search,absorb}
(the wire contract is contracts/memora-api/v1/). It is off unless
MEMORA_API_TOKENS_FILE is set to an absolute path; an unset variable is an
intentional state and is logged at INFO, not ERROR (issue 1131).
The file holds sha256 digests, never tokens. The server opens it
O_RDONLY | O_NOFOLLOW | O_CLOEXEC and requires a regular file, no group/other
permission bits and at most 4 KiB, owned by the server's user, under parents
that are not symlinks and not group/world-writable. On a read-only mount
(for example the deploy's read-only secrets mount, where rootful docker reads
the operator's file as root and statvfs reports ST_RDONLY), the owner match
for the file and for its read-only parents is not required; every other check
still applies. A failed reload keeps the last good token set.
scripts/mint_api_token.sh mints a token into a new 0600 file and adds its
digest to api-tokens.json; scripts/deploy-memora-all.sh sets
MEMORA_API_TOKENS_FILE when that file is in its secrets directory. Request
semantics (401/403/404) and rotation are in the contract.
Preview
Install
Two paths. pip is a local stdio child the client spawns. A container is a detached HTTP service you start with up; with MEMORA_DATABASES it serves multiple stores from one process. The LaunchAgent supervises the proxy, not the container — after a host restart the listener can come back while its upstream is still stopped. If you are running memora as a service, the container path is the install.
pip (local / stdio)
pip install memora-mcpThe PyPI package is memora-mcp (bare memora on PyPI is an unrelated project). Includes cloud storage (S3/R2) and OpenAI embeddings out of the box.
# Optional: local embeddings (offline, ~2GB for PyTorch)
pip install "memora-mcp[local]"
# Latest development version straight from git
pip install "git+https://github.com/agentic-box/memora.git"Then spawn it from .mcp.json with "command": "memora-server" (see Configuration).
Container (HTTP service)
Default runtime is Apple's container CLI. Every container operation scripts/memora-instance.sh performs (build, up, status, logs, down) uses $MEMORA_CONTAINER_BIN (default container). The generated proxy process does not; it hardcodes container list.
Before the first build:
Install Apple's
containerCLI (signed pkg from its GitHub releases). It needs a Mac with Apple silicon running macOS 26 — Apple does not support older macOS versions forcontainer.Start the runtime — Apple's documented first command, which also installs a kernel if none is configured:
container system startClone this repo and
cdinto it:git clone https://github.com/agentic-box/memora.git cd memoraCopy the instance template. It ships with
INSTANCE=myinstanceso the laterbuild/up/proxylines match without renaming. EditPORTand a backend (STORAGE_URI,VOLUME, orMEMORA_DATABASES):cp instances/example.env instances/myinstance.envCreate the credential file and install the proxy the LaunchAgent will run.
cred_args()requires a.mcp.jsonwhosemcpServers.memora.envholdsCLOUDFLARE_API_TOKEN(D1 access) and the embedding/LLM keys —updies if that file is missing. The script looks for~/.config/memora/credentials.mcp.jsonunless the instance file setsCRED_SOURCEto another path; there is no other fallback. Separately,proxyrenders a plist whose executable is$MEMORA_PROXY_BIN(default~/.local/libexec/memora/memora_proxy.py) and whose logs live in$MEMORA_LOG_DIR(default~/.local/var/log) — nothing creates either on a fresh clone.mkdir -p ~/.config/memora ~/.local/libexec/memora ~/.local/var/log cp scripts/memora_proxy.py ~/.local/libexec/memora/ # real values; any key is fine, an absent file is not # the default umask is permissive -- chmod 600 keeps other local accounts out cat > ~/.config/memora/credentials.mcp.json <<'JSON' {"mcpServers":{"memora":{"env":{"CLOUDFLARE_API_TOKEN":"REPLACE","OPENAI_API_KEY":"REPLACE"}}}} JSON chmod 600 ~/.config/memora/credentials.mcp.jsonThat JSON is the minimal correct config: both the LLM and embeddings use the default OpenAI host with a real OpenAI key. Do not add
OPENAI_BASE_URLpointing at OpenRouter without the embedding pair from Embeddings — OpenRouter has no embeddings endpoint, every embed call 404s, and memora silently falls back to TF-IDF keyword bags while looking healthy.
Then:
./scripts/memora-instance.sh build myinstance # tags IMAGE from myinstance.env (memora-pilot if IMAGE is unset)
./scripts/memora-instance.sh up myinstance # runs that same IMAGE
./scripts/memora-instance.sh proxy myinstance # render the LaunchAgent; run the printed launchctlup does not publish a host port. The listener the workspace connects to is the proxy. proxy only renders a macOS LaunchAgent and prints the launchctl commands — it does not load the service. Run those printed commands.
The printed workspace URL is always http://127.0.0.1:<PORT>/mcp (the registry default). For a non-default store, append /<name> yourself — a bare /mcp on a registry silently binds MEMORA_DEFAULT_DB:
{"mcpServers": {"memora": {"type": "http", "url": "http://127.0.0.1:<PORT>/mcp/<store>"}}}Proxy rationale, credentials, instance files, and MEMORA_CONTAINER_BIN: Container Deployment.
The server runs automatically when configured in Claude Code. Manual invocation:
# Default (stdio mode for MCP)
memora-server
# With graph visualization server
memora-server --graph-port 8765
# HTTP transport (alternative to stdio)
memora-server --transport streamable-http --host 127.0.0.1 --port 8080Claude Code
Add to .mcp.json in your project root:
Local DB:
{
"mcpServers": {
"memora": {
"command": "memora-server",
"args": [],
"env": {
"MEMORA_DB_PATH": "~/.local/share/memora/memories.db",
"MEMORA_ALLOW_ANY_TAG": "1",
"MEMORA_GRAPH_PORT": "8765"
}
}
}
}Cloud DB (Cloudflare D1) - Recommended:
{
"mcpServers": {
"memora": {
"command": "memora-server",
"args": ["--no-graph"],
"env": {
"MEMORA_STORAGE_URI": "d1://<account-id>/<database-id>",
"CLOUDFLARE_API_TOKEN": "<your-api-token>",
"MEMORA_ALLOW_ANY_TAG": "1"
}
}
}
}With D1, use --no-graph to disable the local visualization server. Instead, use the hosted graph at your Cloudflare Pages URL (see Cloud Graph).
A d1:// primary refuses to start unless that database's read replication is disabled (session bookmarks are not REST read-your-writes while it is on). MEMORA_D1_ALLOW_READ_REPLICATION=1 starts anyway and logs a warning.
Cloud DB (S3/R2) - Sync mode:
{
"mcpServers": {
"memora": {
"command": "memora-server",
"args": [],
"env": {
"AWS_PROFILE": "memora",
"AWS_ENDPOINT_URL": "https://<account-id>.r2.cloudflarestorage.com",
"MEMORA_STORAGE_URI": "s3://memories/memories.db",
"MEMORA_CLOUD_ENCRYPT": "true",
"MEMORA_ALLOW_ANY_TAG": "1",
"MEMORA_GRAPH_PORT": "8765"
}
}
}
}Codex CLI
Add to ~/.codex/config.toml:
[mcp_servers.memora]
command = "memora-server" # or full path: /path/to/bin/memora-server
args = ["--no-graph"]
env = {
AWS_PROFILE = "memora",
AWS_ENDPOINT_URL = "https://<account-id>.r2.cloudflarestorage.com",
MEMORA_STORAGE_URI = "s3://memories/memories.db",
MEMORA_CLOUD_ENCRYPT = "true",
MEMORA_ALLOW_ANY_TAG = "1",
}Variable | Description |
| Local SQLite database path (default: |
| Storage URI: |
| JSON object |
| Registry name a bare |
| API token for D1 ( |
| Set to |
| Encrypt the local file before uploading to S3/R2. Unset/ |
| Compress the local file before uploading to S3/R2. Unset/ |
| Local cache directory for an S3/R2-synced database. Unset: the backend picks a cache path. |
| Allow any tag without validation against allowlist ( |
| Path to a JSON file containing an array of allowed tags, e.g. |
| Comma-separated list of allowed tags |
| Bind address for HTTP transports (default |
| Bind port for HTTP transports (default |
| Port for the knowledge graph visualization server (default: |
|
|
| Tool subset exposed to clients: |
| Hard ceiling on concurrent MCP sessions (default |
| New sessions admitted per minute (default |
| Maximum initialize request body accepted/buffered (default |
| Seconds before an abandoned valid session is reaped (default |
| Bearer token for detailed |
| Bearer token for the |
| Name of the volume mounted at |
| Seconds a readiness snapshot may be served before a refresh is due (default |
| Bound on one refresh pass and on each store probe (default |
| How often the server refreshes readiness on its own (default |
| Age after which a cached per-database result may no longer be reported ready (default |
| Two consumers, two defaults, same name: |
| Embedding backend: |
| Model for sentence-transformers (default: |
| Embedding provider API key (atomic with base URL — see below) |
| Embedding provider base URL (atomic with API key — see below) |
| Recommend |
| LLM only (dedup/chat) when |
| LLM base URL (OpenRouter, Azure, etc.). Same atomic fallback rule as the key — not an embeddings URL when you use a split config |
| Model id for the openai embedding backend. Must exist on the embedding host (default |
| Enable LLM-powered deduplication comparison ( |
| Model for deduplication comparison and, if unset, for query rewrite and local chat (default: |
| Worker count for |
| Seconds the OpenAI client waits (default |
| Model for RAG query rewriting in the graph chat panel. Unset/empty uses |
| Rows per page when loading embeddings from D1 (default |
| Rows per batch in |
| Model for the local graph chat panel. Unset/empty falls back to |
|
|
| Worker base URL for those broadcasts ( |
| Seconds to batch rapid writes before broadcasting (default |
| Path captured at startup (default: |
| AWS credentials profile from |
| S3-compatible endpoint for R2/MinIO |
| Public domain for R2 image URLs |
All 44 MCP tools register unconditionally, so every agent session is injected with the full ~12,700-token tool schema even when most tools are never called. MEMORA_TOOL_PROFILE exposes a subset per deployment so a gated tool is genuinely absent — missing from tools/list AND undispatchable (call_tool returns unknown-tool, not a hidden execution). The profile is applied and attested at startup; the active profile and exposed tool count are logged to stderr.
Value | Tools | Use |
| all 44 | Direct stdio use; every existing deployment is byte-for-byte unchanged |
| 19 | The agent set plus |
| 12 | The read/create surface a worker agent needs: |
Unset / empty =
full. No existing deployment changes behaviour.An unknown value aborts startup with a message naming the valid values. It never silently falls back to
full— a typo must not re-expose destructive maintenance tools (memory_rebuild_embeddings,memory_delete_batch) to every worker. Fail closed.memory_listis inleaderbut notagent. It was excluded from both while it cost 163-174s on a D1 store againstmemory_list_compact's 0.22s; #973 fixed that (now ~1.1s). It stays out ofagentbecause a worker's read surface is deliberately narrow, not for speed.The leader/agent boundary is data in
memora/tool_profile.py(two frozensets). Editing it is one line, not a sweep of 44 decorators.The prune deletes from FastMCP's private
_tool_manager._toolsdict, somemorapinsmcp>=1.27,<1.28(the audited minor) and runs a startup attestation through the low-level registered MCP request handlers (_mcp_server.request_handlers[ListToolsRequest]/[CallToolRequest]— the actual dispatch callable real client requests use, not theFastMCP.list_tools/call_toolPython helpers) that refuses to start if the installed SDK routes listing/dispatch elsewhere (private-implementation drift). The pin is the static guard; the attestation is the runtime backstop. Bumping the upper bound requires re-runningtests/test_tool_profile.py.Under container deployment the profile is per container while roles are per agent. One container serving a workspace's leader and its workers needs the leader superset;
agentwould stripcreate_section/store_document/delete/digest/tagsfrom the leader.memora-server(i.e.memora.server.main()) is the sole supported profiled serving path. A direct embedder that importsmemora.server.mcpand callsmcp.run()themselves bypasses profiling entirely (the globalmcpstill holds all 44 tools); embedders who want profiling must callapply_tool_profilethemselves or usemain().
# Leader deployment — exposes 19 tools
MEMORA_TOOL_PROFILE=leader memora-server
# Agent worker — exposes 12 tools
MEMORA_TOOL_PROFILE=agent memora-server
# Full (default) — all 44 tools, existing behaviour
memora-server
# Typo refuses to start:
# MEMORA_TOOL_PROFILE=agnt memora-server
# Error: unknown MEMORA_TOOL_PROFILE='agnt'; valid values: full, leader, agentOne memora process can serve every workspace. MEMORA_DATABASES is a JSON
registry of {name: storage URI}; a client reaches its store at /mcp/<name>.
The selector is the URL already in .mcp.json, not a tool argument — an optional
db on every tool is 44 chances to forget one, and every miss would write into
someone else's store.
Unset MEMORA_DATABASES is the old shape: one backend from MEMORA_STORAGE_URI
/ MEMORA_DB_PATH, one /mcp. Existing stdio deployments do not change.
Routing (streamable-http only):
URL | Resolves to |
| That registry entry. Unknown names return |
|
|
The binding is sticky per MCP session, not per request. A session opened on
/mcp/alpha and reused against /mcp/beta still resolves to alpha. A client
cannot half-switch databases mid-conversation.
Malformed configuration refuses to start (it does not fall through to the
legacy database): bad JSON, a non-object, duplicate keys, an empty URI, a name
that is not one URL path segment, or MEMORA_DEFAULT_DB missing/unknown when
more than one database is listed.
Worked pair — run this, connect to this. A streamable-HTTP listener, not
an MCP command entry (that would spawn a stdio child that never speaks MCP
on stdio). Credentials live on the server process.
MEMORA_DATABASES='{"memora":"d1://<account-id>/<memora-db-id>","alpha":"d1://<account-id>/<alpha-db-id>"}' \
MEMORA_DEFAULT_DB=memora \
CLOUDFLARE_API_TOKEN='<token>' \
MEMORA_VECTOR_SCAN_PAGE_SIZE=100 \
memora-server --transport streamable-http --host 127.0.0.1 --port 8000 --no-graph{
"mcpServers": {
"memora": {
"type": "http",
"url": "http://127.0.0.1:8000/mcp/alpha"
}
}
}Container / proxy variant (this host's usual launcher, not the command
above): scripts/memora-instance.sh up myinstance starts the same HTTP server
inside a container and puts scripts/memora_proxy.py on 127.0.0.1:<PORT>
(8910 for the memora instance). The workspace URL is then
http://127.0.0.1:8910/mcp/alpha. See Container Deployment.
A registry may mix d1://, s3://, and local paths; parse_backend_uri
dispatches on the scheme.
memory_stats reports the bound database. It returns database (the name
this session actually resolved) and database_source (path,
registry_default, or unconfigured). A valid-but-wrong name in .mcp.json
is otherwise undetectable: every tool works, reads succeed, and writes land
silently in another project's store. Call memory_stats and check database
against the workspace you meant.
Health of a multi-database process: GET /health is liveness (no database I/O
— the only signal a supervisor may restart on). GET /health/db is an alert
surface (always HTTP 200; status is ok, degraded, unknown — no
snapshot yet, a refresh timed out, or evidence older than max staleness — or
error if the registry itself is unusable). GET /health/db/{name} is the
workspace-specific probe (200 or 503). Withdrawing the whole process because
one store is degraded takes the healthy ones down with it.
With MEMORA_DATABASES unset, a process still binds one database for its
lifetime (MEMORA_STORAGE_URI / MEMORA_DB_PATH). That is the original
one-store-one-container-one-port shape.
With MEMORA_DATABASES set, one container serves every workspace and
clients select a store by URL path (/mcp/<name>). See
Multi-database routing. scripts/memora-instance.sh
wants one of STORAGE_URI, VOLUME, or MEMORA_DATABASES per instance file
(load() requires at least one). If more than one is set, cmd_up uses
MEMORA_DATABASES, then STORAGE_URI, then VOLUME.
Dockerfile builds a credential-free image; scripts/memora-instance.sh deploys one
instance from instances/myinstance.env (or another named file). The script's runtime CLI is
$MEMORA_CONTAINER_BIN (default container — Apple's CLI). Every container
operation the script performs honours that override (build, up, status,
logs, down). The generated memora_proxy.py process hardcodes
container list, which is also why the proxy exists: that runtime reassigns
the container's IP on every start.
./scripts/memora-instance.sh build myinstance # build the image
./scripts/memora-instance.sh up myinstance # run the container
./scripts/memora-instance.sh proxy myinstance # render a LaunchAgent + print install commands
./scripts/memora-instance.sh status # every instance at a glanceThen point the workspace at it — the whole client config, with no secrets in it.
A registry instance needs the store in the path (/mcp/<name>); bare /mcp is
the registry default:
{"mcpServers": {"memora": {"type": "http", "url": "http://127.0.0.1:8910/mcp/alpha"}}}Credentials never enter the image, the instance file, or the workspace's HTTP
config. They are read at run time from a separate credential config
($CRED_SOURCE — itself a .mcp.json holding only the mcpServers.memora.env
block) and injected with -e. If the instance file does not set
CRED_SOURCE, the script uses ~/.config/memora/credentials.mcp.json (and up
refuses when it is missing; there is no other fallback). Pass through every
variable that file defines, not a hand-picked few: a container started with only
the embedding keys silently loses memory_absorb's LLM consolidation instead of
failing loudly.
Why the proxy exists — read this before deciding you do not need it. The
default runtime (Apple's container) reassigns a container's IP on every start, not just on recreate.
An MCP client reads its config once at startup, so a moved address does not produce an
error: it produces a permanent silent hang. scripts/memora_proxy.py holds a stable
127.0.0.1:<PORT> in front of the moving address and re-resolves per connection.
Two failure modes it distinguishes, which cost an outage to learn:
The lookup ran and the container is not listed → it really is gone. Refuse.
The lookup could not run (timeout under host memory pressure) → nothing new is known. Keep serving the last known good address, bounded by
MEMORA_PROXY_STALE_GRACE(300s). Conflating the two took every workspace offline while the containers were answering normally on unchanged addresses.
Set MEMORA_TOOL_PROFILE per instance (see Tool Profiles). Note the profile is
per container while roles are per agent: if one container serves a workspace's
leader and its workers, it needs the leader superset.
Deploy-time script variable (not a memora-server env var — it never reaches the process inside the container):
Variable | Meaning |
| CLI every |
instances/README.md covers the config fields and launchd/README.md the supervised
proxy. REVERT.md documents restoring a workspace to the direct stdio server.
Memora supports three embedding backends:
Backend | Install | Quality | Speed |
| Included | High quality | API latency |
|
| Good, runs offline | Medium |
| Included | Basic keyword matching | Fast |
Embeddings and the LLM are configured separately.
Role | Variables |
LLM (dedup, chat) |
|
Embeddings |
|
Fallback | If both |
A partial split (only one MEMORA_EMBEDDING_* set) is rejected so one provider’s secret is never sent to another host.
Trap — OpenRouter has no embeddings endpoint. OpenRouter’s catalogue is chat/multimodal only (no embedding models). Do not point the embedding path at OpenRouter via OPENAI_BASE_URL (or a MEMORA base URL). That combination 404s every embed call; without MEMORA_EMBEDDING_STRICT=1 Memora falls back to TF-IDF and keeps answering, so the store fills with keyword bags while looking healthy. OpenRouter remains fine for the LLM only.
Worked example (LLM via OpenRouter, embeddings via Cloudflare Workers AI):
@cf/baai/bge-m3 is 1024-dimensional. Token needs Workers AI permission. Endpoint shape:
https://api.cloudflare.com/client/v4/accounts/<account_id>/ai/v1
{
"env": {
"MEMORA_EMBEDDING_MODEL": "openai",
"OPENAI_API_KEY": "<openrouter-key>",
"OPENAI_BASE_URL": "https://openrouter.ai/api/v1",
"MEMORA_LLM_MODEL": "deepseek/deepseek-chat",
"MEMORA_EMBEDDING_API_KEY": "<cloudflare-api-token-with-workers-ai>",
"MEMORA_EMBEDDING_BASE_URL": "https://api.cloudflare.com/client/v4/accounts/<account_id>/ai/v1",
"OPENAI_EMBEDDING_MODEL": "@cf/baai/bge-m3",
"MEMORA_EMBEDDING_STRICT": "1"
}
}What this fix does (no oversell): embeddings and LLM can use different providers; a partial split is rejected; strict mode turns silent degradation into a hard, named failure.
Automatic: Embeddings and cross-references are computed automatically when you memory_create, memory_update, or memory_create_batch.
Manual rebuild required when the store fingerprint changes — not only MEMORA_EMBEDDING_MODEL, but also:
Embedding endpoint (
MEMORA_EMBEDDING_BASE_URL/ host)Actual model id (
OPENAI_EMBEDDING_MODEL, e.g. switching to@cf/baai/bge-m3)Vector kind or dimensions (word-key TF-IDF bags vs dense 1024-d; or 384 vs 1024)
Mixed store (some rows dense, some sparse) — cosine similarity only shares keys, so mixed kinds yield 0.0 recall for old rows
Fingerprint form: backend|model|repr (e.g. openai|@cf/baai/bge-m3|dense:1024). Legacy meta value openai alone is treated as a mismatch.
# After changing embedding model/endpoint, rebuild all embeddings
memory_rebuild_embeddings
# Then rebuild cross-references to update the knowledge graph
memory_rebuild_crossrefsA built-in HTTP server starts automatically with the MCP server, serving an interactive knowledge graph visualization.
Access locally:
http://localhost:8765/graphRemote access via SSH:
ssh -L 8765:localhost:8765 user@remote
# Then open http://localhost:8765/graph in your browserConfiguration:
{
"env": {
"MEMORA_GRAPH_PORT": "8765"
}
}To disable: add "--no-graph" to args in your MCP config.
Graph UI Features
Details Panel - View memory content, metadata, tags, and related memories
Timeline Panel - Browse memories chronologically, click to highlight in graph
History Panel - Action log of all operations with grouped consecutive entries and clickable memory references (deleted memories shown as strikethrough)
Chat Panel - Ask questions about your memories using RAG-powered LLM chat with streaming responses and clickable
[Memory #ID]referencesTime Slider - Filter memories by date range, drag to explore history
Real-time Updates - Graph, timeline, and history update via SSE when memories change
Filters - Tag/section dropdowns, zoom controls
Mermaid Rendering - Code blocks render as diagrams
Node Colors
🟣 Tags - Purple shades by tag
🔴 Issues - Red (open), Orange (in progress), Green (resolved), Gray (won't fix)
🔵 TODOs - Blue (open), Orange (in progress), Green (completed), Red (blocked)
Node size reflects connection count.
When using Cloudflare D1 as your database, the graph visualization is hosted on Cloudflare Pages - no local server needed.
Benefits:
Access from anywhere (no SSH tunneling)
Real-time updates via WebSocket
Multi-database support via
?db=parameterSecure access with Cloudflare Zero Trust
Setup:
Create D1 database:
npx wrangler d1 create memora-graph npx wrangler d1 execute memora-graph --file=memora-graph/schema.sqlDeploy Pages:
cd memora-graph npm run deploynpm run deployrunsscripts/d1_write_guard.py --scope allfirst and refuses on any finding. Do not runwrangler pages deploydirectly: it bypasses the guard (docs/local-primary-implementation.md§0 P6).Configure bindings in Cloudflare Dashboard:
Pages → memora-graph → Settings → Bindings
Add D1:
DB_MEMORA→ your databaseAdd R2:
R2_MEMORA→ your bucket (for images)
Configure MCP with D1 URI:
{ "env": { "MEMORA_STORAGE_URI": "d1://<account-id>/<database-id>", "CLOUDFLARE_API_TOKEN": "<your-token>" } }
Access: https://memora-graph.pages.dev
Secure with Zero Trust:
Cloudflare Dashboard → Zero Trust → Access → Applications
Add application for
memora-graph.pages.devCreate policy with allowed emails
Pages → Settings → Enable Access Policy
See memora-graph/ for detailed setup and multi-database configuration.
Ask questions about your knowledge base directly from the graph UI. The chat panel uses RAG (Retrieval-Augmented Generation) to search relevant memories and stream LLM responses with tool calling support.
Toggle via the floating chat icon at bottom-right
Semantic search finds the most relevant memories as context
Streaming responses with clickable
[Memory #ID]references that focus the graph nodeTool calling — the LLM can create, update, and delete memories directly from chat (e.g., "save this as a memory", "delete memory #42", "update memory #10 with...")
Works on both the local server and Cloudflare Pages deployment
Configure the chat model:
Backend | Variable | Default |
Local server |
| Falls back to |
Cloudflare Pages |
|
|
Requires an OpenAI-compatible API (OPENAI_API_KEY + OPENAI_BASE_URL for local, OPENROUTER_API_KEY secret for Cloudflare). The chat model must support tool use (function calling).
Find and merge duplicate memories using AI-powered semantic comparison:
# Find potential duplicates (uses cross-refs + optional LLM analysis)
memory_find_duplicates(min_similarity=0.7, max_similarity=0.95, limit=10, use_llm=True)
# Merge duplicates (append, prepend, or replace strategies)
memory_merge(source_id=123, target_id=456, merge_strategy="append")LLM Comparison analyzes memory pairs and returns:
verdict: "duplicate", "similar", or "different"confidence: 0.0-1.0 scorereasoning: Brief explanationsuggested_action: "merge", "keep_both", or "review"
Works with any OpenAI-compatible chat API (OpenAI, OpenRouter, Azure, etc.) via OPENAI_BASE_URL. OpenRouter is fine for this LLM path; it does not provide embeddings — configure embeddings separately (see Semantic Search & Embeddings).
Store structured documents (research reports, architecture decisions, post-mortems) as searchable fragment trees:
# Store a markdown document — auto-parsed into typed fragments
memory_store_document(
content="# Research Report\n\n## Evidence Table\n| Claim | Confidence |\n...",
document_key="research/memora-enhancements-2026-04-08",
tags=["memora/research"]
)
# Returns: {root_id: 230, fragment_count: 100, node_map: {claim: [...], plan_item: [...], ...}}
# Retrieve the full document or specific fragment types
memory_get_document(document_key="research/memora-enhancements-2026-04-08")
memory_get_document(document_key="...", node_kinds=["claim"], content_mode="full")
# Delete a document and all its fragments
memory_delete_document(document_key="research/memora-enhancements-2026-04-08")How it works: The parser splits markdown by structure — tables become individual claims, numbered lists become plan items, URL lists become references, and risk sections become risk fragments. Each fragment is independently searchable via memory_semantic_search while the full document is retrievable as a unit.
Fragment types: claim, plan_item, reference, section_chunk, risk
Integrity guards: Document fragments are protected from accidental modification:
memory_deleterequiresforce=Truefor fragmentsmemory_mergerefuses to merge fragmentsmemory_absorbexcludes fragments from similarity matchingmemory_find_duplicatesandmemory_detect_supersessionsskip fragmentsGraph UI hides fragments, shows only the document root node
Structured tools for common memory types:
# Create a TODO with status and priority
memory_create_todo(content="Implement feature X", status="open", priority="high", category="backend")
# Create an issue with severity
memory_create_issue(content="Bug in login flow", status="open", severity="major", component="auth")
# Create a section placeholder (hidden from graph)
memory_create_section(content="Architecture", section="docs", subsection="api")Analyze stored memories and surface actionable insights:
# Full analysis with LLM-powered pattern detection
memory_insights(period="7d", include_llm_analysis=True)
# Quick summary without LLM (faster, no API key needed)
memory_insights(period="1m", include_llm_analysis=False)Returns:
Activity summary — memories created in the period, grouped by type and tag
Open items — open TODOs and issues with stale detection (configurable via
MEMORA_STALE_DAYS;memory_insightsdefault 14, graph UI default 30 — same variable, two consumers)Consolidation candidates — similar memory pairs that could be merged
LLM analysis — themes, focus areas, knowledge gaps, and a summary (requires
OPENAI_API_KEY)
Manage relationships between memories:
# Create typed edges between memories
memory_link(from_id=1, to_id=2, edge_type="implements", bidirectional=True)
# Edge types: references, implements, supersedes, extends, contradicts, related_to
# Remove links
memory_unlink(from_id=1, to_id=2)
# Boost memory importance for ranking
memory_boost(memory_id=42, boost_amount=0.5)
# Detect clusters of related memories
memory_clusters(min_cluster_size=2, min_score=0.3)For offline viewing, export memories as a static HTML file:
memory_export_graph(output_path="~/memories_graph.html", min_score=0.25)This is optional - the Live Graph Server provides the same visualization with real-time updates.
Browse memories directly in Neovim with Telescope. Copy the plugin to your config:
# For kickstart.nvim / lazy.nvim
cp nvim/memora.lua ~/.config/nvim/lua/kickstart/plugins/Usage: Press <leader>sm to open the memory browser with fuzzy search and preview.
Requires: telescope.nvim, plenary.nvim, and memora installed in your Python environment.
Available Tools
44 toolsmemory_absorbA
Intelligently absorb facts into memory with dedup and consolidation.
For each fact: searches for similar existing memories, classifies the relationship via LLM (duplicate/update/contradict/related/new), then takes the appropriate action. Related new facts are automatically consolidated into single, richer memories via LLM synthesis.
Args: facts: List of fact strings to absorb (can be granular — related ones get merged) source: Origin of facts — "manual", "session_end", "post_tool", "import" confidence: Caller's certainty about these facts (0.0-1.0, default: 0.8) context: Optional surrounding context to help disambiguate facts metadata: Optional metadata to attach to created memories tags: Optional tags to attach to created memories dry_run: If True, preview what would happen without writing anything project: Optional project these facts belong to (e.g. "clmux"). Recorded on every created memory as metadata.project and used for section and tag prefixing; suggested tags naming a different configured project are dropped. Without it, the project comes only from metadata.project or a tag naming a project configured in MEMORA_PROJECTS; it is never guessed from the text (issue #47).
Inputs: facts (required), tags, source, context, +4 more. Returns: result
memory_backfill_tagsA
Re-tag existing memories with project-prefixed tags.
Uses deterministic normalization to prefix generic tags (e.g. "plan" → "memora/plan") when the memory content clearly belongs to a specific project. No LLM calls.
Idempotent: re-running produces the same result.
Args: dry_run: If True, preview changes without writing (default: True)
Returns: Dictionary with processed count, changed count, and list of changes.
Rate limited: 120s cooldown.
Inputs: dry_run. Returns: result
memory_boostA
Boost a memory's importance score.
Manually increase a memory's base importance to make it rank higher in importance-sorted searches. The boost is permanent and cumulative.
Args: memory_id: ID of the memory to boost boost_amount: Amount to add to base importance (default: 0.5) Common values: 0.25 (small), 0.5 (medium), 1.0 (large)
Returns: Updated memory with new importance score, or error if not found
Inputs: memory_id (required), boost_amount. Returns: result
memory_clustersA
Detect clusters of related memories.
Args: min_cluster_size: Minimum memories to form a cluster (default: 2) min_score: Minimum similarity score to consider connected (default: 0.3) algorithm: "connected_components" (default) or "louvain" Louvain uses embedding similarity for content-based clustering.
Returns: List of clusters with member IDs, sizes, and common tags
Inputs: algorithm, min_score, min_cluster_size. Returns: result
memory_createA
Create a new memory entry.
Args: content: The memory content text metadata: Optional metadata dictionary tags: Optional list of tags suggest_similar: If True, find similar memories and suggest consolidation (default: True) similarity_threshold: Minimum similarity score for suggestions (default: 0.2) response_mode: "full" (default) or "minimal" response payload size project: Optional project this memory belongs to (e.g. "clmux"). Recorded as metadata.project and used for section and tag prefixing. Without it, the project comes only from metadata.project or a tag naming a project configured in MEMORA_PROJECTS; it is never guessed from the text (issue #47).
Inputs: content (required), tags, project, metadata, +3 more. Returns: result
memory_create_batchC
Create multiple memories in one call.
Inputs: entries (required). Returns: result
memory_create_issueA
Create a new issue/bug memory.
Args: content: Description of the issue status: Issue status - "open" (default) or "closed" closed_reason: If closed, the reason - "complete" or "not_planned" severity: Issue severity - "critical", "major", "minor" (default) component: Component/area affected (e.g., "graph", "storage", "api") category: Issue category (e.g., "bug", "enhancement", "performance") project: Optional project the issue belongs to; its tag becomes "/issues", or bare "issues" without a project
Returns: Created issue memory with auto-assigned tag "/issues" or "issues"
Inputs: content (required), status, project, category, +3 more. Returns: result
memory_create_sectionA
Create a new section/subsection header memory.
Section memories are organizational placeholders that:
Are NOT visible in the graph visualization
Are NOT included in duplicate detection
Do NOT compute embeddings or cross-references
Args: content: Title/description of the section section: Parent section name (e.g., "Architecture", "API") subsection: Subsection path (e.g., "endpoints/auth") project: Optional project the section belongs to; its tag becomes "/sections", or bare "sections" without a project
Returns: Created section memory with auto-assigned tag "/sections" or "sections"
Inputs: content (required), project, section, subsection. Returns: result
memory_create_todoA
Create a new TODO/task memory.
Args: content: Description of the task status: Task status - "open" (default) or "closed" closed_reason: If closed, the reason - "complete" or "not_planned" priority: Task priority - "high", "medium" (default), "low" category: Task category (e.g., "cloud-backend", "graph-visualization", "docs") project: Optional project the task belongs to; its tag becomes "/todos", or bare "todos" without a project
Returns: Created TODO memory with auto-assigned tag "/todos" or "todos"
Inputs: content (required), status, project, category, +2 more. Returns: result
memory_deleteA
Delete a memory by id.
Args: memory_id: Memory ID to delete force: If True, allow deleting document fragments/roots. Use memory_delete_document() instead for clean document removal. reason: Optional tombstone reason (default "deleted")
Inputs: memory_id (required), force, reason. Returns: result
memory_delete_batchC
Delete multiple memories by id.
Args: ids: Memory IDs to delete reason: Optional tombstone reason (default "deleted")
Inputs: ids (required), reason. Returns: result
memory_delete_documentA
Delete a stored document and all its fragments.
Args: document_key: The document identifier version: Optional — delete only this version. If omitted, deletes all versions.
Returns: {deleted_roots: count, deleted_fragments: count, deleted_ids: [...]}
Inputs: document_key (required), version. Returns: result
memory_detect_supersessionsA
Detect memories that supersede (update/replace) other memories.
Scans existing memories for pairs where one is an evolved/updated version of another, then creates 'supersedes' edges between them. Complements memory_absorb which only catches supersessions at write time.
Uses neutral LLM classification (not biased by timestamps) to determine both the relationship type and direction.
Args: min_similarity: Minimum embedding similarity to consider (default: 0.55) limit: Maximum pairs to analyze with LLM (default: 20) dry_run: If True, preview detections without creating edges (default: True) tags_any: Only consider memories with any of these tags min_confidence: Minimum LLM confidence to accept (default: 0.75)
Returns: Dictionary with candidates found, analyzed count, detected supersessions, and detailed results for each pair.
Rate limited: 120s cooldown.
Inputs: limit, dry_run, tags_any, min_confidence, +1 more. Returns: result
memory_digestA
Return a deterministic digest of memories related to a topic.
The digest is an aggregation surface for agents that need current context, not a narrative generator. It combines active hybrid-search hits, optional supersession lineage, related memory ids, and matching TODO/issue memories. Raw source ids are always returned so callers can inspect primitives if the digest is too broad or too narrow.
Args: topic: Subject to digest. k: Maximum active search hits and TODO/issue matches to include. include_lineage: Include supersession history for active hits. include_todos: Include matching todos and issues: metadata.type todo/issue, or a todos/issues tag, bare or with any project prefix (the legacy memora/todos and memora/issues included). include_related_hops: Number of cross-reference hops to collect, capped at 3. synthesize: Reserved for future LLM synthesis. False by default. preview_chars: Preview length per returned memory. tags_any: Restrict hybrid search and discovered TODO/issue matches to memories with any of these tags. tags_all: Restrict hybrid search and discovered TODO/issue matches to memories with all of these tags. metadata_filters: Optional metadata filters. date_from: Optional created_at lower bound (ISO or relative like "7d"). date_to: Optional created_at upper bound (ISO or relative like "7d"). seed_ids: Explicit memory ids to include as source memories and expand lineage/related from. debug: Include ranked candidates, applied filters, and seed/filter notes.
Inputs: topic (required), k, debug, date_to, +10 more. Returns: result
memory_events_clearB
Mark events as consumed.
Args: event_ids: List of event IDs to mark as consumed
Returns: Dictionary with count of cleared events
Inputs: event_ids (required). Returns: result
memory_events_pollA
Poll for memory events (e.g., shared-cache notifications).
Args: since_timestamp: Only return events after this timestamp (ISO format) tags_filter: Only return events with these tags (e.g., ["shared-cache"]) unconsumed_only: Only return unconsumed events (default: True)
Returns: Dictionary with count and list of events
Inputs: tags_filter, since_timestamp, unconsumed_only. Returns: result
memory_exportA
Export all memories to JSON format for backup or transfer. Rate limited: 60s cooldown.
Inputs: no named parameters. Returns: result
memory_export_graphA
Export memories as interactive HTML knowledge graph.
Args: output_path: Path to save HTML file (default: ~/memories_graph.html) min_score: Minimum similarity score for edges (default: 0.25)
Returns: Dictionary with path, node count, edge count, and tags
Inputs: min_score, output_path. Returns: result
memory_find_duplicatesA
Find potential duplicate memory pairs with optional LLM-powered comparison.
Scans cross-references to find memory pairs with similarity >= threshold, then optionally uses LLM to semantically compare them. Uses the same threshold (0.85) as the graph UI duplicate detection.
Args: min_similarity: Minimum similarity score to consider (default: 0.85) max_similarity: Maximum similarity score (default: 1.0, kept for backward compatibility) limit: Maximum pairs to analyze (default: 10) use_llm: Whether to use LLM for semantic comparison (default: True)
Returns: Dictionary with: - pairs: List of potential duplicate pairs with analysis - total_candidates: Total pairs found - analyzed: Number of pairs analyzed with LLM - llm_available: Whether LLM comparison was available
Rate limited: 120s cooldown.
Inputs: limit, use_llm, max_similarity, min_similarity. Returns: result
memory_getA
Retrieve a single memory by id (full content by default).
Args:
memory_id: ID of the memory to retrieve
include_images: If False, strip image data from metadata to reduce response size
fields: Optional list of fields to return (e.g. ["id","content","tags"]). None returns all fields.
follow: Lineage mode. Default latest (resolve superseded id to the current leaf).
full_history adds a history key with all versions root-to-leaf;
all returns the exact requested id with no chain walk (forensic).
Omitting follow is NOT unfiltered — it means resolve to latest.
Inputs: memory_id (required), fields, follow, include_images. Returns: result
memory_get_documentA
Retrieve a stored document and its fragments by document key.
Args: document_key: The document identifier used during storage content_mode: "preview" (default) or "full" for fragment content preview_chars: Max chars for preview mode (default: 120) node_kinds: Optional filter — e.g. ["claim", "plan_item"] for specific fragment types version: Optional version filter. If omitted, returns the latest version.
Returns: {root: {...}, fragments: [...] ordered by ordinal, document_key, version}
Inputs: document_key (required), version, node_kinds, content_mode, +1 more. Returns: result
memory_hierarchyC
Return memories organised into a hierarchy derived from their metadata.
Args: compact: If True (default), return only id, preview (first 80 chars), and tags per memory to reduce response size. Set to False for full memory data.
Inputs: query, compact, date_to, tags_all, +5 more. Returns: result
memory_hybrid_searchA
Perform a hybrid search combining keyword (FTS) and semantic (vector) search.
Uses Reciprocal Rank Fusion (RRF) to merge results from both search methods, providing better results than either method alone.
Returns compact previews by default. Use content_mode="full" for complete content. Use memory_get to fetch full content for specific IDs.
Args:
query: Search query text
semantic_weight: Weight for semantic results (0-1). Higher values favor semantic similarity.
Keyword weight = 1 - semantic_weight. Default: 0.6 (60% semantic, 40% keyword)
top_k: Maximum number of results (legacy name; default 10 if neither limit nor top_k)
limit: Alias for top_k — preferred name; honored so callers matching memory_list work
min_score: Minimum combined score threshold (default: 0.0)
metadata_filters: Optional metadata filters
date_from: Optional date filter (ISO format or relative like "7d", "1m", "1y")
date_to: Optional date filter (ISO format or relative)
tags_any: Match memories with ANY of these tags (OR logic)
tags_all: Match memories with ALL of these tags (AND logic)
tags_none: Exclude memories with ANY of these tags (NOT logic)
content_mode: "preview" (default) returns truncated content_preview; "full" returns complete content
preview_chars: Max chars for preview (default: 300, ignored when content_mode="full")
fields: Optional list of fields to return. Include "score" to keep {memory, score} envelope;
omit "score" for flat list of memory dicts.
follow: Lineage mode. Default active (excludes superseded memories).
latest / full_history as documented on memory_list;
all is the explicit unfiltered forensic escape hatch.
Omitting follow is NOT unfiltered — it means the safe default.
Returns: Dictionary with count and list of results, each containing score and memory
Inputs: query (required), limit, top_k, fields, +11 more. Returns: result
memory_importA
Import memories from JSON format. Rate limited: 60s cooldown.
Args: data: List of memory dictionaries with content, metadata, tags, created_at strategy: "replace" (clear all first), "merge" (skip duplicates), or "append" (add all)
Inputs: data (required), strategy. Returns: result
memory_import_sweepA
Admin: finish or remove rows an interrupted import left behind.
A D1 import marks each row it writes (metadata.import_attempt) until the
row is complete. A crash, or a cleanup that failed, can leave a marked
row; reads hide it. A row whose import still holds a live lease is never
touched. Otherwise this completes each marked row older than
older_than_minutes that has its embedding (the marker is stripped) and
removes each one that has none; younger markers are left alone. Also runs at the start of every import
and at server startup. Returns counts: scanned, completed, removed,
pending (of which live_lease), failed (ids).
Inputs: older_than_minutes. Returns: result
memory_insightsB
Analyze stored memories and produce actionable insights.
Returns activity summary, open items, consolidation suggestions, and optional LLM-powered pattern detection.
Args: period: Time period to analyze (e.g., "7d", "1m", "1y") include_llm_analysis: If True, use LLM to detect patterns and themes
Returns: Dictionary with: - activity_summary: Created counts by type and tag - open_items: Open TODOs and issues with stale detection - consolidation_candidates: Similar memory pairs that could be merged - llm_analysis: Themes, focus areas, gaps, and summary (or null) Rate limited: 120s cooldown.
Inputs: period, include_llm_analysis. Returns: result
memory_linkA
Create an explicit typed link between two memories.
Args: from_id: Source memory ID to_id: Target memory ID edge_type: Type of relationship. Options: - "references" (default): General reference - "implements": Source implements/realizes target - "supersedes": Source replaces/updates target - "extends": Source builds upon target - "contradicts": Source conflicts with target - "related_to": Generic relationship bidirectional: If True, also create reverse link (default: True)
Returns: Dict with created links and their types
Inputs: to_id (required), from_id (required), edge_type, bidirectional. Returns: result
memory_listA
List memories, optionally filtering by substring query or metadata.
Returns compact previews by default to reduce context usage.
Use content_mode="full" when you need the complete content.
Use memory_get to fetch full content for specific IDs.
Args:
query: Optional text search query
metadata_filters: Optional metadata filters
limit: Maximum results (default: 20). Pass -1 for unlimited.
offset: Number of filtered results to skip (default: 0)
date_from: Optional date filter (ISO format or relative like "7d", "1m", "1y")
date_to: Optional date filter (ISO format or relative like "7d", "1m", "1y")
tags_any: Match memories with ANY of these tags (OR logic)
tags_all: Match memories with ALL of these tags (AND logic)
tags_none: Exclude memories with ANY of these tags (NOT logic)
sort_by_importance: Sort results by importance score (default: False, sorts by date)
content_mode: "preview" (default) returns truncated content_preview; "full" returns complete content
preview_chars: Max chars for preview (default: 120, ignored when content_mode="full")
fields: Optional list of fields to return (e.g. ["id","content_preview","tags"]). None returns all fields.
follow: Lineage mode. Default active (excludes superseded memories).
latest resolves each hit to its current version;
full_history expands supersession chains;
all is the explicit unfiltered forensic escape hatch (includes superseded).
Omitting follow is NOT unfiltered — it means the safe default.
Inputs: limit, query, fields, follow, +10 more. Returns: result
memory_list_compactA
[Deprecated] List memories in compact format (id, preview, tags only).
Prefer memory_list which now defaults to compact previews with richer
fields and configurable content_mode/preview_chars.
Returns minimal fields: id, content preview (first 80 chars), tags, and created_at.
Args: query: Optional text search query metadata_filters: Optional metadata filters limit: Maximum number of results to return (default: unlimited) offset: Number of results to skip (default: 0) date_from: Optional date filter (ISO format or relative like "7d", "1m", "1y") date_to: Optional date filter (ISO format or relative like "7d", "1m", "1y") tags_any: Match memories with ANY of these tags (OR logic) tags_all: Match memories with ALL of these tags (AND logic) tags_none: Exclude memories with ANY of these tags (NOT logic)
Inputs: limit, query, offset, date_to, +5 more. Returns: result
memory_mergeA
Merge source memory into target, then delete source.
Combines two memories into one, preserving content and metadata.
Args: source_id: Memory ID to merge from (will be deleted) target_id: Memory ID to merge into (will be updated) merge_strategy: How to combine content: - "append": Append source content to target (default) - "prepend": Prepend source content to target - "replace": Replace target content with source
Returns: Updated target memory and deletion confirmation
Inputs: source_id (required), target_id (required), merge_strategy. Returns: result
memory_migrate_imagesA
Migrate existing base64 images to R2 storage.
Scans all memories and uploads any base64-encoded images to R2, replacing the data URIs with R2 URLs.
Args: dry_run: If True, only report what would be migrated without making changes
Returns: Dictionary with migration results including count of migrated images
Rate limited: 300s cooldown.
Inputs: dry_run. Returns: result
memory_rebuild_crossrefsA
Recompute cross-reference links for all memories. Rate limited: 300s cooldown.
Use this periodically (or after bulk imports) to close the eventual-consistency
gap in the related graph — see memory_related for the consistency model.
Inputs: no named parameters. Returns: result
memory_rebuild_embeddingsA
Recompute embeddings for all memories. Rate limited: 300s cooldown.
Inputs: no named parameters. Returns: result
memory_semantic_searchA
Perform a semantic search using vector embeddings.
Returns compact previews by default. Use content_mode="full" for complete content.
Args:
query: Search query text
top_k: Maximum number of results (legacy name; default 5 if neither limit nor top_k)
limit: Alias for top_k — preferred name; honored so callers matching memory_list work
metadata_filters: Optional metadata filters
min_score: Minimum similarity score threshold
content_mode: "preview" (default) returns truncated content_preview; "full" returns complete content
preview_chars: Max chars for preview (default: 300, ignored when content_mode="full")
fields: Optional list of fields to return. Include "score" to keep {memory, score} envelope;
omit "score" for flat list of memory dicts.
follow: Lineage mode. Default active (excludes superseded memories).
latest / full_history as documented on memory_list;
all is the explicit unfiltered forensic escape hatch.
Omitting follow is NOT unfiltered — it means the safe default.
Inputs: query (required), limit, top_k, fields, +5 more. Returns: result
memory_statsA
Get statistics and analytics about stored memories.
Also reports WHICH DATABASE this session is bound to (memora #997). A valid-but-wrong database name in a workspace's .mcp.json is otherwise undetectable: every tool works, reads succeed, and writes land silently in another project's store. Reporting the bound identity is what makes that drift visible to an agent or an operator at all.
Inputs: no named parameters. Returns: result
memory_store_documentA
Store a structured document as a root memory + searchable fragments.
Parses markdown into typed fragments (claims, plan items, references, risks, section chunks) that are individually searchable while the full document remains retrievable as a unit.
Args: content: Full markdown document content document_key: Stable identifier (e.g. "research/memora-enhancements-2026-04-08") version: Document version (default: 1). If >1, supersedes previous version. tags: Tags applied to root and fragments metadata: Additional metadata merged into root and fragments skip_fragment_crossrefs: If True, fragments skip crossref computation (default: True) project: Optional project the document belongs to: recorded on the root and every fragment, whose tag becomes "/documents" (bare "documents" without a project)
Returns: {document_key, root_id, fragment_count, node_map: {node_kind: [ids]}}
Inputs: content (required), document_key (required), tags, project, +3 more. Returns: result
memory_tag_hierarchyB
Return stored tags organised as a namespace hierarchy.
Inputs: include_root. Returns: result
memory_tagsB
Return the allowlisted tags.
Inputs: no named parameters. Returns: result
memory_unlinkA
Remove a link between two memories.
Args: from_id: Source memory ID to_id: Target memory ID bidirectional: If True, also remove reverse link (default: True)
Returns: Dict with removed links
Inputs: to_id (required), from_id (required), bidirectional. Returns: result
memory_updateB
Update an existing memory.
Metadata updates merge into existing metadata by default. Set a metadata key to null/None to delete that key. Pass replace_metadata=True only when intentionally replacing the whole metadata object.
Inputs: memory_id (required), tags, content, metadata, +1 more. Returns: result
memory_upload_imageA
Upload an image file directly to R2 storage.
Uploads a local image file to R2 and returns the r2:// reference URL that can be used in memory metadata.
Args: file_path: Absolute path to the image file to upload memory_id: Memory ID this image belongs to (used for organizing in R2) image_index: Index of image within the memory (default: 0) caption: Optional caption for the image
Returns: Dictionary with r2_url (the r2:// reference) and image object ready for metadata
Inputs: file_path (required), memory_id (required), caption, image_index. Returns: result
memory_validate_tagsC
Validate stored tags against the allowlist and report invalid entries.
Inputs: include_memories. Returns: result
memory_verify_integrityA
Read-only embedding integrity doctor with bounded offending ids.
Inputs: no named parameters. Returns: result
Tool Schema Changelog
Recent tool additions, removals, and schema changes observed during successful MCP inspections.
Loading tool schema changelog…
TDQS
Scored across 44 tools
Most tools have clearly distinct purposes: specialized create variants for issues, todos, sections, and documents, plus separate search modes. A few clusters overlap (memory_list vs memory_list_compact vs semantic/hybrid search; memory_create vs absorb vs create_batch), but the descriptions clarify their intents well enough.
The memory_ prefix and snake_case are used consistently throughout, and mutations mostly follow verb_noun (create_issue, delete_document, rebuild_crossrefs). Some informational tools use bare nouns (memory_stats, memory_insights, memory_clusters) and a few deprecated/legacy names (memory_list_compact, top_k alias) break the pattern slightly, but the overall scheme remains predictable.
44 tools is well above the 25+ threshold, making the selection surface very heavy for an agent even though the domain is broad. Many maintenance, admin, and analytics tools could be consolidated or hidden behind fewer entry points.
The tool surface is remarkably complete: full CRUD for memories and documents, specialized issue/todo types, multiple search modes, deduplication, merging, supersession detection, tags, hierarchy, stats, import/export, image handling, and events. Minor gaps like the lack of dedicated todo/issue update tools are covered by generic memory_update, so there are no real dead ends.
Maintenance
Related MCP Connectors
Persistent memory and knowledge graphs for AI agents. Hybrid search, context checkpoints, and more.
Shared long-term memory for AI agents: save and recall context as a searchable knowledge graph.
Persistent memory and knowledge graph for AI assistants — keyword + vector + graph search.
Persistent memory for AI agents. Semantic search, memory graph, W3C DID identity.
Related MCP Servers
AlicenseNot gradedqualityDmaintenancePersistent AI memory server with hybrid search and embedded sync. Enables AI agents to store, retrieve, and manage information across sessions with temporal knowledge graph support.MIT- AlicenseNot gradedqualityDmaintenanceEnables AI agents to maintain persistent, local memory with retrieval-augmented search, knowledge graphs, and context surfacing, without any cloud dependencies.MIT
- AlicenseNot gradedqualityDmaintenanceProvides persistent memory for AI tools by building a local knowledge graph from conversations, enabling cross-session recall and context awareness without cloud dependencies.9MIT
- AlicenseNot gradedqualityDmaintenancePersistent memory and knowledge graph server that fuses keyword, vector, and graph search into a single query, enabling AI assistants to recall typed entities and relationships across sessions.MIT