Логотип Memento

Memento

Спільнота
veerps57

A local-first, LLM-agnostic memory layer for AI assistants

Видавецьveerps57
Репозиторійmemento
МоваTypeScript
Форки
0
Зірки
24
Доступні інструменти
0
Тип транспортуstdio
Категорії
ЛіцензіяApache-2.0
Посилання
  • Підключайте інструменти до робочих процесів із ШІ

    Memento надає можливості MCP, які можуть використовувати сумісні клієнтські ШІ-застосунки та агенти.

  • Доступні інструменти: 0

    Перегляньте нижче дії, які можна викликати, з назвами й описами, якщо сервер їх надає.

  • Готова конфігурація для копіювання

    Скористайтеся прикладами конфігурації, щоб налаштувати цей сервер у вибраному клієнті MCP.

  • Показники інтересу до відкритого коду

    Зірки: 24, форки: 0 — у пов’язаному репозиторії.

Every AI session starts the same way: re-explaining your preferences, your project's conventions, the decisions you made last week, the dead-ends to avoid. Each tool solves this in its own siloed way (CLAUDE.md, .cursorrules, copilot-instructions.md, ChatGPT Memory) — but you, the human, are the one constant. Your memory shouldn't fragment across vendors.

Memento is one place where that memory lives. It runs an MCP server over a local SQLite file, so any MCP-capable AI assistant — Claude Desktop, Claude Code, Cursor, GitHub Copilot, Cline, OpenCode, Aider, a research bot, a custom agent — can read and write durable, structured memory about you, your work, and your decisions. Local-first, no outbound network calls by default, no vendor lock-in.

Quickstart

Three steps from zero to a working memory layer:

1. Run init (interactive on a TTY)

bash
npx @psraghuveer/memento init

Creates the database under the XDG default ($XDG_DATA_HOME/memento/memento.db, typically ~/.local/share/memento/memento.db on POSIX), runs migrations, and — on a TTY — walks you through four one-keystroke setup questions:

  • Your preferred name. Stored as the user.preferredName config key so memories read "Raghu prefers …" instead of "The user prefers …".
  • Install the bundled skill? One y/N. Copies skills/memento/ into ~/.claude/skills/ for clients that load Anthropic-format skills.
  • Seed with a starter pack? Pick one of four bundled packs (engineering-simplicity, pragmatic-programmer, twelve-factor-app, google-sre) so your store has useful memories on day one. Skip to start empty.
  • Auto-install the persona snippet? Detects AI clients on your machine and writes a marker-wrapped block to each one's user-scope custom-instructions file (~/.claude/CLAUDE.md for Claude Code, ~/.config/opencode/AGENTS.md for OpenCode, ~/Documents/Cline/Rules/memento.md for Cline). Idempotent and removable. UI-only clients (Cowork, Claude Desktop, Claude Chat, Cursor User Rules) get printed paste instructions instead.

Then prints copy-paste MCP snippets for every supported client. Idempotent — re-run any time to reprint the snippets and re-ask anything you skipped. Pass --no-prompt to suppress the interactive flow (CI, scripts).

2. Connect your AI client

init prints either a one-line subcommand (where the client ships one) or a JSON snippet to merge into the client's MCP config. Pick the one for your client, paste it, then restart the client so it loads the new MCP server.

The full per-client walkthrough lives in docs/guides/mcp-client-setup.md.

3. Confirm the persona snippet reaches your assistant

Memento ships three teaching surfaces — an MCP instructions spine on the wire, a bundled skill for skill-capable clients, and the persona snippet. Of the three, only the persona snippet is guaranteed to reach the assistant's system prompt on every message — the MCP spec leaves instructions optional and client implementations vary in whether they surface it; the skill is intent-triggered so it doesn't fire on neutral first messages.

If you said Y to the persona auto-install prompt in Step 1, this is already done for every file-based AI client detected on your machine — the snippet was written to ~/.claude/CLAUDE.md, ~/.config/opencode/AGENTS.md, and/or ~/Documents/Cline/Rules/memento.md as applicable. For UI-only clients (Cowork, Claude Desktop, Claude Chat at claude.ai, Cursor User Rules) and for any client you have where the auto-installer didn't fire, copy the persona snippet from docs/guides/teach-your-assistant.md and paste it into the client's custom-instructions / system-prompt slot (the field's name varies — "Custom Instructions" in the client's settings UI, etc.).

That's it. Verify the wire works end-to-end with npx @psraghuveer/memento verify-setup — a write/search/cleanup round-trip that proves your assistant can actually call Memento.

Then try a fresh session: "Remember that I prefer pnpm over npm for Node projects." In the next session, ask "What's my preferred package manager?" and the assistant should recall it without you re-explaining.

Seed your store with a pack

A fresh Memento install is empty. Packs are curated YAML bundles of memories you can install in one step — a stack guide (Rust + Axum, TypeScript + pnpm, Python + uv…), a team's conventions, or a personal set you authored on another machine.

bash
memento pack install engineering-simplicity

That command installs one of the bundled packs — eleven memories distilled from John Maeda's The Laws of Simplicity. Four bundled packs ship out of the box: engineering-simplicity, pragmatic-programmer (Hunt & Thomas's tips), twelve-factor-app (Wiggins / Heroku), and google-sre (Google's SRE books). Preview before installing with memento pack preview <id-or-path>; list what's installed with memento pack list; remove any time with memento pack uninstall <id> --confirm (dry-run by default).

Packs are also how you share. Author one from your existing memories with memento pack create, then distribute it as a file, an HTTPS URL, or a community contribution. The reserved pack:<id>:<version> tag stamps every pack-installed memory so provenance never drifts. Full guide: docs/guides/packs.md. Design rationale: ADR-0020.

Getting started

Prerequisites. Node.js ≥ 22.11, and a C/C++ toolchain so better-sqlite3 can compile on platforms without a prebuild (Xcode command-line tools on macOS, build-essential on Debian/Ubuntu).

Run init once to set things up:

bash
npx @psraghuveer/memento init

init defaults the database to the XDG data dir; pass --db /custom/path/memento.db (or set MEMENTO_DB=/custom/path/memento.db) if you want a non-default location.

To run the server directly (e.g. for debugging):

bash
npx @psraghuveer/memento serve

The server listens on stdio for MCP requests. To pass extra flags (e.g. a custom database location):

bash
npx @psraghuveer/memento serve --db ~/.local/share/memento/memento.db

You can also point at an existing database with the MEMENTO_DB environment variable.

Verify the install by running npx @psraghuveer/memento doctor (add --quick to skip the DB and embedder probes; add --mcp to also scan known MCP client config files). For a one-screen summary of what's in your store, npx @psraghuveer/memento status. To inspect what your install can do — registered commands, current config, database location — without speaking MCP, run npx @psraghuveer/memento context. To smoke-test the MCP transport end-to-end, npx @psraghuveer/memento ping.

Wiring Memento into an MCP client (Claude Desktop, Claude Code, Cursor, Cline, OpenCode, VS Code Agent mode, …) is covered step by step in docs/guides/mcp-client-setup.md. The TL;DR is the three-step quickstart above: init (which auto-installs the persona snippet into detected file-based clients if you say Y), paste the MCP-server snippet into your client, then for UI-only clients paste the persona snippet manually.

Vector retrieval (paraphrase matching on top of FTS) is on by default. The first search triggers a one-time model download (~110 MB) into $XDG_CACHE_HOME/memento/models (or ~/.cache/memento/models / %LOCALAPPDATA%\memento\Cache\models); after that, both FTS and vector arms run automatically. If the model has not yet downloaded, search degrades gracefully to FTS-only. For configuration options and library-wiring details, see docs/guides/embeddings.md.

Operating the store day-to-day — compact, backup, status, scheduling — is covered in docs/guides/operations.md. The conflict workflow is in docs/guides/conflicts.md. To prime an AI assistant on how to use Memento well, see docs/guides/teach-your-assistant.md — and, if your client loads Anthropic-format skills, install the bundled skill as on-intent enrichment over the persona snippet.

See and curate your store in a browser. npx @psraghuveer/memento dashboard launches a local-first web UI that reads against your MEMENTO_DB: memory counts by kind and scope, audit trail, conflict triage, config inspection, installed packs. Localhost-only, gated by a per-launch random token in the URL the launcher hands the browser, no telemetry. The dashboard is a sibling package (@psraghuveer/memento-dashboard) shipped under ADR-0018; see docs/guides/dashboard.md for the full walkthrough.

Stuck? Common failure modes (better-sqlite3 build errors, command not found: memento, STORAGE_ERRORs, missing embedder dependency) are covered in docs/guides/troubleshooting.md.

For the contributor workflow (branching, commit conventions, PR checklist) see CONTRIBUTING.md. AI agents working on the codebase must also read AGENTS.md.

Guiding principles

These are the four principles every design decision is judged against. They are documented at length in ARCHITECTURE.md.

  1. First principles. Every construct exists because we proved we need it, not because it's how things are usually done.
  2. Modular. Any component can be replaced without rewriting the rest.
  3. Extensible. New variants don't require breaking changes.
  4. Config-driven by the user. Behavior is shaped by configuration, not by code.

What Memento is

Four pillars. Same four words used everywhere else this is described.

  • Local. One SQLite file under your home directory. No cloud, no telemetry, no outbound network calls by default. Fully offline.
  • Typed. Five memory kinds — fact, preference, decision, todo, snippet — with kind-specific fields (a decision carries its rationale, a todo its due date, a snippet its language). The assistant can reason about what's still true, not just retrieve text blobs.
  • Audited. Every write produces an event in an append-only log. Conflicts surface for triage instead of silently coexisting. Memories decay if you don't confirm them. You can answer "why is this here?" and "when did it change?" at any time.
  • Yours. Configurable behavior (every retrieval weight, every decay half-life, every scrubber rule), JSONL export and import, Apache-2.0. Carry your memory between machines, leave any time. No vendor lock-in.

Plus: LLM-agnostic (works with whatever model your client talks to), MCP-native (Claude Desktop, Claude Code, Cursor, GitHub Copilot, Cline, OpenCode, Aider, custom agents), privacy-conscious (regex scrubber strips secrets before persistence; patterns are user-configurable).

What Memento is not

  • Not a chat history store. It records distilled, structured memory — preferences, facts, episodes, lessons — not raw transcripts.
  • Not a knowledge graph or semantic database. Use the right tools for that.
  • Not a cloud service. Memory lives on your machine; cloud embedders, sync across machines, and team-shared memory are not part of the product.
  • Not a plugin platform. The architecture leaves the door open, but Memento ships with a fixed surface to hold the line on quality.

The full list of out-of-scope and current limitations is in KNOWN_LIMITATIONS.md.

How it fits together

text
┌─────────────────────────────────────────────────────────┐
│  Clients: Claude Desktop, Claude Code, Cursor, Copilot, │
│           OpenCode, custom agents, …                    │
└──────────────────────┬──────────────────────────────────┘
                       │ MCP (stdio)
┌──────────────────────▼──────────────────────────────────┐
│  memento-server (MCP adapter)                           │
└──────────────────────┬──────────────────────────────────┘
                       │ Command registry
┌──────────────────────▼──────────────────────────────────┐
│  memento-core: services, scope resolver, scrubber,      │
│                conflict detector, decay engine          │
└──────────────────────┬──────────────────────────────────┘
                       │ Repository interfaces
┌──────────────────────▼──────────────────────────────────┐
│  SQLite (better-sqlite3) + FTS5 + optional sqlite-vec   │
└─────────────────────────────────────────────────────────┘

A full architectural walkthrough lives in ARCHITECTURE.md. Each significant decision has an Architecture Decision Record.

For contributors (human or AI)

Contributions are welcome from both human and AI-assisted authors. We treat them with the same standards.

  • Read AGENTS.md if you are an AI agent or working with one. It is the canonical instruction set; CLAUDE.md and .github/copilot-instructions.md are thin pointers to it.
  • Read CONTRIBUTING.md for development setup, branching, commit conventions, and the PR lifecycle.
  • Open a design proposal issue before any non-trivial change.
  • Use the PR template. It asks you to justify, not just describe, the change.

We use GitHub Discussions for questions and ideas; the issue tracker is for bugs and accepted work.

License

Apache-2.0. See NOTICE for attribution.

Packages

Memento is a small workspace of focused packages. The architecture is documented in docs/architecture/ and the design decisions in docs/adr/; both are the source of truth for what Memento does and why.

PackageNotes
@psraghuveer/memento-schemaMemory / event / scope / scrubber / conflict / config / result schemas, plus per-ConfigKey value schemas.
@psraghuveer/memento-coreStorage and migrations, memory + event repositories, scope resolver, scrubber, decay engine with compact archival pass, conflict detection + supersession workflow, embedding hook + bulk re-embed driver, EmbeddingProvider interface, FTS + brute-force vector retrieval pipeline + ranker, and the command registry with validating execute path (ADR 0003).
@psraghuveer/memento-serverMCP adapter — buildMementoServer projects the @psraghuveer/memento-core command registry as MCP tools; serveStdio wires it to stdio. Used by memento serve.
@psraghuveer/memento-embedder-localLocal EmbeddingProvider backed by transformers.js + bge-base-en-v1.5. Ships as a regular dependency; lazy single-flight init downloads the model on first use. See ADR 0006.
@psraghuveer/memento (CLI)The published memento binary (npx @psraghuveer/memento or npm i -g @psraghuveer/memento). Lifecycle commands (init, serve, dashboard, context, doctor, verify-setup, status, ping, backup, export, import, pack, store migrate, completions, explain, skill-path, uninstall) plus a generic projection of the registry surface (memento <namespace> <verb>). See docs/reference/cli.md.
@psraghuveer/memento-dashboardLocal-first web dashboard. Hono server in-process with the engine + Vite-built React SPA. Launched by memento dashboard; binds 127.0.0.1 only. See ADR-0018 and docs/guides/dashboard.md.
@psraghuveer/memento-landingMarketing landing page. Static SPA, deployed to GitHub Pages on every push to main that touches packages/landing/**. Mirrors the dashboard's design tokens; light/dark toggle. Private (not published to npm).

Використовуйте MCP Memento з різними моделями ШІ

TypingMind підключає інструменти MCP на рівні робочого простору, тож після підключення Memento ви можете використовувати їх із різними моделями ШІ в TypingMind, а не налаштовувати окремо для кожної моделі. Ця інтеграція MCP працює локально через конектор MCP TypingMind на вашому пристрої.

Інструкція з налаштування локального конектора

Виберіть цей варіант, якщо серверу MCP потрібен доступ до локальних файлів, програм або приватних ресурсів на вашому комп’ютері.

1

Відкрийте налаштування MCP

У TypingMind перейдіть до розділу «Налаштування», відкрийте «Розширені налаштування», потім «Протокол контексту моделі» й виберіть «Параметри конектора».

  1. Відкрийте TypingMind у браузері.
  2. Натисніть значок налаштувань.
  3. Перейдіть до розділу «Розширені налаштування».
  4. Відкрийте розділ «Протокол контексту моделі».
  5. Натисніть «Параметри конектора» й виберіть «Цей пристрій».
Екран налаштування конектора MCP у TypingMind з вибраним варіантом «Цей пристрій»
2

Виконайте команду конектора

Виберіть «Цей пристрій», скопіюйте команду з TypingMind і виконайте її в терміналі. Не зупиняйте процес, поки користуєтеся MCP.

  1. Скопіюйте команду налаштування, показану в TypingMind.
  2. Відкрийте «Термінал» у macOS або Windows Terminal у Windows.
  3. Вставте й виконайте команду.
  4. Підтвердьте встановлення пакета, якщо термінал запитає дозволу продовжити.
  5. Не закривайте вікно термінала й не зупиняйте процес, поки користуєтеся інструментами MCP.
3

Додайте Memento як сервер

Коли статус конектора зміниться на «Готово», натисніть «Змінити сервери» та вставте конфігурацію сервера MCP.

  1. Зачекайте, доки статус конектора зміниться на «Готово».
  2. Натисніть «Змінити сервери».
  3. Вставте конфігурацію сервера MCP Memento.
  4. Збережіть список серверів.
  5. Оновіть дані, щоб переконатися, що конектор досі готовий до роботи.
Налаштування MCP у TypingMind з активним сервером і кнопкою «Змінити сервери»
{
  "mcpServers": {
    "veerps57-memento": {
      "command": "npx",
      "args": [
        "-y",
        "<mcp-server-package>"
      ]
    }
  }
}
4

Використовуйте підключення з різними моделями

Збережіть список серверів, відкрийте «Плагіни», увімкніть інструменти MCP для Memento, а потім виберіть будь-яку підтримувану модель ШІ в TypingMind і використовуйте інструменти в чаті або призначте їх агенту ШІ.

  1. Відкрийте сторінку «Плагіни» в TypingMind.
  2. Увімкніть інструменти MCP для Memento.
  3. Почніть чат і виберіть модель ШІ, яку хочете використовувати.
  4. Використовуйте інструменти MCP у чаті або призначте їх агенту ШІ.
  5. За потреби перемикайтеся на іншу модель ШІ без повторного підключення MCP.
Чат TypingMind із використанням увімкнених інструментів MCP і вибраної моделі ШІ
Допоможете з цим завданням через Memento?
Memento
Звісно. Я це прочитав.
Ось що я знайшов за допомогою Memento.

Поширені запитання

Для чого використовується сервер MCP Memento?

Memento — це сервер MCP, який дає змогу сумісним клієнтам ШІ підключатися до зовнішніх інструментів і контексту. У TypingMind ви можете додати цей сервер MCP один раз і зробити його інструменти доступними у своєму робочому просторі ШІ.

Чи можу я використовувати MCP Memento з кількома моделями ШІ в TypingMind?

Так. TypingMind підключає інструменти MCP на рівні робочого простору, тому ви можете використовувати Memento з різними моделями ШІ, як-от Claude, ChatGPT, Gemini або іншими моделями, які ви налаштували в TypingMind, без окремого налаштування сервера MCP для кожної моделі.

Навіщо використовувати MCP Memento із TypingMind?

TypingMind — один із найкращих інтерфейсів для чату з великими мовними моделями, адже він об’єднує різні моделі ШІ, промпти, плагіни, агентів ШІ, ключі API та інструменти MCP в одному робочому просторі. Підключивши Memento, ви зможете використовувати його інструменти MCP з вибраними моделями та впорядковано працювати з чатами в TypingMind.

Як підключити MCP Memento до TypingMind?

Memento працює через локальний конектор MCP TypingMind. Це найкращий варіант, коли серверу MCP потрібен доступ до локальних файлів, настільних застосунків, інструментів командного рядка або приватних ресурсів на вашому комп’ютері.

Які інструменти надає MCP Memento у TypingMind?

Memento надає можливості MCP, які можна ввімкнути на сторінці «Плагіни» в TypingMind і використовувати в чаті або призначати агентам ШІ.

Чи потрібно передавати свої ключі API в TypingMind, щоб використовувати MCP Memento?

Ні. TypingMind орієнтований насамперед на локальну роботу й дає змогу зберігати контроль над постачальниками моделей, ключами API, промптами та конфігурацією MCP. Якщо Memento потребує автентифікації, під час створення підключення додайте потрібні заголовки, налаштування OAuth або локальну конфігурацію для цього сервера MCP.

Схожі сервери MCP

Усі

Створіть власний ШІ-простір уже зараз

Підпишіться на нашу розсилку, щоб дізнаватися про нові функції та майбутні розіграші 👇