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-decorator/plugin-memory

v0.1.3

Published

Memory storage plugin with SQLite backend, keyword graph indexing, and WebDAV sync

Readme

@mcp-decorator/plugin-memory

Memory storage plugin with SQLite backend, keyword graph indexing, and WebDAV sync.

Features

  • SQLite Storage - 本地持久化,支持 FTS5 全文搜索
  • Keyword Graph - 关键词图谱索引,基于共现关系构建语义网络
  • Graph Expansion Search - 从种子词扩散检索,避免精确匹配遗漏
  • Batch Import - 批量导入文件夹,自动提取关键词
  • WebDAV Sync - 可选的远程同步机制

Installation

bun add @mcp-decorator/plugin-memory

Usage

import { createStdioServer } from "@mcp-decorator/core";
import { MemoryPlugin } from "@mcp-decorator/plugin-memory";

await createStdioServer({
  name: "memory-server",
  plugins: [
    new MemoryPlugin({
      dbPath: "./data/memory.db",

      // 可选:WebDAV 同步
      webdav: {
        url: "https://dav.example.com",
        username: "user",
        password: "pass",
        remotePath: "/memory/data.db",
      },

      // 检索配置
      search: {
        maxResults: 20,
        minScore: 0.1,
        useGraphExpansion: true,
      },

      // 导入配置
      import: {
        allowedExtensions: [".md", ".txt", ".json"],
        maxFileSize: 1024 * 1024,
      },
    }),
  ],
});

Commands

CRUD

| Command | Description | | --------------- | ------------------------------ | | memory.create | 创建记忆条目 | | memory.read | 读取单条记忆 | | memory.update | 更新记忆 | | memory.delete | 删除记忆 | | memory.list | 列出记忆(支持分页、分类过滤) |

Search

// 基于关键词图谱的语义检索
executeCommand({
  type: "memory.search",
  params: {
    query: "TypeScript 类型系统",
    maxResults: 10,
    minScore: 0.2,
    category: "programming",
  },
});

Import

// 批量导入文件夹
executeCommand({
  type: "memory.import",
  params: {
    path: "./docs",
    extensions: [".md"],
    category: "documentation",
    recursive: true,
  },
});

Keywords

// 获取图谱统计和热门关键词
executeCommand({ type: "memory.keywords", params: {} });

// 获取相关关键词
executeCommand({
  type: "memory.keywords",
  params: { keyword: "typescript", limit: 10 },
});

Sync

// 推送到 WebDAV
executeCommand({ type: "memory.sync", params: { action: "push" } });

// 从 WebDAV 拉取
executeCommand({ type: "memory.sync", params: { action: "pull" } });

// 查看同步状态
executeCommand({ type: "memory.sync", params: { action: "status" } });

Architecture

┌─────────────────────────────────────────────────────────┐
│                    MemoryPlugin                         │
├─────────────────────────────────────────────────────────┤
│  Commands: create/read/update/delete/list/search/...   │
├─────────────────────────────────────────────────────────┤
│                   MemoryService                         │
├──────────────────┬──────────────────┬──────────────────┤
│  SQLiteStorage   │   KeywordGraph   │   FileImporter   │
│  (better-sqlite3)│   (共现图谱)      │   (glob)         │
├──────────────────┴──────────────────┴──────────────────┤
│                   WebDAVSync (optional)                 │
└─────────────────────────────────────────────────────────┘

Keyword Graph Algorithm

  1. 构建阶段

    • 从每条记忆的关键词构建共现边
    • 计算节点权重(IDF 变体)
    • 边权重 = 共现频率
  2. 检索阶段

    • 从查询词出发,BFS 扩展相关词
    • 距离衰减 + 边权重 + 节点权重 = 扩展词得分
    • 候选条目按匹配得分排序
  3. 增量更新

    • 新增/删除条目时实时更新图谱
    • 关闭时持久化到 SQLite

License

MIT