Server data from the Official MCP Registry
Persistent, plain-text memory for Claude — as a Markdown repo you own.
About
Persistent, plain-text memory for Claude — as a Markdown repo you own.
Security Report
Valid MCP server (2 strong, 2 medium validity signals). No known CVEs in dependencies. Package registry verified. Imported from the Official MCP Registry.
4 files analyzed · 1 issue found
Security scores are indicators to help you make informed decisions, not guarantees. Always review permissions before connecting any MCP server.
Permissions Required
This plugin requests these system permissions. Most are normal for its category.
What You'll Need
Set these up before or after installing:
Environment variable: MEMORIA_DIR
Environment variable: MEMORIA_EMBEDDINGS
Environment variable: MEMORIA_API_KEY
Environment variable: MEMORIA_OAUTH_CLIENT_SECRET
Environment variable: MEMORIA_ENCRYPTION_KEY
Environment variable: MEMORIA_PUBLIC_URL
How to Install
Add this to your MCP configuration file:
{
"mcpServers": {
"memoria-mcp": {
"command": "npx",
"args": [
"-y",
"@agrippa87/memoria-mcp@0.3.3"
],
"env": {
"MEMORIA_DIR": "your-memoria-dir-here",
"MEMORIA_API_KEY": "your-memoria-api-key-here",
"MEMORIA_EMBEDDINGS": "your-memoria-embeddings-here",
"MEMORIA_PUBLIC_URL": "your-memoria-public-url-here",
"MEMORIA_ENCRYPTION_KEY": "your-memoria-encryption-key-here",
"MEMORIA_OAUTH_CLIENT_SECRET": "your-memoria-oauth-client-secret-here"
}
}
}
}Some servers take additional arguments. See the repository for details.
Documentation
View on GitHubFrom the project's GitHub README.
Memoria
Persistent, plain-text memory for Claude — as a Markdown repo you own.
memoria website · 30-second demo · install · live demo dashboard (key: memoria-demo)
Memoria is an MCP server that gives Claude Code, claude.ai (Chat / CoWork) and any other MCP client a shared long-term memory. Memories are Markdown files with YAML frontmatter in a directory you control; a derived SQLite + FTS5 index provides hybrid semantic + keyword search; a set of agentic tools (reflect, lint, compact, compile) keeps the store healthy; and an optional collector daemon feeds in events from your own tools. It runs as a stdio server for Claude Code and as an OAuth 2.1 HTTP server for remote clients.

A scripted illustration; the Memoria output in it is real, from the demo data. With narration: 30 seconds · the full 84 seconds, which adds sync between devices and the dashboard.
Status: early public release. The server has run as the maintainer's daily driver since spring 2026 (hosted on Cloud Run, two adversarial security reviews and a full code review, a test suite CI runs on Ubuntu and Windows). It installs as a Claude Code plugin or from npm as
@agrippa87/memoria-mcp— see Roadmap. The sub-memory collector (iMessage / IMAP / Google ingestion) ships but should be treated as experimental; read SECURITY.md before enabling sources.
Why Memoria instead of another memory layer?
- You own the data. Plain Markdown in a folder — grep it, edit it, commit it, diff it. The SQLite index is derived and fully rebuildable. No hosted database, no proprietary format, no lock-in.
- Multi-device without a service. Keep the store in a private git repo; daily logs are append-only and merge with git's union driver, so two machines writing the same day never clobber each other (Multi-device sync).
- Agentic self-maintenance. Write-time dedup, reflection, contradiction lint, decay/promotion, and a deterministic "compile, don't retrieve" loop that rolls the daily firehose into linked entity pages.
- Spec-complete remote transport. OAuth 2.1 with PKCE, client credentials, dynamic client registration and metadata discovery — works as a claude.ai custom connector out of the box.
- Honest about search. Three embedding providers (local MiniLM → n-gram fallback, plus OpenAI as an explicit opt-in), three-signal scoring, and every result reports its scan coverage.
Upgrading from an earlier version? See Recent updates and the CHANGELOG.
Architecture
Claude Code Claude Chat CoWork
(CLI) (claude.ai) (claude.ai)
| | |
Direct file MCP Server MCP Server
read/write (HTTP/OAuth) (HTTP/OAuth)
| | |
+-------- $MEMORIA_DIR/memories/ ---------+
(canonical store)
|
+----------+----------+
| |
SQLite + FTS5 Sub-Memory
(search index) Collector
(daemon)
|
+------+------+------+
| | | |
iMessage Email Calendar Custom
| | | |
+------+------+------+
|
Encrypted Ring Buffer
|
Ingestion Pipeline
(re-score, dedup,
rate-limit, fuse)
Key principle: Markdown files are the source of truth. The SQLite index is derived and fully rebuildable from the files.
Features
- 17 MCP tools for memory management, data collection, lint, knowledge compilation, entity-page compilation, and digest compaction
- Sub-memory collector with source adapters for iMessage, macOS Calendar, Email (IMAP), Gmail, Google Calendar, Google Drive, and user-defined custom sources
- Three-signal retrieval:
score = 0.8 x relevance + 0.1 x recency + 0.1 x importance— relevance decides, recency and importance break ties (eval) - Hybrid search: Vector cosine similarity (0.7) + FTS5 BM25 keyword scoring (0.3). Three embedding providers: local
all-MiniLM-L6-v2via@huggingface/transformersby default (true semantic, fully offline after a one-time ~23MB download), n-gram hashing as the lexical fallback, and OpenAItext-embedding-3-smallonly when explicitly selected withMEMORIA_EMBEDDINGS=openai(anOPENAI_API_KEYalone never sends content off the device). - Cross-source temporal fusion: Detects correlated activities across sources within configurable time windows
- Write-time dedup: Checks top-3 similar memories before every write, returns duplicates for agent review
- Encrypted at rest: All collector data encrypted with AES-256-GCM; master key auto-generated, owner-only (0600)
- User agreement flow: Sources cannot be enabled without explicit user consent
- Auto-dependency installation: A source's npm packages are installed when it is enabled — into the data directory, never the memory store, with install scripts disabled
- Content hashing: Skips re-embedding unchanged files during reindex (SHA-256)
- Importance scoring (1-10) with idempotent decay/boost and health monitoring
- FTS5 full-text search with automatic sync triggers
- Bi-temporal metadata:
valid_from/valid_untilfor temporal reasoning - Memory linking: Zettelkasten-style
relatedfield for graph-like traversal - Agentic behaviors: Reflection, consolidation, self-assessment, promotion/demotion
- OAuth 2.1 authentication: Full MCP-spec auth with authorization_code + PKCE, client_credentials, dynamic client registration, and metadata discovery
- Security hardening: Rate limiting, body size limits, session caps, path traversal protection, timing-safe comparisons
- Dual transport: stdio (Claude Code) + Streamable HTTP / SSE (claude.ai and other remote MCP clients)
- Docker-first deployment: multi-stage image, non-root user, persistent volume; a reference Cloud Run + GCS FUSE template under
deploy/gcp/ - Spec-compliant YAML parser: Uses
js-yamlfor frontmatter (handles quoted colons, multi-line strings, special chars in tags) — gracefully degrades on malformed YAML - Bounded lint operations: Contradiction scan capped at top 30 memories by importance, batched 5-in-parallel to control embedding API cost
- Buffer capacity reporting:
/ingestreturnsbufferDroppedcount andbufferUsageso callers know when events are dropped at capacity, andfailedfor events that could not be written this time (kept for retry) - Test suite: covers atomic writes and key-file creation, non-ASCII keyword search, dashboard escaping and CSP, chunker, embeddings, store, optimizer, ingestion, path resolution (incl. symlink-leaf containment), file_watcher allowlisting, privacy-tier classification + sink-side redaction, AES-256-GCM crypto (round-trip/tamper/strict-key), YAML edge cases, access tracking, plus an HTTP integration suite (supertest over the real Express app: the
/dashboard/apiBearer auth-gate, the full OAuthauthorization_code+PKCE flow end-to-end, client-credential + API-key-decoupling checks, redirect allowlisting) and wiki rendering (code-safe[[wikilink]]resolution, stored-XSS escaping, link-label safety). CI fails on coverage regression via per-file floors, and checks the built Docker image as its runtime user. - File watcher: Auto-reindex on change with 1.5s debounce, plus a periodic reindex sweep (default 5 min) as a fallback for mounts where
fs.watchis inert (e.g. GCS FUSE on Cloud Run)
Quick Start
Prerequisites
- Node.js 20+ (
better-sqlite3requires it; CI tests on 22, the Docker image runs 26) - npm
- (Optional) an OpenAI API key for the highest-quality embeddings. Without one, a local
all-MiniLM-L6-v2model provides semantic embeddings fully offline (one-time ~23 MB download).
Option A: install the Claude Code plugin (fastest)
In Claude Code:
/plugin marketplace add Agripp87/memoria_mcp
/plugin install memoria@memoria
That registers the MCP server and — if your store is a git repo — wires up the SessionStart/Stop sync hooks. The first launch installs dependencies and builds from source, which takes a minute; after that it starts immediately.
Nothing else is required: the store defaults to ~/.memoria and is created on
the first write. Skip to Tell Claude how to use it — or read on for
a manual install.
Option B: build from source
git clone https://github.com/Agripp87/memoria_mcp.git
cd memoria_mcp/mcp-server
npm install
npm run build
From npm (Node 20+):
npm install -g @agrippa87/memoria-mcp
claude mcp add memoria -s user -- memoria-mcp
# or, without a global install:
claude mcp add memoria -s user -- npx -y @agrippa87/memoria-mcp
Try it on fake data (30 seconds)
From a source checkout (Option B):
cd memoria_mcp/mcp-server
npm install # skip if you already ran it
npm run demo
# → generates a throwaway ./demo-store with ~29 cross-linked memories
# → open http://127.0.0.1:3110/dashboard (key: demo-key-123)
Register with Claude Code (manual install)
Other MCP clients use the same stdio command and MEMORIA_DIR env var. Cursor, Codex CLI and Gemini CLI have tested setups in docs/clients.md, which also lists what differs outside Claude Code.
claude mcp add memoria -s user -- node /absolute/path/to/memoria_mcp/mcp-server/scripts/mcp-start.mjs
or add to ~/.claude.json / your project's .claude/settings.local.json:
{
"mcpServers": {
"memoria": {
"command": "node",
"args": ["/absolute/path/to/memoria_mcp/mcp-server/scripts/mcp-start.mjs"],
"env": { "MEMORIA_DIR": "/path/to/your/memory-store" }
}
}
}
The store defaults to ~/.memoria (MEMORIA_DIR overrides it). The first memory_write creates the directory layout. Embeddings stay local by default: OPENAI_API_KEY on its own does not switch providers; OpenAI embeddings also need MEMORIA_EMBEDDINGS=openai in env.
Why
scripts/mcp-start.mjsand notdist/index.js: the wrapper runstscbefore serving (compiler output redirected to stderr — stdout is the JSON-RPC transport), so the server you talk to is always built from the checked-out source. If the build fails, it falls back to the previousdist/with a loud stderr warning rather than starting nothing.
Tell Claude how to use it
Memoria works best with a short standing instruction in your CLAUDE.md — e.g. "At session start, memory_search for context relevant to the task. Record decisions, solved bugs and preferences with memory_daily during the session, memory_write for durable facts. Do not capture transactional work." From 0.3.3 the server also sends a short note of its own on connect (when to search, what is worth recording), which Claude Code, Codex CLI and Gemini CLI pass to the model; it suggests and does not require.
Remote access (claude.ai, other devices) with Docker
cp .env.example .env
# fill in MEMORIA_API_KEY, MEMORIA_OAUTH_CLIENT_SECRET, MEMORIA_ENCRYPTION_KEY
# (generation one-liners are in the file) and MEMORIA_PUBLIC_URL
docker compose up -d
curl http://localhost:3100/health
The compose file publishes the port on loopback only and mounts a named volume at /data for the store. Put it behind your usual TLS ingress (Caddy, Cloudflare Tunnel, ngrok, a reverse proxy) and set MEMORIA_PUBLIC_URL to the external URL.
Then in claude.ai → Settings → Connectors → Add custom connector:
- URL:
https://<your-host>/mcp - Advanced → OAuth Client ID:
memoria - Advanced → OAuth Client Secret: your
MEMORIA_OAUTH_CLIENT_SECRET
For a durable cloud deployment see deploy/gcp/README.md (Cloud Run + GCS FUSE + Secret Manager, with CI/CD and auto-rollback). The server itself only needs a directory at MEMORIA_DIR, so any host with a persistent volume works.
Environment Variables
| Variable | Default | Description |
|---|---|---|
MEMORIA_API_KEY | (required for HTTP) | Bearer token for HTTP transport authentication (/mcp, /ingest, /dashboard/api). Distinct from the OAuth client secret below. |
OPENAI_API_KEY | (none) | API key for OpenAI embeddings. On its own it does not enable remote embeddings (see MEMORIA_EMBEDDINGS); when remote embeddings are enabled, memory content and search queries are sent to OpenAI. |
MEMORIA_EMBEDDINGS | auto | Embedding provider: auto (local MiniLM if installed, else hash — never remote), openai (explicit opt-in: sends content to OpenAI), minilm (local all-MiniLM-L6-v2, 384-dim, true semantic), or hash (n-gram lexical fallback, 384-dim). |
MEMORIA_TRUST_PROXY | 1 | Proxy hops in front of the HTTP server, used to find the client IP for rate limiting. 1 suits Cloud Run or one reverse proxy; set 0 when clients reach the server directly (a LAN or VPS deployment), or a client's own X-Forwarded-For picks its rate-limit bucket. |
MEMORIA_LOCK_TAKEOVER | false | When true, a server takes over a store lock held by a live server on another host instead of waiting for it to stop, then waits one heartbeat (about 17 s) before opening the store. The displaced server notices, stops collecting and writing, and answers 503 until the platform stops it. Only for deployments that overlap instances on one shared store by design, such as a Cloud Run rollout (set in deploy/gcp/cloudbuild.yaml). Upgrading from 0.2.x, whose servers take no lock, drain the old revision first. |
MEMORIA_AUTHORIZE_REQUIRE_APPROVAL | false | When true, /authorize additionally requires the operator: the API key, or a dashboard login in the same browser followed by a click on a consent page. The client_credentials grant is disabled. A leaked OAuth client secret alone cannot obtain a token. |
MEMORIA_MODEL_CACHE | (package default) | Directory for the cached MiniLM model. The Docker image pre-bakes it at /app/mcp-server/.models; the build fails if the download does, unless you pass --build-arg PREFETCH_MODEL=false (for OpenAI or hash embeddings, or offline builds). |
MEMORIA_MODEL_OFFLINE | false | Set to true to forbid model downloads (use only the cached/pre-baked model). |
MEMORIA_OAUTH_CLIENT_SECRET | (required when BIND_ALL=true) | OAuth client secret. Keep it distinct from the API key so rotating one doesn't rotate the other. Locally (loopback) it falls back to the API key with a warning. |
MEMORIA_ENCRYPTION_KEY | (required when BIND_ALL=true) | AES-256-GCM master key (64 hex chars) for the collector's encrypted buffer and credential store. Locally, an on-disk key is auto-generated at data/collector.key unless MEMORIA_REQUIRE_ENCRYPTION_KEY=true. Rotating it makes existing ciphertext unreadable. |
MEMORIA_REQUIRE_ENCRYPTION_KEY | false | Refuse to start without MEMORIA_ENCRYPTION_KEY (fail-closed; no on-disk key fallback). |
MEMORIA_OAUTH_CLIENT_ID | memoria | OAuth client id the token endpoint expects (and /register hands out). |
MEMORIA_ALLOWED_REDIRECT_HOSTS | claude.ai,claude.com,anthropic.com,localhost,127.0.0.1 | Comma-separated hostnames permitted as OAuth redirect_uri targets (subdomains allowed). Must be https; plain http is accepted only for localhost / 127.0.0.1. |
MEMORIA_TOKEN_DB_DIR | the data directory | Where the OAuth token database (tokens.sqlite) lives. Set it to container-local disk when the data directory is a FUSE or network mount, where SQLite locking is unreliable — the Docker image sets /tmp/memoria. Tokens are stored hashed and live 24h, so an ephemeral location only costs a re-auth after restart. |
MEMORIA_ALLOW_SHELL_SOURCES | false | Set to true (trusted local instances only) to permit shell_command custom sources, which execute arbitrary commands. Disabled by default. |
MEMORIA_FILE_WATCHER_ROOTS | (none — watchers disabled) | Comma-separated directories that file_watcher collector sources may watch. Unset or empty refuses every watcher; a path inside the collector data directory (key and credentials) is refused regardless. |
MEMORIA_REINDEX_INTERVAL_MS | 300000 | Interval for the periodic reindex sweep (fallback for inert fs.watch). |
MEMORIA_AUTO_OPTIMIZE | false | Set to true to run the idempotent decay/promote/staleness passes on a timer (genuinely autonomous self-management), instead of only when an agent calls memory_optimize. |
MEMORIA_OPTIMIZE_INTERVAL_MS | 86400000 | Interval for the auto-optimize pass (default 24h; only used when MEMORIA_AUTO_OPTIMIZE=true). Counted across restarts: the time of the last pass is kept in the store, so a pass that is due runs at startup. |
MEMORIA_AUTO_COMPILE | false | Set to true to autonomously roll the daily-log firehose up into linked entity pages on a timer (the "compile, don't retrieve" loop), instead of only when an agent calls memory_entities. Drains the ingest-driven compile queue so only sources touched since the last run are rebuilt. |
MEMORIA_COMPILE_INTERVAL_MS | 86400000 | Interval for the auto-compile pass (default 24h; only used when MEMORIA_AUTO_COMPILE=true). Counted across restarts, like the optimize interval. Interval settings that are not a whole number of milliseconds of at least 10 s (1 s for the reindex sweep) are ignored with a warning. |
MEMORIA_RAW_ARCHIVE | true | Durable, immutable provenance archive of every ingested event under data/raw/<source>/<YYYY-MM>.jsonl (privacy-aware: local-only stores a hash only). Batched (one append per source per ingest cycle) and rotated (5MB parts), so it is safe on object-storage FUSE mounts. Set to false to disable. |
MEMORIA_RAW_ARCHIVE_BATCH / MEMORIA_RAW_ARCHIVE_FLUSH_MS / MEMORIA_RAW_ARCHIVE_ROTATE_BYTES | 20 / 60000 / 5242880 | Raw-archive batching knobs: flush after N buffered records or T ms (also flushed every ingest cycle and on shutdown); rotate to a new -pN.jsonl part past the byte cap. |
MEMORIA_INGEST_MAX_ATTEMPTS | 3 | Failed ingest attempts before a poison event is dead-lettered (metadata-only record in data/.dead-letter.jsonl; content never written). |
MEMORIA_BACKPRESSURE_THRESHOLD | 0.8 | Fraction of buffer capacity at which source polling pauses so ingestion can drain the unsynced backlog instead of the buffer evicting unsynced (personal) events. |
MEMORIA_PUBLIC_URL | (none) | Pins the OAuth issuer/endpoint metadata base URL. Without it, the base URL is derived from request headers (Host/X-Forwarded-Host), which reflects attacker-supplied hosts into the discovery document. Set this in any network-exposed deployment. |
MEMORIA_INSECURE_ALLOW_FALLBACKS | false | Escape hatch. With BIND_ALL=true the server refuses to start unless MEMORIA_OAUTH_CLIENT_SECRET, MEMORIA_ENCRYPTION_KEY and MEMORIA_PUBLIC_URL are all set, rather than falling back to the API key, an on-disk key, or a base URL taken from request headers. Self-hosted setups that accept those risks can set this to true. |
MEMORIA_VECTOR_SCAN_CAP | 5000 | Max chunks scanned per query for semantic candidate selection. A daily log is one chunk per entry, so a store with many short entries reaches this sooner; raising it costs search time roughly in proportion (about 65 ms per 5,000 chunks on a development machine). |
MEMORIA_DIR | Auto-detected | The root Memoria directory. Defaults to /data/memoria when DOCKER=true (the image sets it), otherwise ~/.memoria. |
MEMORIA_REPO_URL | https://github.com/Agripp87/memoria_mcp | Link shown in the dashboard's About card (forks: point it at your repo/docs). |
PORT | 3100 | HTTP server port |
BIND_ALL | false | Set to true to bind to 0.0.0.0 instead of 127.0.0.1 (required for Docker/Cloud Run) |
DOCKER | false | Docker defaults: MEMORIA_DIR becomes /data/memoria, and auto-generating an on-disk encryption key logs a warning. The image sets it. |
MCP Tools
Core Memory Tools (13)
| Tool | Description |
|---|---|
memory_search | Semantic + keyword hybrid search with three-signal scoring |
memory_read | Read a specific memory file (returns empty if missing, not error) |
memory_write | Create/update memory with dedup check (top-3 similar). Use force: true to skip. |
memory_list | List all memories, filter by type or tag |
memory_index | Rebuild vector + FTS5 search index and MEMORY_INDEX.md catalog |
memory_daily | Append an entry (up to 50,000 characters) to today's daily log, under a ## HH:MM UTC — note heading. Daily logs are UTC days, and entry times in them are UTC. |
memory_optimize | Run decay, promote, detect_stale, or find_duplicates |
memory_reflect | Read recent daily logs for agent reflection/synthesis, newest first, up to max_chars (default 50,000) |
memory_stats | Health metrics: importance distribution, stale count, access patterns, warnings |
memory_lint | Proactive health checks: contradiction scan, orphan detection, stale cross-refs, missing descriptions, gap analysis, index drift (rule VII), entity-alias collisions and low-confidence claims (rule VIII), unknown directories (files outside the documented layout — how the store once silently split into reference/ + references/) |
memory_compile | Compile analysis results into structured core memories with auto-generated frontmatter and index update |
memory_compact | Read recent daily logs, deduplicate by source+content, surface high-importance events. Output is designed to be summarized into a reflection memory via memory_compile. |
memory_entities | Compile the daily-log firehose into durable, linked per-source entity pages under entities/ — the "compile, don't retrieve" loop (Karpathy rule IV). Deterministic (no LLM), idempotent, and never overwrites a page a human has taken over. Runs on demand, or autonomously via MEMORIA_AUTO_COMPILE=true. |
Sub-Memory Collector Tools (4)
| Tool | Description |
|---|---|
memory_sources | List, enable, disable, add custom, remove, or configure data sources. Consent is granted only in the dashboard, and through MCP only a source's schedule can be changed. |
memory_ingest | Manually trigger ingestion of buffered events into core memory |
memory_fuse | Run cross-source temporal fusion to detect correlated activities |
memory_priority | View collector status, adjust importance thresholds, flush buffer |
Sub-Memory Collector
The collector is an autonomous sub-agent that gathers data from personal tools and feeds it into core memory through an encrypted pipeline.
Built-in Sources
| Source | ID | Platform | Description |
|---|---|---|---|
| iMessage | imessage | macOS | Reads ~/Library/Messages/chat.db. Requires Full Disk Access. |
| Calendar | calendar | macOS | Reads ~/Library/Calendars/Calendar Cache. Configurable look-ahead/behind. |
| Email (IMAP) | email | All | Connects to any IMAP server (Gmail, Outlook, iCloud). Auto-installs imapflow. |
| Gmail | google-gmail | All | Google Gmail via API. Label filtering, importance markers, history-based incremental sync. |
| Google Calendar | google-calendar | All | Google Calendar via API. Multi-calendar, attendees, meeting links, syncToken incremental sync. |
| Google Drive | google-drive | All | Monitors selected Drive folders. Extracts text from Docs, Sheets, plain text files. |
Google Account Setup
The three Google adapters share a single set of OAuth 2.0 credentials:
1. Create Google Cloud credentials:
# Go to https://console.cloud.google.com
# 1. Create a new project (or use existing)
# 2. Enable these APIs:
# - Gmail API
# - Google Calendar API
# - Google Drive API
# 3. Go to Credentials > Create Credentials > OAuth client ID
# - Application type: Desktop app
# - Download the JSON file
2. Get a refresh token:
# Use the OAuth playground or run this one-time script:
# https://developers.google.com/oauthplayground/
#
# Select scopes:
# - Gmail: https://www.googleapis.com/auth/gmail.readonly
# - Calendar: https://www.googleapis.com/auth/calendar.readonly
# - Drive: https://www.googleapis.com/auth/drive.readonly
#
# Exchange authorization code for tokens
# Copy the refresh_token
3. Enable the adapters:
In the Memoria dashboard (Sources tab), click Enable on google-gmail, agree, and paste the client ID, client secret and refresh token into the form that opens. Credentials, hosts and what a source reads can only be set there (or with the API key against /dashboard/api); an MCP client may only change a source's schedule:
memory_sources action="configure" source="google-gmail" config={ "pollIntervalSec": 600 }
The same credentials work for all three Google adapters. Credentials are stored encrypted (AES-256-GCM). Leaving a credential field blank when you configure a source later keeps the stored value. Gmail skips SPAM, TRASH and the Promotions tab (CATEGORY_PROMOTIONS; the tab names PROMOTIONS, SOCIAL, UPDATES and FORUMS are accepted too) unless you change the exclude list.
4. Google Drive folder selection:
In the same form, list the folder IDs to collect (empty for all) and choose whether document content is included.
To find folder IDs, open the folder in Google Drive — the ID is in the URL after /folders/.
Custom Sources
Users can add their own data sources in three modes:
| Mode | Use Case | Example |
|---|---|---|
file_watcher | Monitor a file/directory for changes | Fitness app JSON exports, chat logs |
shell_command | Periodically run a command and parse output | Custom scripts, API calls via curl |
webhook | Receive HTTP POST with event data (not yet implemented — push to the authenticated /ingest endpoint instead) | Smart home systems, IFTTT triggers |
Custom sources support JSON, CSV, and plain text formats with configurable field mappings.
Collector Pipeline
Source Adapters (poll on interval; PAUSED under backpressure)
|
Edge Filtering (importance threshold + privacy tier)
|
Encrypted Ring Buffer (SQLite, AES-256-GCM, max 10K events)
|
Ingestion Pipeline (per-source-fair batches)
├── Re-score importance (boost personal, penalize automated)
├── Rate limit (20 events/source/minute — over-budget events are
│ DEFERRED and retried next cycle, never dropped)
├── Content-hash dedup (SHA-256; recorded only after a successful write)
├── Consolidation (search existing → ADD/UPDATE/SKIP)
└── Write to daily logs
|
Per-event outcomes → only durably-handled events marked synced;
errored events retry up to MEMORIA_INGEST_MAX_ATTEMPTS, then are
dead-lettered (metadata-only) to data/.dead-letter.jsonl
|
Temporal Fusion (±30 min window)
└── Cross-source activity detection → fused activity records
No-silent-loss guarantees (2026-07 hardening): the daemon marks only
durably-handled events as synced (written / duplicate / below-threshold);
rate-limited events stay buffered and retry when the budget refills; a write
failure does not consume the event's dedup slot (retries aren't mistaken for
duplicates); always-failing (poison) events stop retrying after
MEMORIA_INGEST_MAX_ATTEMPTS and leave a metadata-only dead-letter record;
ingestion batches are split fairly across sources so one backlogged source
can't starve the rest; and polling pauses at MEMORIA_BACKPRESSURE_THRESHOLD
of buffer capacity so the ring buffer never has to evict unsynced personal
events while ingestion catches up.
Privacy Tiers
All events are classified into privacy tiers before leaving the device:
| Tier | Behavior | Example |
|---|---|---|
send | Transmit content as-is | Calendar event titles |
summarize | Truncate/redact before sending | Long email content |
local-only | Never leaves the device | Messages containing passwords, credit cards, SSNs |
Encryption
- Master key: AES-256-GCM. Sourced from
MEMORIA_ENCRYPTION_KEY(recommended — pin from a secret manager), else auto-generated on first run atdata/collector.key, created owner-only (0600 on Linux and macOS, with a warning when the filesystem ignores the mode; on Windows it inherits the data folder's permissions). SetMEMORIA_REQUIRE_ENCRYPTION_KEY=trueto require the env var and refuse the on-disk fallback. - Ring buffer: All event content encrypted before SQLite storage
- Config: Source configurations (including IMAP credentials) encrypted at
data/collector-config.enc - Access: Only the Memoria agent and the user have access to decrypted data
Enabling a Source
1. memory_sources action="list" # See available sources
2. In the Memoria dashboard (Sources tab), click Enable on "imessage"
# Consent is dashboard-only by design: an MCP caller cannot grant it.
3. memory_priority action="status" # Verify it's collecting
Sources, consent and the collector belong to the server that opened the
store first. The dashboard only exists in the HTTP server
(memoria-mcp-http), so start it before any Claude Code or Claude
Desktop session on the same store; a dashboard that started second shows
which process holds the store and takes over within 30 seconds of that
process exiting.
Adding a Custom Source
memory_sources action="add_custom" custom_definition={
"id": "fitbit-sleep",
"name": "Fitbit Sleep Data",
"description": "Daily sleep quality from Fitbit JSON export",
"mode": "file_watcher",
"watchPath": "/path/to/fitbit-export.json",
"fileFormat": "json",
"jsonPath": "sleep.data",
"fieldMap": {
"content": "summary",
"timestamp": "dateOfSleep",
"id": "logId"
}
}
HTTP Ingestion (external agents & systems)
Any external system can push events to Memoria's authenticated /ingest endpoint — agent frameworks, cron jobs, webhooks, other assistants. Events flow through the same pipeline as collector sources (re-score, rate-limit, dedup, consolidate, write to the daily log, index).
curl -X POST https://<your-host>/ingest \
-H "Authorization: Bearer YOUR_API_KEY" \
-H "Content-Type: application/json" \
-d '{
"events": [{
"id": "unique-id",
"source": "my-agent",
"content": "Agent completed task X",
"timestamp": "2026-04-03T15:30:00Z",
"importance": 6,
"meta": {"agent_id": "research-agent"}
}]
}'
Response: { "accepted": 1, "buffered": 1, "written": 1, "deduplicated": 0, "rateLimited": 0, "failed": 0, "bufferDropped": 0, "bufferUsage": { … } }
Python hook. integrations/orchestrator_hook.py is a dependency-light (httpx or requests) client that buffers events and flushes them every 30 s in the background — originally written for a multi-agent orchestrator, but generic: record_agent_result, record_metric, record_conversation, record_training_eval, record_prompt_change and record_discovery. All calls are best-effort and never wait on the network; a Memoria outage never breaks the caller.
from integrations.orchestrator_hook import MemoriaHook
hook = MemoriaHook(memoria_url="https://<your-host>/ingest", api_key=os.environ["MEMORIA_API_KEY"])
hook.record_agent_result("research-agent", task, result, metrics)
hook.flush() # on shutdown
Close the loop. Ingestion makes Memoria write-heavy; to make it useful, have your agents call memory_search (or GET /dashboard/api/search with the bearer key) before a run and prepend the top results to their context. That is what turned the maintainer's setup from write-only into a memory that compounds.
Dashboard (Web UI)
Memoria includes a built-in web dashboard for managing memory, data sources, and journaling — no CLI required.

All four views show the built-in demo data (npm run demo), after the two-machine sync in the demo video.
Access: http://127.0.0.1:3100/dashboard (or your public URL)
On first visit, the dashboard asks for your MEMORIA_API_KEY once and exchanges it for an httpOnly session cookie; the key itself is not stored in the browser.
Demo mode (fake data)
Showcase the dashboard — including the Wiki — with realistic made-up data, without touching your real memories.
Hosted demo: https://memoria-demo-hpb4luig7q-uc.a.run.app/dashboard (key: memoria-demo). The demo runs as a separate Cloud Run service under a zero-privilege service account (no Secret Manager, no real bucket) on ephemeral data regenerated on every cold start — a demo compromise can't reach the real service's secrets or memories. Deployed via deploy/gcp/deploy-demo.sh.
Locally:
cd mcp-server
npm run demo
# → generates a throwaway ./demo-store and launches the dashboard
# → open http://127.0.0.1:3110/dashboard (key: demo-key-123)
npm run demo builds (if needed), writes ~29 cross-linked fake memories (an "Alex Rivera" indie-dev persona: profile, projects, decisions, reflections, and 16 collector-style daily logs), and serves them on a local-only port. The demo store is git-ignored and your real MEMORIA_DIR is never touched. Use npm run demo:gen -- --out <dir> to just generate the data. Override the port/key with PORT=… / MEMORIA_API_KEY=….
Security note: the dashboard authenticates via an httpOnly, SameSite=Strict session cookie minted at
POST /dashboard/login(Phase 3, 2026-07) — the API key is no longer stored inlocalStorage, so origin XSS cannot exfiltrate it. All memory/source-derived fields remain HTML-escaped against stored XSS; still treat the dashboard as a trusted-network tool.
Sections
| Tab | What it does |
|---|---|
| Overview | Memory stats (file count, chunks, avg importance, stale), collector status, recent journal entries |
| Data Sources | List all sources with status badges. Enable/disable with one click. Configure credentials via modal forms. Add custom sources (file watcher, shell command). |
| Journal | Write daily journal entries with optional mood tracking and tags. Entries are saved to the daily log and indexed for search. View recent entries. |
| Memories | Browse all memory files sorted by importance. Full-text search across all memories. |
| Wiki | Browse the whole memory store as a cross-linked wiki: rendered markdown, an index by category + a daily-log calendar, related links + [[wiki links]] + computed backlinks, and append-only "add note" annotations on any memory (provenance preserved). |
| Settings | Rebuild search index, view buffer stats, links. |
Journal
The journal provides a way to manually add context that automated collectors can't capture — thoughts, decisions, reflections, plans. Entries support:
- Mood tracking: Select from 5 mood states per entry
- Tags: Comma-separated tags for categorization
- Full indexing: Journal entries are immediately indexed for semantic search
Journal entries are stored in memories/daily/YYYY-MM-DD.md alongside auto-collected events, creating a unified timeline.
Memory File Format
Every memory file uses Markdown with YAML frontmatter:
---
name: Nightjar project status
description: Overview of the offline-first notes app
type: project
importance: 8
created: 2026-03-27
updated: 2026-03-27
tags: [app, react-native]
related: [user/profile.md]
valid_from: 2026-03-27
valid_until:
---
Content in plain markdown...
Types
user | project | decision | feedback | reference | session | reflection | pattern | source-rollup (auto-compiled per-source pages under entities/; renamed from entity in Phase 5 — they are activity rollups keyed by collector source, not extracted entities)
Importance Scale
Documentation truncated — see the full README on GitHub.
Reviews
No reviews yet
Be the first to review this server!
More Developer Tools MCP Servers
Rea
Freeby Morluto · Developer Tools
Reverse engineer anything from your terminal or agent with one CLI and MCP server.
Paperclip
Freeby Paperclipai · Developer Tools
Trending hip-hop artist momentum scores across four cultural dimensions.
Scrapling
Freeby D4Vinci · Developer Tools
Web scraping with stealth HTTP, real browsers, and Cloudflare bypass. CSS selectors supported.
Server Time
Freeby Modelcontextprotocol · Developer Tools
Current time lookup and conversion between IANA timezones
Toleno
Freeby Toleno · Developer Tools
Toleno Network MCP Server — Manage your Toleno mining account with Claude AI using natural language.
MCP Marketplace
Freeby mcp-marketplace · Developer Tools
Search and install MCP servers from inside your AI client.
