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

kratos-mcp

v4.1.1

Published

Ultra-powerful memory system for AI coding tools — CLI-first with MCP compatibility, auto-capture hooks, AI compression, and semantic search

Readme

  ██╗  ██╗██████╗  █████╗ ████████╗ ██████╗ ███████╗
  ██║ ██╔╝██╔══██╗██╔══██╗╚══██╔══╝██╔═══██╗██╔════╝
  █████╔╝ ██████╔╝███████║   ██║   ██║   ██║███████╗
  ██╔═██╗ ██╔══██╗██╔══██║   ██║   ██║   ██║╚════██║
  ██║  ██╗██║  ██║██║  ██║   ██║   ╚██████╔╝███████║
  ╚═╝  ╚═╝╚═╝  ╚═╝╚═╝  ╚═╝   ╚═╝    ╚═════╝ ╚══════╝

The God of War remembers everything.

npm version License: MIT TypeScript

Persistent memory for AI coding agents. CLI-first. Auto-capture. Encrypted. Zero network calls.

Installation · Quick Start · Commands · Plugin · Security


What is Kratos?

AI coding tools forget everything between sessions. You explain your architecture, your patterns, your decisions — and tomorrow, you explain it all again.

Kratos gives your AI agent permanent memory. It auto-captures what happens during coding sessions and recalls relevant context when you start a new one. No manual work. No setup. Just install and code.

Session 1: You build auth with JWT → Kratos remembers
Session 2: "How does auth work?" → Kratos recalls instantly

Installation

npm install -g kratos-mcp

That's it. Kratos auto-detects your project from .git, package.json, Cargo.toml, go.mod, or pyproject.toml.

Quick Start

# Save a memory
kratos save "Auth uses JWT with RS256, refresh tokens in httpOnly cookies" --tags auth,jwt --importance 5

# Search memories
kratos search "authentication"

# Ask in natural language
kratos ask "how does the auth system work?"

# See what Kratos knows
kratos status

Output:

  KRATOS — Memory System
  ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━

  ACTIVE PROJECT
  ● my-app

  MEMORY STATS
    Total:       47
    Last saved:  3/15/2026, 2:16:21 PM
    Importance:
      5 ████████████████████ 12
      4 █████████████░░░░░░░ 8
      3 ████████░░░░░░░░░░░░ 5
      2 ██████░░░░░░░░░░░░░░ 4
      1 ░░░░░░░░░░░░░░░░░░░░ 0

  TOP TAGS
    #auth(5)  #database(4)  #api(3)  #frontend(2)

  FEATURES
    ● FTS5 Full-Text Search
    ● AES-256-GCM Encryption
    ● PII/Secret Detection
    ● Smart Compression
    ● Auto-Capture Hooks

Commands

| Command | Description | |---------|-------------| | kratos save <text> | Save a memory (--tags, --importance 1-5, --paths, --compress) | | kratos search <query> | Full-text search (--limit, --tags, --debug) | | kratos ask <question> | Natural language query | | kratos recent | Recent memories (--limit) | | kratos get <id> | Full memory details | | kratos forget <id> | Delete a memory | | kratos status | System dashboard | | kratos switch <path> | Switch project | | kratos scan <text> | Detect PII/secrets (--redact) | | kratos migrate | Verify existing data for CLI use | | kratos hooks install | Install auto-capture hooks for Claude Code | | kratos hooks uninstall | Remove hooks |

Plugin Mode

Kratos works as a Claude Code plugin for fully automatic memory capture. No manual commands needed — everything happens in the background.

Install as Plugin

claude --plugin-dir ./plugin

What Happens Automatically

| Event | Action | |-------|--------| | Session starts | Loads recent memories into Claude's context | | You edit a file | Captures what changed, saves as memory | | You run a command | Captures the command and result | | Session ends | Claude summarizes the session (using the host LLM — free, no API key) and saves it |

The plugin uses Claude Code's built-in type: "prompt" hook — Claude itself compresses your session memories. No external AI, no Ollama, no API keys, no network calls.

Plugin Structure

plugin/
  .claude-plugin/plugin.json      # Manifest
  hooks/hooks.json                # Lifecycle hooks (PostToolUse, Stop, etc.)
  skills/kratos-memory/SKILL.md   # Teaches Claude how to use kratos
  scripts/                        # Hook handlers
  .mcp.json                       # MCP server (backward compat)

Security

Kratos was built with security as a core feature, not an afterthought.

| Feature | Detail | |---------|--------| | AES-256-GCM Encryption | Memories encrypted at rest with per-project keys | | PII Detection | Auto-detects SSN, credit cards, emails, phone numbers, IPs, DOB | | Secret Detection | Catches API keys, AWS keys, GitHub tokens, JWTs, private keys, passwords | | Project Isolation | Each project has its own SQLite database — zero cross-contamination | | Zero Network Calls | Nothing leaves your machine. Ever. No telemetry, no analytics, no cloud. | | Key Rotation | Rotate encryption keys without data loss |

# Scan text before saving
kratos scan "My API key is sk-1234abcd..." --redact

# Output:
# ✗ Secrets detected!
#   ● API Key (secret, confidence: 0.9)
# Redacted: My API key is sk-[REDACTED_SECRET]...

How It Works

You code with Claude
        ↓
  PostToolUse hook fires (auto)
        ↓
  Observation captured + compressed
        ↓
  Saved to per-project SQLite + FTS5
        ↓
  Next session starts
        ↓
  SessionStart hook loads recent context
        ↓
  Claude knows what happened last time

Performance:

| Metric | Value | |--------|-------| | Memory retrieval | < 10ms | | Project switch | < 100ms | | Storage per project | ~2MB | | Search engine | SQLite FTS5 (porter tokenizer) |

Data Storage

~/.kratos/
├── projects/
│   ├── proj_abc123/
│   │   ├── databases/
│   │   │   └── memories.db        # SQLite + FTS5
│   │   ├── sessions/
│   │   │   └── current.json       # Active session buffer
│   │   └── project.json           # Project metadata
│   └── proj_def456/
│       └── ...
├── .keys/
│   └── proj_abc123.key            # AES-256 encryption key
└── projects.json                  # Project registry

Each project is completely isolated. Different database, different encryption key, different everything.

MCP Support (Deprecated)

Note: MCP support is deprecated and will be removed in a future version. The CLI and plugin are the recommended interfaces going forward. MCP consumed too much context per tool call.

If you still need MCP mode:

kratos mcp

Or in your MCP client config:

{
  "mcpServers": {
    "kratos": {
      "command": "npx",
      "args": ["kratos-mcp"]
    }
  }
}

Existing MCP users: run kratos migrate to verify your data works with the CLI. No data copy needed — same database format.

Contributing

git clone https://github.com/ceorkm/kratos-mcp.git
cd kratos-mcp
npm install
npm run build
npm run cli   # Run CLI in dev mode

License

MIT


Built for developers who are tired of repeating themselves.

Report Bug · Request Feature