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

@raajvamsy/memorylayer

v1.7.0

Published

Persistent semantic memory for AI agents — npx memorylayer

Readme

memorylayer

Persistent, searchable memory for AI agents — shared across every agent, chat, and machine. Local-first. MCP-native. One command, no Docker.

npm License: MIT


Quickstart

npx memorylayer

First run downloads the embedding model once (~130 MB, cached in ~/.cache). Every run after that boots in under a second.

Requires Node 18–22 (engines caps at <23). Node 22 LTS is the safest choice — on Windows, better-sqlite3 currently ships no prebuilt binary for Node 18/20/21, which forces a native (node-gyp) build and can fail without Visual Studio Build Tools installed. Node 22 has a prebuilt binary and needs no compiler at all.

Then point any MCP client at the SSE endpoint:

{
  "mcpServers": {
    "memorylayer": {
      "url": "http://localhost:7400/sse"
    }
  }
}

Works with Claude Code, Cursor, Windsurf, Antigravity, and any MCP-compatible agent — same URL, no extra config.


IDE setup (one command)

Wire up your IDE — hooks, rules, and a skill file — automatically:

memorylayer setup                        # interactive: pick IDE + toggle components
memorylayer setup --ide all --yes        # silent, all detected IDEs

# Component flags
memorylayer setup --ide claude --no-hooks   # rules + skill only, no hook
memorylayer setup --ide all --remove --yes  # uninstall everything

Supports Claude Code, Cursor, Windsurf, and Antigravity. See memorylayer.in/docs/quickstart for manual setup.


Options

memorylayer [options]

  -p, --port <number>    Port to listen on (default: 7400)
      --host <string>    Host to bind (default: 127.0.0.1; use 0.0.0.0 for Docker)
  -k, --key <string>     API key — or set MEMORY_API_KEY env var
  -d, --data <path>      Data directory (default: ~/.memorylayer)
      --model <string>   Embedding model (default: Xenova/bge-small-en-v1.5)
      --stdio            Run as stdio MCP server (for Claude desktop)
      --log-level        debug | info | warn | error (default: info)

With an API key (higher limits)

npx memorylayer --key sk-ml-your-key-here
# or
MEMORY_API_KEY=sk-ml-your-key-here npx memorylayer

Get a free key at memorylayer.in.

Docker / remote access

npx memorylayer --host 0.0.0.0 --port 7400

Claude desktop (stdio)

{
  "mcpServers": {
    "memorylayer": {
      "command": "npx",
      "args": ["memorylayer", "--stdio"]
    }
  }
}

What it does

MemoryLayer gives AI agents a persistent, searchable memory store that survives across conversations, agents, and machines.

  • Shared memory — Claude, Cursor, and Windsurf all read and write the same namespace. What one agent learns, every agent knows.
  • Code intelligence — index a codebase with code_ingest, then ask questions. memory_answer returns the right symbol + its siblings + imports in one round trip.
  • Semantic + keyword search — hybrid BM25 + HNSW vector search with time decay and priority weighting.
  • Local-first — all content stays on your machine. Only license validation pings our servers.

MCP tools

Nine unified tools. Earlier releases exposed ~35 narrow tools (memory_upsert, memory_search, code_search, fs_read, …); those were collapsed into these and the old names are gone.

| Tool | What it does | |---|---| | remember | Write. Auto-routes upsert / update / delete / chunk / batch by argument shape. Long content is chunked automatically. | | recall | Read. Intent-routed: search, one-call answer, weave (explore: true), list, or load by id. Answers closed relational questions proof-first. | | code | Codebase intelligence: ingest, locate, impact, grep, status, stop. | | consolidate | Maintenance: TTL prune, replay-and-derive ripple, teach, compose, report. | | verify | Hallucination gate — splits text into claims and marks each grounded / refuted / unsupported. | | prove | Z3 proof certificate for a single high-stakes claim. | | audit | Batch-check every axiom in a loaded domain. Returns an exit code for CI. | | domain | Formal domains: load, assert, status, export, set_mode. | | help | This reference, in-tool. |

Searching several namespaces at once

recall() targets one namespace per call. When related work lives in more than one, declare a group and read across it in a single query:

remember({ namespace: "design", group: "myproject" })
remember({ namespace: "bugs",   group: "myproject" })

recall({ query: "auth rewrite", group: "myproject" })   // both, one ranked pool
recall({ namespaces: ["design", "bugs"] })              // ad-hoc, no declaration
recall({ view: "namespaces" })                          // list all + their groups

Groups are declared, never guessed from namespace names. Writes stay single-namespacegroup only widens reads. An unknown group returns no results rather than silently searching everything. Not supported with explore: true.

WCM engine states

prove, verify, audit, domain and consolidate run on the WCM native engine. Their errors tell you whether to retry:

| error | Meaning | |---|---| | wcm_booting | Still starting — first run after install/upgrade unpacks a large model payload (up to ~2 min). Retry shortly. | | wcm_timeout | Warm, but this request was too expensive. Retry with a smaller input. | | wcm_unavailable | Not installed, or failed its integrity check. Don't retry. |

Memory storage, search and the code tools never depend on WCM — they keep working in all three states.


Plans

| Plan | Monthly calls | Extra tools | |---|---|---| | Free | 1,000 | Basic toolset + 50 memory_answer, 5 code_ingest, 50 memory_related | | Pro ($19/mo) | 5,000 | 500 memory_answer, 20 code_ingest, 200 memory_related | | Pro+ ($49/mo) | 10,000 | memory_weave, memory_chunked_store, memory_batch_store (unlimited) | | Enterprise | Custom | Per-seat keys, org billing, SLA |


REST API

The same server also exposes a REST API on the same port:

# Store a memory
curl -X POST http://localhost:7400/memory \
  -H "Content-Type: application/json" \
  -d '{"content": "User prefers TypeScript strict mode", "namespace": "prefs"}'

# Search
curl -X POST http://localhost:7400/memory/search \
  -H "Content-Type: application/json" \
  -d '{"query": "coding preferences", "namespace": "prefs"}'

# Health check
curl http://localhost:7400/health

Registry

Share memory packages (versioned, integrity-signed) with your team:

memorylayer login --token sk-ml-your-key
memorylayer init                         # creates memory.json
memorylayer publish                      # publish to registry
memorylayer add @yourname/package        # install a package

memorylayer sync push --namespace work   # encrypted backup
memorylayer sync pull --namespace work   # restore on another machine

Full registry docs at memorylayer.in/docs/registry.


Data

Everything lives in ~/.memorylayer:

  • memories.db — SQLite (source of truth)
  • HNSW index — rebuilt from the embeddings table on startup; never treat it as durable

Back up by copying the directory:

cp -r ~/.memorylayer ~/memorylayer-backup

Run with a custom data directory:

npx memorylayer --data /Volumes/external/ml-data

Links


License

MIT © Raaj Vamsy