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

@199-bio/engram

v1.2.0

Published

Give Claude a perfect memory. Local-first MCP server with hybrid search.

Readme


Why This Exists

You tell your AI something important. A name, an allergy, a deadline. Next conversation -- it's forgotten. You repeat yourself. You re-explain context. You carry the cognitive load that your AI should carry for you.

Engram gives your AI a real memory system. Tell it once:

"My colleague Sarah is allergic to shellfish and prefers window seats. She's leading the Q1 product launch."

Weeks later, ask:

"I'm booking a team lunch and flights for the offsite -- what should I know?"

Engram connects the dots. It remembers Sarah, the allergy, the seating preference, the workload. Your AI suggests restaurants without shellfish, books her a window seat, and flags that she's probably swamped with the launch.

This is not keyword matching. It is understanding.

An engram is a unit of cognitive information imprinted in a physical substance -- the biological basis of memory.


Install

npm install -g @199-bio/engram

Requires Node.js 18+.


Quick Start

With Claude Desktop (or any MCP desktop client)

Add to your MCP config (~/Library/Application Support/Claude/claude_desktop_config.json):

{
  "mcpServers": {
    "engram": {
      "command": "npx",
      "args": ["-y", "@199-bio/engram"],
      "env": {
        "ANTHROPIC_API_KEY": "sk-ant-..."
      }
    }
  }
}

With Claude Code

claude mcp add engram -- npx -y @199-bio/engram

That's it. Your AI now remembers.


How It Works

Engram runs three search methods in parallel and fuses the results:

                        ┌─────────────────┐
                        │   Your Query    │
                        └────────┬────────┘
                                 │
                 ┌───────────────┼───────────────┐
                 │               │               │
                 ▼               ▼               ▼
          ┌──────────┐   ┌──────────┐   ┌──────────────┐
          │   BM25   │   │ Semantic │   │  Knowledge   │
          │ Keyword  │   │Embedding │   │    Graph     │
          │  Search  │   │  Search  │   │   Lookup     │
          └────┬─────┘   └────┬─────┘   └──────┬───────┘
               │              │                 │
               └──────────────┼─────────────────┘
                              │
                    ┌─────────▼─────────┐
                    │  Reciprocal Rank  │
                    │     Fusion        │
                    └─────────┬─────────┘
                              │
                    ┌─────────▼─────────┐
                    │  Temporal Decay   │
                    │  + Salience Score │
                    └─────────┬─────────┘
                              │
                    ┌─────────▼─────────┐
                    │  Ranked Results   │
                    └───────────────────┘

BM25 finds exact keyword matches for names and phrases via SQLite FTS5.

Semantic search finds conceptually related content using MongoDB LEAF embeddings via Transformers.js (#1 on BEIR for small models, ~1ms/query, runs natively in Node.js).

Knowledge graph expands results through entity relationships -- ask about Sarah and her company, projects, and preferences all surface together.

Results are merged with Reciprocal Rank Fusion, then scored by temporal decay (Ebbinghaus forgetting curve) and salience. Fresh memories surface first. Important memories resist fading.


Features

Memory That Feels Real

Things fade. A memory from six months ago that you never revisited becomes harder to find. But important things -- a name, a birthday, a preference -- stay accessible even as time passes.

Recall strengthens. Every time a memory surfaces, it becomes more permanent. The things you think about often are the things your AI won't forget.

Everything connects. People link to places, places to events, events to details. The knowledge graph keeps your world coherent.

MCP Tools

Your AI gets these capabilities through the Model Context Protocol:

| Tool | What It Does | |------|-------------| | remember | Store new information with importance and emotional weight | | recall | Find relevant memories ranked by relevance and recency | | forget | Remove a specific memory | | create_entity | Add a person, place, or concept to the knowledge graph | | observe | Record a fact about an entity | | relate | Connect two entities (e.g., "works at", "married to") | | query_entity | Get everything known about someone or something | | list_entities | See all tracked entities | | stats | View memory statistics | | consolidate | Compress old memories and detect contradictions | | engram_web | Launch a visual memory browser |

Memory Consolidation

With an API key, Engram compresses old memories -- like sleep turning experiences into long-term storage:

  1. Groups related low-importance memories
  2. Creates AI-generated summaries (digests)
  3. Flags contradictory information
  4. Archives the originals

Storage stays lean, but nothing important gets lost.

Privacy

Your memories stay on your machine. Everything lives in ~/.engram/. The only external call is optional -- if you provide an API key, Engram can compress old memories into summaries. Core functionality works offline.

Performance

On M1 MacBook Air:

| Operation | Time | |-----------|------| | Remember | ~100ms | | Recall | ~50ms | | Graph queries | ~5ms | | Consolidate | ~2-5s per batch |

Storage: ~1KB per memory.


Configuration

Environment variables:

| Variable | Purpose | Default | |----------|---------|---------| | ENGRAM_DB_PATH | Where to store data | ~/.engram/ | | ANTHROPIC_API_KEY | Enable memory consolidation | None (optional) | | MAX_MEMORY_CACHE | In-memory cache size | 1000 | | RETRIEVAL_TOP_K | Initial retrieval pool size | 50 | | RERANK_TOP_K | Final results after reranking | 10 | | ENGRAM_TRANSPORT | Transport mode (stdio or http) | stdio | | PORT | HTTP port for remote deployment | 3000 |


Building from Source

git clone https://github.com/199-biotechnologies/engram.git
cd engram
npm install
npm run build
npm install -g .

Semantic search uses MongoDB LEAF (mdbr-leaf-ir) via Transformers.js — the #1 retrieval model on BEIR for models under 100M parameters. No Python or external dependencies required.


Roadmap

  • [x] Hybrid search (BM25 + semantic embeddings)
  • [x] Knowledge graph with entity relationships
  • [x] Memory decay and strengthening (Ebbinghaus curve)
  • [x] Consolidation with contradiction detection
  • [x] Web interface for visual memory browsing
  • [ ] Export and import
  • [ ] Scheduled consolidation

Contributing

Contributions are welcome. See CONTRIBUTING.md for guidelines.


License

MIT -- Copyright (c) 2025 Boris Djordjevic, 199 Biotechnologies