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

@memstack/mcp

v0.6.4

Published

MCP server for MemStack — AI agent memory via Model Context Protocol

Readme

@memstack/mcp

MCP server for MemStack — persistent AI agent memory via the Model Context Protocol.

Installation

npm install -g @memstack/mcp

Quick Start

Add to your MCP client config (~/.claude/mcp.json or .cursor/mcp.json):

{
  "mcpServers": {
    "memstack": {
      "command": "npx",
      "args": ["-y", "@memstack/mcp"],
      "env": {
        "MEMSTACK_STORAGE": "memory",
        "OPENAI_API_KEY": "sk-..."
      }
    }
  }
}

Configuration

All configuration is via environment variables. No config files needed.

Storage backends

| Variable | Values | Default | |---|---|---| | MEMSTACK_STORAGE | memory, disk, markdown, postgres, sqlite, redis | memory |

In-memory (default — testing only, data lost on restart):

MEMSTACK_STORAGE=memory

Disk (JSON file per actor):

MEMSTACK_STORAGE=disk
MEMSTACK_DIR=/Users/me/.memstack

Markdown (zero infra, human-readable):

MEMSTACK_STORAGE=markdown
MEMSTACK_DIR=/Users/me/.memstack

Postgres (production):

MEMSTACK_STORAGE=postgres
DATABASE_URL=postgresql://user:pass@localhost/memstack

Redis:

MEMSTACK_STORAGE=redis
REDIS_URL=redis://localhost:6379

SQLite:

MEMSTACK_STORAGE=sqlite
SQLITE_PATH=./memory.db

LLM providers

| Variable | Purpose | |---|---| | OPENAI_API_KEY | OpenAI LLM (default) | | ANTHROPIC_API_KEY | Anthropic (summarization) | | MEMSTACK_OPENAI_BASE_URL | Custom API endpoint (DeepSeek, etc.) | | MEMSTACK_LLM_MODEL | Model override | | MEMSTACK_EMBED_ON_STORE | Auto-embed on store (default: true) | | MEMSTACK_ACTOR | Default actor ID |

At least one of OPENAI_API_KEY or ANTHROPIC_API_KEY must be set. Anthropic preferred if both are set.

Embeddings (semantic search)

| Variable | Purpose | |---|---| | OPENAI_API_KEY | OpenAI embeddings |

Without embedding config, retrieval falls back to keyword + importance search.

Tools

The MCP server exposes these tools to the agent:

| Tool | Description | |---|---| | memory_process | Store with auto-enrichment (importance, tags) | | memory_store | Store a memory | | memory_retrieve | Retrieve memories by query, strategy, time range | | memory_compile_context | Assemble token-budgeted LLM-ready context | | memory_summarize | Compress old interactions via LLM | | memory_prune | Remove stale/low-importance memories | | memory_purge_actor | Delete all memories for an actor | | memory_merge | Merge multiple memories into one | | memory_stats | Memory diagnostics (counts, types, importance) | | memory_delete | Delete a single memory | | memory_health | Check storage/LLM/embedding connectivity | | memory_dry_run_prune | Preview what would be pruned |

Resources

| URI | Description | |---|---| | memory://{actorId}/context | Compiled LLM context as markdown | | memory://{actorId}/stats | Actor memory stats as JSON |

Prompts

| Prompt | Description | |---|---| | memory_context | Auto-injected memory context for current actor |

Actor persistence

By default, all memories belong to the "default" actor. Set MEMSTACK_ACTOR to identify the agent:

MEMSTACK_ACTOR=my-agent

This keeps memory isolated per agent. The agent can also override the actor with actorId in any tool call.

Publishing

cd packages/mcp
pnpm build && pnpm check && pnpm test
npm publish --access public

After publishing, users install with:

npm install -g @memstack/mcp

License

MIT