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

mcp-engram

v2.0.0

Published

MCP server for cognitive knowledge graphs — models thought, emotion, reasoning, and episodic memory

Readme

MCP Engram — Cognitive Knowledge Graph

A Model Context Protocol (MCP) server for building and exploring a cognitive neuroscience-inspired knowledge graph. Models thought, emotion, reasoning, and episodic memory after the structure of the human mind. Backed by SQLite — zero infrastructure, single file on disk, works offline.

Quick Start

npx mcp-engram

Or install globally:

npm install -g mcp-engram
mcp-engram

The server stores its database at ~/.mcp-engram/knowledge.db by default. No external services required.

Architecture

How It Works

The MCP server exposes 8 tools that let an LLM build, search, and traverse a knowledge graph:

| Tool | Purpose | |---|---| | search_nodes | Full-text search across all nodes (FTS5) | | explore_context | Weighted graph traversal around given nodes | | create_nodes | Create or upsert nodes of any type | | create_relations | Create edges with context, weight, and confidence | | add_sources | Record provenance (Source nodes + DERIVED_FROM links) | | get_temporal_sequence | Follow chronological chains (NEXT, BEFORE, CAUSES) | | create_reasoning_chain | Build structured multi-step reasoning | | get_reasoning_chain | Retrieve reasoning chains by name or topic |

Node Types (15)

Entity, Event, Concept, Attribute, Proposition, Emotion, Agent, ScientificInsight, Law, Location, Thought, ReasoningChain, ReasoningStep, Source, EmotionalEvent

Storage

  • SQLite with WAL mode for concurrent reads
  • FTS5 virtual table for full-text search with BM25 ranking
  • Recursive CTEs for graph traversal
  • Single nodes table for all types, edges table with UNIQUE constraint, plus aliases and observations tables
  • Complex objects stored as JSON in a properties column

Installation

Prerequisites

  • Node.js v18+
  • A C/C++ toolchain for compiling the better-sqlite3 native module:
    • Mac: Xcode Command Line Tools (xcode-select --install)
    • Linux: build-essential (apt install build-essential)
    • Windows: Visual Studio Build Tools

From npm

npx mcp-engram

From source

npm install
npx nx build mcp-engram
node dist/servers/mcp-engram/main.js

Environment Variables

| Variable | Required | Default | Description | |---|---|---|---| | MCP_ENGRAM_DB_PATH | No | ~/.mcp-engram/knowledge.db | Path to the SQLite database file |

Integrating with Claude Desktop

Add the server to your Claude Desktop config:

  1. Open your config file:

    • Mac: ~/Library/Application Support/Claude/claude_desktop_config.json
    • Windows: %APPDATA%\Claude\claude_desktop_config.json
    • Linux: ~/.config/Claude/claude_desktop_config.json
  2. Add the server configuration:

{
  "mcpServers": {
    "mcp-engram": {
      "command": "npx",
      "args": ["mcp-engram"]
    }
  }
}
  1. Restart Claude Desktop.

Project Structure

servers/mcp-engram/          # MCP server (TypeScript, ESM)
  src/main/                  # Server bootstrap, tool handlers, prompts
  src/storage/               # SQLite backend, FTS, schema, validation
  src/types/                 # TypeScript interfaces and enums

libs/graphrag-memory/        # Shared type library (Entity, Relation, etc.)

Development

# Build all projects
npx nx run-many -t build

# Test all projects
npx nx run-many -t test

# Lint
npx nx lint mcp-engram

# Build specific project
npx nx build mcp-engram
npx nx build graphrag-memory

License

MIT