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 🙏

© 2025 – Pkg Stats / Ryan Hefner

@aeriondyseti/mcp-memory

v0.2.0

Published

A zero-configuration RAG memory server for MCP clients

Readme

MCP Memory Server

Replace static markdown context files with intelligent, semantically-searchable memories that understand what you're working on.

A production-ready MCP (Model Context Protocol) server that provides semantic memory storage for AI assistants. Uses local embeddings and vector search to automatically retrieve relevant context without cloud dependencies.

Perfect for: Software teams maintaining architectural knowledge, developers juggling multiple projects, and anyone building with AI assistants like Claude Code.

License: MIT TypeScript Bun MCP Compatible


✨ Features

🔒 Local-First & Private

  • All embeddings generated locally (no cloud APIs)
  • Data stored in local sqlite-vec databases
  • Complete privacy and control over your memories

🎯 Intelligent Semantic Search

  • Vector similarity with multi-factor scoring
  • Considers relevance, recency, priority, and usage frequency
  • Context-aware retrieval based on conversation flow

📊 Smart Memory Storage

  • Stores memories in ~/.local/share/mcp-memory/memories.db
  • Fast SQLite-based storage with vector search capabilities
  • Memories persist across sessions and projects

High Performance

  • Sub-100ms search latency for 1000+ memories
  • Efficient storage (<10MB per 1000 memories)
  • CPU-optimized local embeddings (no GPU required)

🔌 MCP Native Integration

  • Works seamlessly with Claude Code
  • Session hooks for automatic context injection
  • Standard MCP protocol (compatible with future clients)

🛠️ Developer-Friendly

  • Zero-configuration setup
  • Built with Bun for maximum performance
  • Simple MCP tools for storing and searching
  • TypeScript for type safety

🚀 Quick Start

Prerequisites

  • Bun 1.0+
  • Claude Code or another MCP-compatible client

Note: This server uses Bun-specific APIs (bun:sqlite) and requires Bun to run.

Installation

# Clone the repository
git clone https://github.com/AerionDyseti/mcp-memory-server.git
cd mcp-memory-server

# Install dependencies
bun install

Configure Claude Code

Add to your ~/.claude/config.json:

{
  "mcpServers": {
    "memory": {
      "command": "bun",
      "args": ["run", "/absolute/path/to/mcp-memory-server/src/index.ts"]
    }
  }
}

Replace /absolute/path/to/ with your actual installation path.

Start Using It

That's it! Restart Claude Code and you'll have access to memory tools:

  • store_memory - Save information for later recall
  • search_memories - Find relevant memories semantically
  • get_memory - Retrieve a specific memory by ID
  • delete_memory - Remove a memory

📖 Usage

Storing Memories

Ask Claude Code to remember things for you:

You: "Remember that we use Drizzle ORM for database access"
Claude: [calls store_memory tool]

Or Claude Code can store memories directly:

{
  "content": "Use Drizzle ORM for type-safe database access",
  "metadata": {
    "tags": ["architecture", "database"],
    "category": "tooling"
  }
}

Searching Memories

Claude Code automatically searches memories when relevant, or you can ask:

You: "What did we decide about the database?"
Claude: [calls search_memories with query about database decisions]

Search parameters:

{
  "query": "authentication strategy",
  "limit": 10
}

Managing Memories

Retrieve a specific memory:

{
  "id": "memory-id-here"
}

Delete a memory:

{
  "id": "memory-id-here"
}

🏗️ Architecture

mcp-memory-server/
├── src/
│   ├── index.ts            # Entry point
│   ├── config/             # Configuration management
│   ├── db/                 # Database layer (Drizzle ORM + sqlite-vec)
│   ├── services/
│   │   ├── embeddings.service.ts  # Embeddings via @xenova/transformers
│   │   └── memory.service.ts      # Core memory operations
│   └── mcp/
│       ├── server.ts       # MCP server setup
│       ├── tools.ts        # MCP tool definitions
│       └── handlers.ts     # Tool request handlers
├── tests/
│   ├── memory.test.ts
│   └── embeddings.test.ts
├── bin/
│   └── mcp-memory.js       # Executable entry point
└── package.json

Technology Stack

  • MCP Framework: @modelcontextprotocol/sdk (official SDK)
  • Vector Database: sqlite-vec (fast, local, SQLite-based)
  • ORM: Drizzle ORM with @aeriondyseti/drizzle-sqlite-vec
  • Embeddings: @xenova/transformers (Xenova/all-MiniLM-L6-v2, 384 dimensions)
  • Language: TypeScript 5.0+
  • Runtime: Bun 1.0+ (required for bun:sqlite)
  • Testing: Bun test

🎨 How It Works

1. Memory Storage

Claude Code calls store_memory tool
         ↓
Content → @xenova/transformers → 384d vector
         ↓
Store in sqlite-vec with metadata
         ↓
~/.local/share/mcp-memory/memories.db

2. Memory Retrieval

Claude Code calls search_memories
         ↓
Query → @xenova/transformers → 384d vector
         ↓
KNN search in sqlite-vec
         ↓
Vector similarity scoring
         ↓
Return top N relevant memories

🔧 Configuration

The server uses environment variables for configuration:

  • MCP_MEMORY_DB_PATH - Custom database path (default: ~/.local/share/mcp-memory/memories.db)
  • MCP_MEMORY_MODEL - Embedding model to use (default: Xenova/all-MiniLM-L6-v2)

Example:

export MCP_MEMORY_DB_PATH="/path/to/custom/memories.db"
export MCP_MEMORY_MODEL="Xenova/all-MiniLM-L6-v2"

Or in your Claude Code config:

{
  "mcpServers": {
    "memory": {
      "command": "mcp-memory",
      "env": {
        "MCP_MEMORY_DB_PATH": "/custom/path/memories.db"
      }
    }
  }
}

🧪 Development

Running Tests

# Run all tests
bun test

# Run with coverage
bun test --coverage

# Type checking
bun run typecheck

Development Mode

# Watch mode - auto-restart on file changes
bun run dev

# Run directly without building
bun run src/index.ts

Building

# Build for production
bun run build

# Output will be in dist/

🗺️ Roadmap

✅ Phase 1: Foundation (Current)

  • ✅ Core database with sqlite-vec
  • ✅ Embedding generation with @xenova/transformers
  • ✅ Basic MCP tools (store, search, get, delete)
  • ✅ TypeScript implementation with Drizzle ORM

🚧 Phase 2: Enhanced Search & Scoring

  • Multi-factor scoring algorithm (similarity, recency, priority, usage frequency)
  • Configurable scoring weights
  • Priority levels for memories
  • Usage tracking and frequency-based ranking
  • Metadata filtering and advanced tagging

📋 Phase 3: Dual-Level Memory System

  • Project-specific memories (.memory/db in repo)
  • Global memories (~/.local/share/mcp-memory/)
  • Automatic precedence handling (project overrides global)
  • Project detection and context switching

🎯 Phase 4: Smart Automation

  • Auto-detect architectural decisions
  • Capture bug fixes and solutions automatically
  • Generate session-end summaries
  • Natural language trigger detection (85%+ accuracy)
  • Continuous conversation monitoring

🔮 Phase 5: Advanced Features

  • Memory deduplication with similarity threshold
  • Batch operations (import/export)
  • Markdown import/export
  • Memory clustering and visualization
  • Cross-project insights
  • Multi-modal memories (images, diagrams)
  • Session hooks for automatic context injection
  • Multi-CLI support (Cursor, Windsurf, etc.)
  • Smart priority suggestions

🤝 Contributing

Contributions are welcome! This project is in active development.

Areas We'd Love Help With:

  • Testing and bug reports
  • Documentation improvements
  • Performance optimizations
  • New feature ideas

See CONTRIBUTING.md for guidelines (coming soon).


📄 License

MIT License - see LICENSE for details.


🙏 Acknowledgments


🔗 Related Projects


💬 Support


⚡ Quick Examples

Example 1: Storing a Decision

You: "Remember that we decided to use Drizzle ORM for type-safe database access"
Claude: I'll store that for you.
  [Calls store_memory tool with content and metadata]
  ✓ Memory stored successfully

Example 2: Searching Memories

You: "What did we decide about database tooling?"
Claude: Let me search for that...
  [Calls search_memories with query about database]
  Found: "Use Drizzle ORM for type-safe database access"

Based on our previous decision, we're using Drizzle ORM...

Example 3: Managing Memories

You: "Show me what you remember about authentication"
Claude: [Searches for authentication-related memories]
  Found 3 memories:
  1. "Use JWT tokens for API authentication"
  2. "Store refresh tokens in httpOnly cookies"
  3. "Implement rate limiting on auth endpoints"

⬆ Back to Top

Made with ❤️ for developers who value context continuity