npm package discovery and stats viewer.

Discover Tips

  • General search

    [free text search, go nuts!]

  • Package details

    pkg:[package-name]

  • User packages

    @[username]

Sponsor

Optimize Toolset

I’ve always been into building performant and accessible sites, but lately I’ve been taking it extremely seriously. So much so that I’ve been building a tool to help me optimize and monitor the sites that I build to make sure that I’m making an attempt to offer the best experience to those who visit them. If you’re into performant, accessible and SEO friendly sites, you might like it too! You can check it out at Optimize Toolset.

About

Hi, 👋, I’m Ryan Hefner  and I built this site for me, and you! The goal of this site was to provide an easy way for me to check the stats on my npm packages, both for prioritizing issues and updates, and to give me a little kick in the pants to keep up on stuff.

As I was building it, I realized that I was actually using the tool to build the tool, and figured I might as well put this out there and hopefully others will find it to be a fast and useful way to search and browse npm packages as I have.

If you’re interested in other things I’m working on, follow me on Twitter or check out the open source projects I’ve been publishing on GitHub.

I am also working on a Twitter bot for this site to tweet the most popular, newest, random packages from npm. Please follow that account now and it will start sending out packages soon–ish.

Open Software & Tools

This site wouldn’t be possible without the immense generosity and tireless efforts from the people who make contributions to the world and share their work via open source initiatives. Thank you 🙏

© 2026 – Pkg Stats / Ryan Hefner

@iachilles/memento

v0.6.0

Published

MCP memory server using SQLite + FTS5 + sqlite-vec

Downloads

172

Readme

Memento

Some memories are best persisted.

Provides persistent memory capabilities through a SQLite-based knowledge graph that stores entities, observations, and relationships with semantic search using BGE-M3 embeddings for intelligent context retrieval across conversations.

Features

  • Semantic vector search (sqlite-vec/pgvector, 1024d)
  • Offline embedding model (bge-m3)
  • Modular repository layer with SQLite and PostgreSQL backends
  • Enhanced Relevance Scoring with temporal, popularity, contextual, and importance factors
  • Structured graph of entities, observations, and relations
  • Easy integration with Claude Desktop (via MCP)

Prerequisites

System SQLite Version Check

Memento requires SQLite 3.38+. Most macOS and Linux distros ship sqlite3 out of the box, but double-check that it's there and new enough:

sqlite3 --version       # should print a version string, e.g. 3.46.0

Important Note: This check is just to verify SQLite is installed on your system. Memento does NOT use the sqlite3 CLI for its operation it uses the Node.js sqlite3 module internally.

If you see "command not found" (or your version is older than 3.38), install SQLite:

| Platform | Install command | | -------------------- | --------------------------------------------- | | macOS (Homebrew) | brew install sqlite | | Debian / Ubuntu | sudo apt update && sudo apt install sqlite3 |

Configuration

Memento now supports pluggable storage backends. Configuration is controlled entirely through environment variables so it remains easy to embed inside MCP workflows.

| Variable | Description | | --- | --- | | MEMORY_DB_DRIVER | Optional selector for the database backend. Defaults to sqlite. Set to postgres to enable the PostgreSQL manager. | | MEMORY_DB_PATH | Filesystem path for the SQLite database file (only used when the driver is sqlite). | | SQLITE_VEC_PATH | Optional absolute path to a pre-built sqlite-vec extension shared library. | | MEMORY_DB_DSN / DATABASE_URL | PostgreSQL connection string consumed by the pg client. | | PGHOST, PGPORT, PGUSER, PGPASSWORD, PGDATABASE | Individual PostgreSQL connection parameters. Used when no DSN is provided. | | PGSSLMODE | When set to require, SSL will be enabled with rejectUnauthorized: false. |

PostgreSQL notes

  • The PostgreSQL manager requires the pgvector extension. It is automatically initialized with CREATE EXTENSION IF NOT EXISTS vector.

Claude Desktop:

{
  "mcpServers": {
    "memory": {
      "description": "Custom memory backed by SQLite + vec + FTS5",
      "command": "npx",
      "args": [
        "@iachilles/memento@latest"
      ],
      "env": {
        "MEMORY_DB_PATH": "/Path/To/Your/memory.db"
      },
      "options": {
        "autoStart": true,
        "restartOnCrash": true
      }
    }
  }
}

Troubleshooting

sqlite-vec Extension Issues

Important: Memento loads the sqlite-vec extension programmatically through Node.js, NOT through the sqlite3 CLI.

Common misconceptions:

  • ❌ Creating shell aliases for sqlite3 CLI won't affect Memento
  • ❌ Loading extensions in sqlite3 CLI won't help Memento
  • ✅ Use the npm-installed sqlite-vec or set SQLITE_VEC_PATH environment variable if automatic detection fails. This should point to the Node.js-compatible version of the extension, typically found in your node_modules directory.

If automatic vec loading fails:

# Find the Node.js-compatible vec extension
find node_modules -name "vec0.dylib"  # macOS
find node_modules -name "vec0.so"     # Linux

# Use it via environment variable
SQLITE_VEC_PATH="/full/path/to/node_modules/sqlite-vec-darwin-x64/vec0.dylib" memento

API Overview

This server exposes the following MCP tools:

  • create_entities
  • create_relations
  • add_observations
  • delete_entities
  • delete_relations
  • delete_observations
  • read_graph
  • search_nodes
  • open_nodes
  • set_importance - Set importance level (critical/important/normal/temporary/deprecated)

An example of an instruction set that an LLM should know for effective memory handling (see MEMORY_PROTOCOL.md)

Embedding Model

This project uses @xenova/transformers, with a quantized version of bge-m3, running fully offline in Node.js.

License

MIT