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

@wemake.cx/memory

v0.4.6

Published

MCP server for enabling memory for AI Agents through a knowledge graph

Readme

Knowledge Graph Memory Server

A robust implementation of persistent memory using a local knowledge graph, now featuring a Code Mode API for programmatic access. This server allows AI agents to store and retrieve structured information about users and concepts across sessions.

Architecture

This server follows the Code Mode Architecture (3-layer design):

  1. Core (src/core/): Pure business logic and domain models (KnowledgeGraphManager).
  2. Code Mode (src/codemode/): Strictly-typed TypeScript API (MemoryGraph) for direct programmatic usage.
  3. MCP Adapter (src/mcp/): Protocol adapter exposing the API as MCP tools.

Core Concepts

Entities

Entities are the primary nodes in the knowledge graph. Each entity has:

  • A unique name (identifier)
  • An entity type (e.g., "person", "organization", "event")
  • A list of observations

Relations

Relations define directed connections between entities. They are always stored in active voice.

Observations

Discrete pieces of information attached to specific entities.

Usage

1. As an MCP Server (Standard)

Configure your MCP client (e.g., Claude Desktop, Trae) to use this server:

{
  "mcpServers": {
    "Memory": {
      "command": "bunx",
      "args": ["@wemake.cx/memory@latest"],
      "env": {
        "MEMORY_FILE_PATH": "/path/to/custom/memory.jsonl"
      }
    }
  }
}

Tools Available:

  • create_entities: Create new entities.
  • create_relations: Create relationships between entities.
  • add_observations: Add facts to existing entities.
  • delete_entities: Remove entities and their relations.
  • delete_observations: Remove specific facts.
  • delete_relations: Remove specific relationships.
  • read_graph: Read the entire graph.
  • search_nodes: Search for entities/relations by query.
  • open_nodes: Retrieve specific entities by name.

2. Programmatic API (Code Mode)

You can import and use the MemoryGraph class directly in your TypeScript applications or other MCP servers.

import { MemoryGraph } from "@wemake.cx/memory";

// Initialize with path to memory file
const memory = new MemoryGraph("./memory.jsonl");

// Create entities
await memory.createEntities([
  {
    name: "John Doe",
    entityType: "person",
    observations: ["Software Engineer", "Likes coffee"]
  }
]);

// Add observations
await memory.addObservations([
  {
    entityName: "John Doe",
    contents: ["Started working on MCP migration"]
  }
]);

// Search
const results = await memory.searchNodes("John");
console.log(results);

Configuration

  • MEMORY_FILE_PATH: Path to the memory storage JSON file (default: memory.jsonl in the server directory).

Development

Build

bun run build

Test

bun test