Memora MCP server
Commit Nov 10, 2026Gives AI agents a persistent shared memory store with semantic search, deduplication, supersession lineage, and a knowledge graph.
Also known as agentic-box/memora
- Stars
- 748
- Tools
- β
- Downloads, 30 days
- β
- Latest version
- β
- Last commit
- Nov 10, 2026
- License
- MIT
What is Memora MCP?
Memora gives AI agents a persistent shared memory store with semantic search, deduplication, supersession lineage, and a knowledge graph.
Summary generated from the project's README
About Memora MCP server
Providing AI agents with a durable, shared memory layer is what Memora enables for developers building complex agentic workflows. It functions as a persistent knowledge store that uses semantic search, a knowledge graph, and structured document storage to maintain context across different sessions. Users can deploy it as a local stdio child via pip or as a detached HTTP service using containers.
To use the server, you can configure it in Claude Code or other MCP clients. It requires an OpenAI API key for embeddings and LLM-powered features, though local PyTorch embeddings are available via a specific installation. For cloud-based setups, it supports S3, R2, or D1 for storage and can be managed through a JSON API. The system distinguishes itself through its absorb and digest capabilities, which allow agents to feed facts into a graph where the server automatically handles deduplication, links related concepts, and manages supersession lineage to ensure information stays current without losing historical context.
What you can do with it
- 1Maintain long-term agent contextAn AI agent can store and retrieve facts across different user sessions to maintain continuity.
- 2Manage evolving knowledge statesTrack how information changes over time by following the lineage of updated facts.
- 3Search structured project documentsRetrieve specific claims or findings from markdown documents stored as searchable fragment trees.
Written from the project's README. Every use case is checked against a quote from it.
Configuration
AWS_ENDPOINT_URLAWS_PROFILECLOUDFLARE_API_TOKENMEMORA_ALLOW_ANY_TAGMEMORA_CLOUD_ENCRYPTMEMORA_DATABASESMEMORA_DB_PATHMEMORA_DEFAULT_DBMEMORA_EMBEDDING_API_KEYMEMORA_EMBEDDING_BASE_URLMEMORA_EMBEDDING_MODELMEMORA_EMBEDDING_STRICTMEMORA_GRAPH_PORTMEMORA_LLM_MODELMEMORA_STORAGE_URIMEMORA_TOOL_PROFILEMEMORA_VECTOR_SCAN_PAGE_SIZEOPENAI_API_KEYOPENAI_BASE_URLOPENAI_EMBEDDING_MODEL
| Name | Description | |
|---|---|---|
| AWS_ENDPOINT_URL | β | |
| AWS_PROFILE | β | |
| CLOUDFLARE_API_TOKEN | β | |
| MEMORA_ALLOW_ANY_TAG | β | |
| MEMORA_CLOUD_ENCRYPT | β | |
| MEMORA_DATABASES | β | |
| MEMORA_DB_PATH | β | |
| MEMORA_DEFAULT_DB | β | |
| MEMORA_EMBEDDING_API_KEY | β | |
| MEMORA_EMBEDDING_BASE_URL | β | |
| MEMORA_EMBEDDING_MODEL | β | |
| MEMORA_EMBEDDING_STRICT | β | |
| MEMORA_GRAPH_PORT | β | |
| MEMORA_LLM_MODEL | β | |
| MEMORA_STORAGE_URI | β | |
| MEMORA_TOOL_PROFILE | β | |
| MEMORA_VECTOR_SCAN_PAGE_SIZE | β | |
| OPENAI_API_KEY | β | |
| OPENAI_BASE_URL | β | |
| OPENAI_EMBEDDING_MODEL | β |
Automated checks
Ran Nov 12, 2026Full report βNot verified yet. A server needs a score of 80, no serious finding, and enough data for us to check. How checks work
- Source repository linked and reachablePass
- Open source license (OSI)Pass
- Commit or release in the last yearPass
- Package name not close to a popular packageNot checked
- Remote endpoint uses HTTPSNot checked
- Destructive tools are labelledNot checked
- No hidden instructions to the modelPass
- No critical advisory in the package or its dependenciesNot checked
README
View on GitHubFeatures
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).
- Deleting any version retires the whole lineage (a deleted fact cannot reappear as an older version):
- ποΈ 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
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-mcp
The 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 start -
Clone this repo and
cdinto it:git clone https://github.com/agentic-box/memora.git cd memora -
Copy 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.env -
Create 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 launchctl
up 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 8080
Claude 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"
}
}
}
}
Memora MCP questions
How do I install Memora MCP?
Install the memora-mcp package with pip for a local stdio server, or run it as a detached HTTP container service. The bare 'memora' package on PyPI is an unrelated project.
How does Memora handle duplicate memories?
Absorb uses an LLM to classify each incoming fact as duplicate, update, contradiction, related, or new, skipping duplicates and linking relations. A dry_run option previews the result.
Does Memora delete old memories when facts are updated?
No, updates supersede old knowledge instead of deleting it, and retrieval follows the chain to the current version by default. You can choose active, latest, or full_history follow modes.
Which embedding backends does Memora support?
It supports TF-IDF, sentence-transformers, and OpenAI embeddings. The local embeddings extra adds offline support with PyTorch.
Can Memora serve multiple memory stores at once?
Yes, one process can serve many stores when configured with MEMORA_DATABASES, and each workspace reaches its own store at /mcp/<name>.