Purpose
Memora is an MCP memory layer that adds persistent collective memory to AI agents, intended for scenarios that need to maintain context across sessions and share structured knowledge among multiple agents. It "absorbs" the agent's work results into persistent graph memory, then retrieves relevant memories, unfinished TODOs/questions, related edges, and source IDs via memory_digest(topic), forming source-backed cross-session context.
Main Capabilities
- Persistent storage: SQLite storage, with optional cloud sync (S3, R2, D1).
- Multi-database routing: One process can serve multiple stores; a workspace accesses its own database via /mcp/<name>.
- Hierarchical organization: Supports section/subsection structures and automatically assigns levels.
- Export/import: Supports backup recovery and merge strategies.
- Absorption and lineage: Absorb sends facts into the store, where an LLM classifies them as duplicate/update/contradiction/related/new, skips duplicates, establishes relationships, and integrates related facts; supports dry_run preview. Updates replace old knowledge with supersession lineage rather than deleting it, and by default retrieval follows the chain to the current version (follow modes: active, latest, full_history).
- Topic digest: memory_digest(topic) packages relevant memories, open TODOs/questions, related edges, and source IDs into a single retrieval result.
- Search and intelligence: Semantic search (vector embedding supports TF-IDF, sentence-transformers, OpenAI); advanced queries support full text, date ranges, tag filtering (AND/OR/NOT), and hybrid search; automatic cross-referencing based on similarity; LLM deduplication finds and merges duplicates; memory linking supports typed edges, importance boosting, and cluster detection.
- Document storage: Stores markdown documents as a searchable fragment tree (claims, plan items, references, risks); fragment integrity protection prevents document fragments from being mistakenly deleted/merged/absorbed; entry-level semantic search, while the entire document remains retrievable as a whole.
- Tools and visualization: Structured tools for TODOs, questions, sections; interactive knowledge graph visualization (Mermaid rendering with cluster overlay); built-in HTTP graph serviceserver, optional cloud hosting (D1/Pages); the RAG chat panel supports LLM tool calling, searching, creating, updating, and deleting memories through streaming chat; polling-based event notifications; statistics and analytics (tag usage, trends, connection insights); memory insights (activity summaries, staleness detection, consolidation suggestions, LLM pattern analysis); operation history (create, update, delete, merge, promote, link, grouped timeline view).
Usage
There are two installation paths: pip is a client-launched local stdio subprocess; the container is a detached HTTP service started with up, and with MEMORA_DATABASES a single process can serve multiple stores.
pip (local/stdio) path: the PyPI package is memora-mcp (the bare name memora on PyPI is an unrelated project). Built-in cloud storage (S3/R2) and OpenAI embeddings. Then start it in .mcp.json with "command": "memora-server". Manual invocation: memora-server.
Container (HTTP service) path: the default runtime is Apple's container CLI. Each operation of scripts/memora-instance.sh (build, up, status, logs, down) uses $MEMORA_CONTAINER_BIN (default container). Before the first build, install the Apple container CLI (requires an Apple chip and macOS 26), run container system start to start the runtime, clone the repository and cd into it, copy the instance template instances/example.env to instances/myinstance.env and edit PORT and the backend (STORAGE_URI, VOLUME, or MEMORA_DATABASES), create the credential file, and install the proxy. Credentials require CLOUDFLARE_API_TOKEN (D1 access) and the embedding/LLM key in mcpServers.memora.env of .mcp.json. up does not publish a host port; the workspace connects to the proxy; the proxy only renders the macOS LaunchAgent and prints the launchctl commands, and you must run these commands yourself.
Configuration example (Cloudflare D1, recommended): add the corresponding configuration in .mcp.json at the project root, and use --no-graph to disable the local visualization server and instead use the graph hosted on Cloudflare Pages. Cloud DB (S3/R2) sync mode: add the configuration in ~/.codex/config.toml.
Tool configuration: all 44 MCP tools are registered unconditionally by default, causing about 12,700 tokens of tool schema to be injected into every agent session. MEMORA_TOOL_PROFILE can expose a subset per deployment; tools that are not exposed are missing from tools/list and cannot be dispatched (call_tool returns unknown-tool). If unset or left empty it is full; an unknown value aborts startup with the valid values, and never silently falls back to full. The leader/agent boundary is defined by the two frozensets in memora/tool_profile.py. Under container deployment the profile is per container, and roles are per agent. memora-server is the only supported profile-bearing service path.
Multi-database routing: MEMORA_DATABASES is a JSON registry of {name: storage URI}; clients access it via /mcp/<name>, and the selector is the URL rather than a tool parameter. The binding is sticky per MCP session, and the database cannot be switched mid-session. When MEMORA_DATABASES is unset, the legacy single-backend form is maintained. A malformed configuration refuses to start.
Health checks: GET /health is a liveness probe (does no database I/O); GET /health/db is the alert surface (always HTTP 200, with status ok, degraded, unknown, or error); GET /health/db/{name} is a workspace-level probe (200 or 503).
Applicable Scenarios
- Multiple AI agents need to share long-term memory and cross-session context.
- Agent work needs to be accumulated into a knowledge graph that is retrievable and traceable to sources.
- A memory system is needed with semantic/hybrid search, deduplication, and supersession lineage management.
- Markdown needs to be stored as a document fragment tree with entry-level retrieval.
- Requires visualizable knowledge graph and RAG chat-style memory management.
Limitations
- Container path depends on Apple container CLI, requires Apple silicon and macOS 26; older macOS versions are not supported.
- Missing credential files will cause up to fail; the proxy installation path is not created automatically.
- Registering all 44 tools unconditionally results in full tool schema injection, which needs to be controlled via MEMORA_TOOL_PROFILE.
- When MEMORA_DATABASES is not set, the process binds to only one database.
- If OPENAI_BASE_URL is pointed to OpenRouter and the embedding pair is not configured, embedding calls will return 404 and silently fall back to the TF-IDF bag of keywords.
- Specific information such as fees, pricing, and platform support scope is not provided.