Memento

io.github.scrypster由 GitHub 帳號 scrypster 發布v0.1.0更新於 Oct 27, 2026

Persistent memory for AI tools. Local-first knowledge graph with hybrid search.

已驗證STDIO僅桌面資料庫知識與記憶

概覽

AI 產生的概覽

本地優先的持久記憶伺服器,從 AI 對話建立知識圖譜,讓助理跨工作階段記住決策與脈絡。

可以做什麼
  • 儲存、檢索、更新與遺忘記憶,支援軟刪除、還原及檢視已刪除記憶
  • 以全文加語意向量的混合檢索尋找記憶與相關項目
  • 探索知識圖譜:遍歷實體關係、偵測矛盾、解釋檢索原因、取得工作階段脈絡
  • 管理記憶生命週期:切換狀態、產生新版本、合併相關記憶、檢視版本歷程
  • 組織專案:建立專案,加入史詩、階段、任務與里程碑,列出專案並取得專案樹
適用情境
適合希望助理在工作階段之間記住偏好、架構決策與專案背景、不必反覆說明的場合,也適合團隊讓各自的 AI 工具共用可追溯的記憶。
執行需求
以 stdio 在本機執行。需要 Docker,或 Go 1.23+ 搭配 Node.js 18+ 與 Ollama;首次執行會下載約 5 GB 的 Ollama 模型。選用設定包括 MEMENTO_DATA_PATH、MEMENTO_STORAGE_ENGINE、MEMENTO_LLM_PROVIDER、MEMENTO_USER,以及團隊部署用的 PostgreSQL 連線位址。
安裝前請注意
助理會寫入、修改與刪除記憶,內容會持久保存在磁碟上;多人指向同一執行個體時記憶會被共用。預設設定完全離線,但選用 OpenAI 或 Anthropic 會把內容傳送給這些服務商,並需要 MEMENTO_OPENAI_API_KEY 或 MEMENTO_ANTHROPIC_API_KEY。團隊模式下記憶會標註儲存者身分。

安裝

在 SourceWeft 中

  1. 開啟 儀表板中的 Memento,將其新增到工作區。
  2. 為需要使用其工具的對話啟用該服務。

Desktop only,透過 STDIO。 STDIO 服務會啟動本機處理程序,因此需要 SourceWeft 桌面主機。

其他 MCP 客戶端

參照 儲存庫 中的啟動說明。

README

[Memento — Remember Everything, Forget Nothing]

Memento

Give your AI tools a persistent memory — so every session starts where the last one left off.

[Version] [Go Version] [License] [Docker] [MCP]

Your AI starts fresh every session. Memento fixes that.

It runs on your machine, connects to any MCP-compatible AI tool, and builds a persistent knowledge graph from your conversations — entities, relationships, decisions, and context that survive every session restart.

No cloud. No API keys required. No subscriptions. Your data stays on your machine.


Quick Start

Prerequisites: Docker — or — Go 1.23+ + Node.js 18+ + Ollama

bash
git clone https://github.com/scrypster/memento.gitcd memento./launch.sh

The script detects your environment, runs preflight checks, builds everything, and prints the exact command to connect your AI tool at the end. First run downloads Ollama models (~5 GB). After that, starts in seconds.

Your first memory

Once connected, try this in Claude:

"We're using PostgreSQL — chose it for pgvector support."

Close the tab. Open a new session. Ask:

"What database are we using?"

Your AI already knows. No re-explaining. No context window tricks.

Close the tab. Open a new session.

You: "What database are we using?"
→ Your AI already knows: "PostgreSQL — you chose it for pgvector support."  No re-explaining. No context window tricks. It just remembers.

Behind the scenes, Memento built this automatically:

[Graph Explorer]

Every entity gets wired into a knowledge graph — people, tools, projects, decisions — with confidence scores and timestamps.


Connect Your Tools

Open http://localhost:6363/integrations — the web UI generates configs, download buttons, and connection testing for every client:

[Integrations]

ClientSetup
Claude CodeRun ./launch.sh — it prints the exact copy-paste command at the end. Example form: claude mcp add memento -- `pwd`/memento-mcp
Claude DesktopDownload config → drop in ~/Library/Application Support/Claude/
CursorDownload config → drop in .cursor/mcp.json + optional Cursor Rules file
WindsurfDownload config → drop in .codeium/windsurf/mcp_config.json
OpenClawAdd to ~/.openclaw/mcp.json under mcpServers — same pattern as Claude Desktop
Generic MCPAny MCP client — same pattern: command path + MEMENTO_DATA_PATH env var

The integrations page generates ready-to-paste configs with your actual binary paths and data directories. It also has connection testing, troubleshooting, and per-project workspace scoping.

Make Claude Code proactive (recommended)

The MCP connection makes tools available, but Claude won't use them automatically. Add this to ~/.claude/CLAUDE.md to make Claude store decisions and recall context without being asked:

markdown
## Memento MCP — Persistent Memory
The `memento` MCP server provides persistent cross-session memory. Use these tools proactively — don't wait to be asked.
**Store** (`store_memory`) when the user:- States a preference or working style ("I prefer X", "always use Y format")- Makes an architectural or technical decision- Establishes project context that should survive session restarts- Explicitly says "remember this" or similar
**Recall** (`recall_memory` or `find_related`) when:- Starting a session for a known project — query for relevant context before diving in- About to make a recommendation — check for existing preferences first- The user asks about past decisions, choices, or "what did we decide about X"- Something seems like it may have been discussed in a prior session
**Don't store:** transient debug output, in-progress exploration, or anything session-specific that won't matter next time.
Memories are searchable immediately after storing. Enrichment (entity/relationship extraction) runs asynchronously via local Ollama.

The web UI at Integrations → Claude Code → Make it proactive generates a version with your specific paths and connection settings, plus a download button.

See the full integration guides: Claude Code | Claude Desktop | Cursor & Windsurf | OpenClaw

Team memory — shared knowledge across your whole engineering team

Point everyone's AI tools at the same Memento instance and your team's decisions, conventions, and context become shared knowledge — queryable by anyone, attributable to anyone.

Every memory is tagged with who stored it. Memento auto-detects this from your git config, or you can set it explicitly:

bash
export MEMENTO_USER=alice   # or set in your shell profile

Or in your MCP config:

json
"env": { "MEMENTO_USER": "alice" }

Once set, you can ask:

What did Bob decide about the auth service this week?recall_memory(created_by="bob", created_after="2024-01-14T00:00:00Z")

Setup: Each teammate runs Memento pointing at the same PostgreSQL database. Personal context stays personal (use a separate personal connection). Shared architectural decisions, conventions, and project context go into the shared connection.

See the team setup guide for full PostgreSQL configuration.


What Your AI Gets

Once connected, your AI has 20 tools it can call — no prompting required:

Core memory operations

ToolWhat it does
store_memoryPersist a decision or piece of context — enrichment happens async, returns in <10ms
recall_memoryRetrieve memories by ID, natural-language query, or paginated list with filters
find_relatedHybrid search: full-text + semantic vector + RRF ranking
update_memoryEdit content, tags, or metadata of an existing memory
forget_memorySoft-delete a memory (with grace period) or hard-delete permanently

Search and intelligence

ToolWhat it does
traverse_memory_graphFollow entity relationships to discover contextually connected memories (multi-hop BFS)
detect_contradictionsFind conflicting relationships, superseded-but-active memories, temporal impossibilities
explain_reasoningSurface why specific memories were retrieved for a query
get_session_context"Where did I leave off?" — recent memories grouped by topic

Memory lifecycle

ToolWhat it does
update_memory_stateMove through lifecycle: planning → active → paused / blocked / completed → archived
evolve_memoryCreate a new version that supersedes the old one — preserves full history
consolidate_memoriesLLM-assisted merge of multiple related memories into one coherent record
get_evolution_chainView the full version history of a memory from original to latest

Soft delete and recovery

ToolWhat it does
restore_memoryRecover a soft-deleted memory
list_deleted_memoriesBrowse soft-deleted memories that can still be restored
retry_enrichmentRe-run entity extraction on a memory that previously failed

Project management

ToolWhat it does
create_projectCreate a project memory with optional pre-created phases
add_project_itemAdd epics, phases, tasks, steps, or milestones under a project
get_project_treeRetrieve the full nested hierarchy of a project
list_projectsList all projects, optionally filtered by lifecycle state

Store returns in <10ms. Enrichment — entity extraction, relationship mapping, embedding generation — runs asynchronously. Your AI is never blocked.


What It Looks Like

Auto-extracted entities — zero manual input

[Entities]

People, projects, tools, organizations, languages, APIs — extracted automatically from your AI conversations. No tagging required.

Relationship intelligence

[Relationships]

Your AI knows who works_on what, which tools depend_on which services, and what the current state of each decision is — with confidence scores and timestamps.

The dashboard

[Dashboard]

Live enrichment queue, entity browser, relationship explorer, and graph visualizer — all in the web UI.


Why Memento

vs. Mem0

Mem0 requires cloud API keys and a paid plan for production use. Memento runs entirely on your machine with Ollama — no API keys, no cloud, no per-memory pricing. Memento also ships a full web UI with graph visualization, entity browser, and one-click integration setup. Mem0 has no web interface.

vs. Zep / Graphiti

Zep requires Neo4j or FalkorDB for its knowledge graph. Memento uses SQLite (zero deps) or PostgreSQL — no graph database to manage. Zep's open-source version is limited; the full feature set requires Zep Cloud.

vs. Built-in AI memory (ChatGPT, Claude)

Built-in memory is a flat list of facts with no relationships, no search, no graph, and no way to export or control your data. Memento gives you a structured knowledge graph you own, with hybrid search and full lifecycle management.

vs. Writing docs or wikis

Memento captures context automatically as you work — no manual effort. It builds relationships between concepts instead of isolated pages, and it's designed to be queried by LLMs, not just humans.


How It Works

┌─────────────────────────────────────────────────────┐│  Your AI tool (Cursor / Claude Code / Windsurf / …) │└─────────────────────────┬───────────────────────────┘                          │  MCP (JSON-RPC 2.0 over stdio)┌─────────────────────────▼───────────────────────────┐│                   MCP Server                        ││   store · recall · find_related · contradictions…   │└─────────────────────────┬───────────────────────────┘                          │┌─────────────────────────▼───────────────────────────┐│                Memory Engine                        ││  ┌──────────────────────────────────────────────┐  ││  │           Enrichment Pipeline                │  ││  │  entity extraction → relationship mapping    │  ││  │  → semantic embeddings → contradiction check │  ││  └──────────────────────────────────────────────┘  │└──────────────────┬──────────────────────────────────┘                   │       ┌───────────┴───────────┐       │                       │┌──────▼──────┐       ┌────────▼────────┐│   SQLite    │       │  PostgreSQL     ││  FTS5 index │       │  + pgvector     ││  (default)  │       │  (scale-out)    │└─────────────┘       └─────────────────┘

Features

Runs entirely offline

  • Ollama runs locally — default setup never makes an external network call
  • SQLite database is a single file you own: ~/.memento/memento.db
  • Swap to OpenAI or Anthropic when you want stronger extraction — opt-in only

Hybrid search

  • FTS5 full-text + semantic vector search fused with Reciprocal Rank Fusion (RRF)
  • Finds what you mean, not just what you typed

Knowledge graph

  • Extracts 22 entity types: people, projects, tools, languages, APIs, databases, concepts, and more
  • Maps 44 relationship types with confidence scores
  • Interactive graph explorer in the web UI

Memory lifecycle

  • Lifecycle states: planning → active → paused | blocked | completed | cancelled → archived
  • Decay scoring — stale context loses ranking weight naturally
  • Access-frequency boosting — memories you recall often stay prominent

Production-ready backends

  • SQLite (zero deps, CGo-free) for personal/local use
  • PostgreSQL + pgvector + ivfflat index for team or production deployments

Multi-connection isolation

  • Separate memory namespaces per project, client, or workspace
  • Route MCP calls to different connections with a single env var

Web UI

  • Dashboard with live enrichment queue, entity browser, relationship explorer, graph visualizer
  • One-click integration setup for every supported client
  • Connection testing, CLAUDE.md generation, Cursor Rules download
  • Tracks unrecognized LLM entity types so you can expand your taxonomy over time

LLM Providers

ProviderSetupUse when
Ollama (default)docker compose up — automaticPrivacy first, no API costs, fully offline
OpenAISet MEMENTO_LLM_PROVIDER=openai + API keyStronger extraction quality, cloud OK
AnthropicSet MEMENTO_LLM_PROVIDER=anthropic + API keyStrongest reasoning, cloud OK

Switch providers per connection — different projects can use different LLMs.


Configuration

VariableDefaultDescription
MEMENTO_PORT6363Web UI and REST API port
MEMENTO_STORAGE_ENGINEsqlitesqlite or postgres
MEMENTO_DATA_PATH./dataSQLite database directory
MEMENTO_LLM_PROVIDERollamaollama, openai, or anthropic
MEMENTO_OLLAMA_URLhttp://localhost:11434Ollama API endpoint
MEMENTO_OLLAMA_MODELqwen2.5:7bExtraction model
MEMENTO_EMBEDDING_MODELnomic-embed-textEmbedding model
MEMENTO_OPENAI_API_KEY—OpenAI API key
MEMENTO_ANTHROPIC_API_KEY—Anthropic API key
MEMENTO_DEFAULT_CONNECTION—Default connection name for multi-workspace isolation
MEMENTO_CONNECTIONS_CONFIG—Path to connections.json for multi-workspace setup
MEMENTO_BACKUP_ENABLEDfalseAutomated backups
MEMENTO_BACKUP_INTERVAL24hBackup frequency

PostgreSQL

bash
docker compose --profile postgres up -d
bash
MEMENTO_STORAGE_ENGINE=postgresMEMENTO_DATABASE_URL=postgres://memento:memento_dev_password@localhost:5433/memento

Project Structure

memento/├── cmd/│   ├── memento-mcp/        # MCP server binary — connect this to your AI client│   ├── memento-web/        # Web dashboard — entity browser, graph explorer, settings│   └── memento-setup/      # Interactive setup wizard├── internal/│   ├── api/mcp/            # MCP JSON-RPC server — 20 tool handlers│   ├── engine/             # Memory engine, enrichment pipeline, async workers│   ├── llm/                # Ollama, OpenAI, Anthropic + circuit breaker│   └── storage/│       ├── sqlite/         # SQLite with FTS5 and hybrid vector search│       └── postgres/       # PostgreSQL with pgvector and ivfflat index├── web/│   ├── handlers/           # HTMX handlers│   ├── templates/          # Dashboard, graph, entities, settings, integrations│   └── static/templates/   # MCP config snippets generated per client├── docs/│   └── integrations/       # Per-client integration guides├── migrations/             # SQL schema migrations└── docker-compose.yml

Contributing

Issues and PRs welcome. Open an issue before starting significant work.

bash
go test ./...
go build -o memento-mcp ./cmd/memento-mcp/go build -o memento-web ./cmd/memento-web/go build -o memento-setup ./cmd/memento-setup/

License

MIT — see LICENSE.


Built by

MJ Bonanno — software architect and founder of Scrypster.


Remember everything. Forget nothing. Unlike Leonard Shelby, your context is here to stay — searchable, versioned, and backed by a knowledge graph that never fades.

來源:README.md,提交 cad457c

工具

0
SourceWeft 尚未在沙箱中啟動過該軟體包,因此其工具未知。

版本歷史

1
  1. v0.1.0最新Sep 16, 2026

評分

已滿足適用檢查項的 50%

該評分衡量此收錄條目的完整程度,依據註冊中心條目、端點與公開來源計算得出。它不是對伺服器本身的評價,也不表示伺服器安全或目前可用:可連通性是帶日期的檢查結果,評分也不包含安裝量或使用者評價。

  • 近 30 天內可連通25 分

    請保持端點能夠回應 MCP 握手;SourceWeft 每 30 天探測一次。

  • 已宣告認證方式10 分

    請在註冊中心條目中宣告憑證請求標頭,或保持端點能夠回應探測,以便判定其認證方式。

  • 已列出工具15 分

    請讓伺服器在無憑證時回應 tools/list,或發布可在沙箱中無憑證啟動的軟體包。

  • 描述必需15 分
  • 圖示10 分
  • 文件15 分
  • 授權條款10 分