Skip to content

๐Ÿ›๏ธ Memory System for AI Coding Tools - Never explain your codebase again. MCP server with perfect project isolation, 95.8% context accuracy, and the Four Pillars Framework.

License

Notifications You must be signed in to change notification settings

ceorkm/kratos-mcp

Repository files navigation

๐Ÿ›๏ธ Kratos MCP

Ultra-Lean Memory System for AI Coding Tools

npm version License: MIT MCP Compatible TypeScript

Never explain your codebase again. Let AI remember everything.

๐ŸŒ kratos-mcp.com โ€ข Installation โ€ข Quick Start โ€ข Features โ€ข Tools


๐ŸŽฏ Why Kratos?

After building 30+ production apps with AI, we discovered a critical problem: AI tools forget everything between sessions. You explain your architecture, your patterns, your decisionsโ€”and tomorrow, you explain it all again.

Kratos MCP solves this with an ultra-lean memory system that gives AI perfect recall of your projectโ€”with minimal context overhead.

โœจ Features

๐Ÿ”’ 100% Project Isolation

Each project gets its own SQLite database. No cross-contamination. Ever.

โšก Zero Configuration

Auto-detects projects via git, package.json, or directory structure. Just install and code.

๐Ÿชถ Ultra-Lean Architecture

Just 12 essential tools. 64% smaller context footprint than competitors.

๐ŸŒ Universal Protocol

Works with Claude, Cursor, Windsurf, Continueโ€”any MCP-compatible tool.

๐Ÿš€ Installation

# Install globally
npm install -g kratos-mcp

# Or run directly with npx (no installation required)
npx kratos-mcp

# Or install as a dependency
npm install kratos-mcp

๐ŸŽฌ Quick Start

1๏ธโƒฃ Configure Your AI Tool

Claude Desktop

Add to your Claude Desktop config file:

  • macOS: ~/Library/Application Support/Claude/claude_desktop_config.json
  • Windows: %APPDATA%\Claude\claude_desktop_config.json
  • Linux: ~/.config/claude/claude_desktop_config.json
{
  "mcpServers": {
    "kratos": {
      "command": "npx",
      "args": ["--yes", "kratos-mcp@latest"]
    }
  }
}

Or if you have it installed globally:

{
  "mcpServers": {
    "kratos": {
      "command": "kratos-mcp",
      "args": []
    }
  }
}
Claude Code (Anthropic's VSCode Extension)

Run this command in your terminal:

claude mcp add kratos -- npx --yes kratos-mcp@latest

Or for global installation:

# First install globally
npm install -g kratos-mcp@latest

# Then add to Claude Code
claude mcp add kratos -- kratos-mcp

See Claude Code MCP docs for more info.

Cursor

Add to .cursor/mcp_config.json in your project root:

{
  "mcpServers": {
    "kratos": {
      "command": "npx",
      "args": ["--yes", "kratos-mcp@latest"]
    }
  }
}
Other MCP Tools

Kratos works with any tool supporting the Model Context Protocol. The general format is:

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

Compatible with: Windsurf, Cline, BoltAI, Augment Code, Roo Code, Zencoder, Amazon Q, Qodo Gen, JetBrains AI, Warp, Opencode, Continue.dev, Zed, and more!

Check your tool's documentation for specific MCP server configuration location.

2๏ธโƒฃ Start Using Kratos

// Your AI now remembers:
// โœ“ Your authentication patterns
// โœ“ Your API structure
// โœ“ Your component architecture
// โœ“ Your coding standards
// โœ“ Every decision you've made

๐Ÿ› ๏ธ Available Tools

Kratos provides 12 ultra-lean tools optimized for minimal context consumption:

๐Ÿ’พ Memory Management (7 tools)

Tool Description
memory_save Store important project knowledge with tags, paths, and importance levels
memory_search Smart semantic search with debug mode and path matching
memory_ask Natural language queries about your memories
memory_get_recent Get recently created memories with filtering
memory_get Retrieve a specific memory by ID
memory_get_multiple Bulk retrieve multiple memories
memory_forget Delete a memory by ID

๐Ÿ”’ Security (1 tool)

Tool Description
security_scan Scan text for PII and secrets before saving

๐Ÿ“ Project Management (3 tools)

Tool Description
project_switch Switch between different projects
project_current Get current active project info
change_storage_path Dynamically change storage location with automatic data migration

โš™๏ธ System (1 tool)

Tool Description
system_status Get system status and memory statistics

๐Ÿ“Š How It Works

graph LR
    A[Your Code] --> B[Kratos MCP]
    B --> C{Project Detection}
    C --> D[SQLite Database]
    D --> E[Memory Storage]
    E --> F[AI Tool]
    F --> G[Perfect Context]
Loading

๐Ÿ”ฌ Under the Hood

  • SQLite + FTS5: Lightning-fast full-text search
  • Smart Scoring: Path matching + recency + importance
  • Auto-detection: Git, package.json, or directory-based
  • Secure: All data stays local, no external calls
  • Lean: Only 4 core components, minimal memory footprint

๐Ÿ“ˆ Performance

Metric Value
Context Overhead 64% smaller than v3
Memory Retrieval < 10ms
Project Switch < 100ms
Storage Overhead ~2MB per project

๐Ÿ—‚๏ธ Memory Structure

~/.kratos/                       # Default storage location
โ”œโ”€โ”€ projects/
โ”‚   โ”œโ”€โ”€ project-id-1/
โ”‚   โ”‚   โ””โ”€โ”€ memories.db          # SQLite database with FTS5
โ”‚   โ””โ”€โ”€ project-id-2/
โ”‚       โ””โ”€โ”€ memories.db
โ””โ”€โ”€ global/
    โ””โ”€โ”€ global.db                # Shared knowledge (optional)

New in v1.6.1: Use change_storage_path to move data to custom locations like /opt/kratos or .kratos for per-project storage.

๐Ÿ’ก Example Usage

// Save a memory
await memory_save({
  summary: "JWT auth implementation",
  text: "We use httpOnly cookies with refresh tokens...",
  tags: ["auth", "security"],
  paths: ["src/middleware/auth.ts"],
  importance: 5
});

// Search memories
await memory_search({
  q: "authentication",
  k: 5,
  debug: true  // Get search insights
});

// Ask natural language questions
await memory_ask({
  question: "How does our auth system work?",
  limit: 10
});

// Change storage location
await change_storage_path({
  newPath: "/opt/kratos",
  migrate: true,
  backup: true
});

๐ŸŽฎ Live Demo

// User: "Explain the auth system"
//
// Kratos automatically retrieves:
// โœ“ JWT implementation from 2 weeks ago
// โœ“ Middleware configuration from last month
// โœ“ User model structure from initial setup
//
// AI Response: "Your auth uses JWT with refresh tokens
// stored in httpOnly cookies. The middleware validates
// tokens on protected routes at /api/middleware/auth.ts:42..."

๐Ÿค Contributing

We welcome contributions! See CONTRIBUTING.md for guidelines.

# Clone the repo
git clone https://github.com/ceorkm/kratos-mcp.git

# Install dependencies
npm install

# Build
npm run build

# Run in development
npm run dev

๐Ÿ“„ License

MIT ยฉ 2025 Kratos MCP Contributors

๐Ÿ™ Acknowledgments

Built on the Model Context Protocol by Anthropic.

Inspired by real-world experience building production apps with AI.


Built for developers who value their time.

Report Bug โ€ข Request Feature โ€ข Documentation

About

๐Ÿ›๏ธ Memory System for AI Coding Tools - Never explain your codebase again. MCP server with perfect project isolation, 95.8% context accuracy, and the Four Pillars Framework.

Topics

Resources

License

Stars

Watchers

Forks

Packages

No packages published

Contributors 2

  •  
  •