MemoryS
Stores and retrieves memory cards in an Obsidian-compatible Markdown vault, with YAML frontmatter, temporal metadata, and source provenance; humans can review and edit the same vault in Obsidian.
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., "@MemoryS what's the current grace period rule for acme-billing?"
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.
MemoryS
Local-first, human-governed memory for AI coding agents.
Built on plain Markdown (Obsidian-compatible) + Git + Stdio MCP + <50ms local Hooks — with zero Python runtime dependencies.
English | 简体中文
Why MemoryS?
Most AI agent memory tools optimize for automatic capture. Over time, agents silently record guesses, keep stale decisions alive, or mix rules across projects.
MemoryS takes a different stance: agents propose, humans publish.
Claude Code / Codex / Cursor / Any MCP Client
│ ▲
│ memory_propose (draft only) │ <50ms recall hook & read-only MCP
▼ │ (memory_search / read / trace)
┌─────────────────────┐ ┌──────────────────────────┐
│ SQLite Review Queue │ │ Obsidian Vault + Git │
│ (secret & policy │───────▶│ (Single Source of Truth)│
│ guard built-in) │ Human │ • YAML frontmatter │
└─────────────────────┘ Publish│ • supersedes / as_of │
Gate │ • SOURCES.md provenance │
└──────────────────────────┘What Makes It Different
Capability | MemoryS | Auto-Capture Plugins | Hosted Vector Memory |
Human publish gate | Agents can only queue drafts; vault writes require explicit confirmation + Git commit | Writes automatically | Writes automatically |
Temporal rules ( | Native | Rarely supported | Limited |
Quote provenance ( | Every rule can link back to verbatim quotes in | Opaque summaries | Chunk snippets |
Zero-dependency local recall | Pure Python stdlib, | Often requires LLM calls | Cloud or local DB |
Cross-client shared brain | One Git/Obsidian vault shared across Claude Code, Codex, Cursor, etc. | Usually single-client | SDK-coupled |
Review Console | Native macOS app (Swift + WKWebView + Keychain) + cross-platform local Web UI | CLI / web only | Cloud dashboard |
Related MCP server: Axiom Meridian
Console Preview
Memory Library — browse active & historical cards, supersession chains, and source quotes:

Review & Publish — inspect agent proposals side-by-side before writing to your vault and committing to Git:

Quick Start (2 Minutes)
Requires Python 3.10+ and Git. No pip packages required for the runtime.
1. Install CLI & Initialize a Demo Vault
git clone https://github.com/52Rain/MemoryS.git
cd MemoryS
pip install -e .
# Create a Git-backed Obsidian vault with sample temporal rules
mem init ~/MemoryS --demo(You can also run directly without pip install via python3 runtime/memory_cli.py ....)
2. Try Point-in-Time (as_of) Recall & Provenance
The demo vault includes a billing rule that changed on 2026-06-15:
# What was the active rule on May 1, 2026? -> returns v1 (7 days)
mem search --project acme-billing --as-of 2026-05-01
# What is active after June 15, 2026? -> returns v2 (Enterprise 14 days)
mem search --project acme-billing --as-of 2026-07-01
# Trace the verbatim quote behind v2
mem trace d-acme-billing-grace-v23. Connect Your AI Agents (Claude Code / Codex / Cursor)
Preview the exact MCP & Hook configuration first, or add --apply to write with .bak backups:
mem connect claude # preview config snippets
mem connect claude --apply # write ~/.claude.json & ~/.claude/settings.json
mem connect codex --apply # write ~/.codex/config.toml & ~/.codex/hooks.json
mem connect cursor --apply # write ~/.cursor/mcp.json4. Launch the Review & Library Console
Cross-platform Web UI (Linux / Windows / macOS):
cd desktop-app && npm ci && npm run build && cd ..
mem uiNative macOS App (Swift + WKWebView + Keychain, no Electron):
cd desktop-app
npm ci
npm run package
open build.noindex/MemoryS.appCore Concepts
Vault Layout (Obsidian-Ready)
~/MemoryS/
├── START.md # Vault entry point
├── PROJECTS.md # Auto-generated project index
├── SOURCES.md # Append-only JSONL provenance quotes
├── notes/
│ ├── preferences/ # Always-on personal preferences
│ ├── methods/ # Cross-project reusable playbooks
│ └── domain/ # Domain knowledge
└── projects/
└── acme-billing/
├── START.md # Project aliases & local workspace paths
├── handoff.md # Current work-in-progress handoff
└── d-acme-billing-*.md # Versioned project decisionsDual-Layer Local Recall (recall_hook.py)
On every prompt (UserPromptSubmit), MemoryS runs purely locally in <50ms:
Layer 1 — Personal Preferences: Active cards under
shared/preferences(budget-capped).Layer 2a — Dual-Path Project Matching: Matches projects by current working directory (
cwdagainstpaths) or by mentioning the project title/alias in the prompt text — even from an unrelated directory.Layer 2b — Relevant Shared Methods & Domain Knowledge: Keyword-scored active cards under
shared/methodsandshared/domain.
MCP Tools (mcp_server.py)
memory_search(query, project, scope, as_of, include_history)— Read-only search with temporal filtering.memory_read(card_id)— Full card metadata, body, andsupersedes/superseded_bychain.memory_trace(card_id)— Resolvesource_refsagainstSOURCES.md.memory_propose(scope, title, body, effective_from, supersedes, quote, use_when, client)— Queue a draft proposal for human approval. Built-in guards reject API keys, private keys, and"do not record"directives.
Optional AI Conflict Check
In the Review Console, you can optionally configure any OpenAI Chat Completions compatible endpoint to check a pending proposal against active cards in the same scope. It is purely advisory and never blocks publishing.
Configuration & Environment Variables
Vault resolution priority:
--vault <path>CLI flagMEMORYS_VAULTenvironment variable~/.config/memorys/config.json(vault_path, set automatically bymem init)~/MemoryS(if present)
Other environment variables:
MEMORYS_APP_DATA: Override SQLite queue directory (defaults to OS standard app data path).MEMORYS_API_KEY: Optional API key for Web UI AI conflict checks (macOS App uses Keychain).
Development & Testing
# Run full unit & integration test suite (pure Python stdlib)
python3 -B -m unittest discover -v -s tests
# Build frontend console
cd desktop-app && npm ci && npm run buildSee CONTRIBUTING.md and SECURITY.md for contribution guidelines and security model details.
License
Available Tools
4 toolsmemory_proposeA
Submit a draft memory card or revision to the MemoryS pending review queue (does NOT modify the published vault). Automatically blocks secrets, tokens, private keys, and 'do not record' directives.
Inputs: body (required), scope (required), title (required), quote, +4 more.
memory_readARead-onlyIdempotent
Read a single memory card's full metadata, markdown body, path, and supersession chain.
Inputs: card_id (required).
memory_searchARead-onlyIdempotent
Search published MemoryS cards by query, project name/ID/alias, or scope. Supports historical point-in-time lookups via as_of (YYYY-MM-DD).
Inputs: as_of, query, scope, project, +1 more.
memory_traceARead-onlyIdempotent
Resolve a card's source_refs against SOURCES.md (or legacy 来源记录.md) to return provenance quotes.
Inputs: card_id (required).
Tool Schema Changelog
Recent tool additions, removals, and schema changes observed during successful MCP inspections.
Loading tool schema changelog…
TDQS
Scored across 4 tools
Each tool maps to a distinct phase of the memory lifecycle: propose (write to pending queue), search (query published cards), read (fetch one card by identity), and trace (resolve provenance references). The propose description explicitly states it does not modify the published vault, cleanly separating it from the read-side tools. No two tools overlap in purpose.
All four tools use the identical pattern of a shared `memory_` namespace prefix followed by a single distinct verb (propose, search, read, trace). Consistent snake_case throughout, no mixing of casing or verb styles.
Four tools is lean but each is justified and this is a focused read-plus-submit service rather than a full CRUD application. It sits at the lower edge of comfortable scope, with no redundancy to trim.
The read side is well covered (search, read, trace), but the write side is one-directional: cards are submitted to a 'pending review queue' with no tool to list, approve, reject, or retract them, leaving an agent unable to complete the editorial workflow it initiates. There is also no delete/forget operation for retired memories.
Maintenance
Related MCP Connectors
One memory for every AI you work with: your rules, notes and decisions in your own Git repo.
Team memory for AI coding agents and code reviews, reviewed by humans and served over MCP.
Project memory, documentation and controlled secret access for AI coding agents.
Shared, scoped, reviewable team memory for AI coding agents.
Related MCP Servers
- AlicenseNot gradedqualityDmaintenanceProvides long-lived, cross-project technical memory for AI agents via markdown cards stored in git and indexed by SQLite, enabling search, retrieval, and human-reviewed knowledge management.ISC
- AlicenseAqualityBmaintenanceEnables AI coding agents to query a team's institutional coding rules and lessons learned, resolving a project → framework → language → global scope hierarchy so only the entries relevant to the current task are returned instead of whole knowledge-base files. It also supports governed proposal approval, PR and feature audits, meeting-transcript extraction, optional semantic ranking, and access-controlled audit logging, while keeping Markdown files as the source of truth.2857 PyPIApache 2.0
- AlicenseNot gradedqualityAmaintenanceGives AI coding agents persistent cross-session memory by storing atomic markdown knowledge cards with bidirectional wiki-links that agents recall before starting work. Syncs across clients and devices via git without any vector database or embeddings.9 npmISC
- AlicenseNot gradedqualityAmaintenanceEnables AI coding agents to save insights from completed tasks as atomic markdown knowledge cards with bidirectional links, then recall relevant cards before starting new work so context carries across sessions. Cards live in a shared local directory readable and editable by humans, with optional git-based sync across devices and clients, and no vector database or embeddings required.9 npmISC