CK

ceorkm/kratos-mcp

Developer tools
37ย stars 7 forks ํ’ˆ์งˆ 73 ํŠธ๋ Œ๋“œ 27MIT

๐Ÿ›๏ธ 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.

๊ฐœ์š”

No MCP overhead. No vendor lock-in. Just memory that works. Your existing memories work instantly. Same ~/.kratos/ storage, same SQLite format. After building 30+ production apps with AI, we discovered a critical problem: . You explain your architecture, your patterns, your decisionsโ€”and tomorrow, you explain it all again. Kratos MCP solves this with an that gives AI perfect recall of your projectโ€”with minimal context overhead. Each project gets its own SQLite database. No cross-contamination. Ever. Auto-detects projects via git, package.json, or directory structure. Just install and code. Just 12 essential tools. 64% smaller context footprint than competitors. Works with Claude, Cursor, Windsurf, Continueโ€”any MCP-compatible tool.

README



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

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

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

AI Tool โ”€โ”€โ–บ Kratos MCP โ”€โ”€โ–บ Project Detection โ”€โ”€โ–บ SQLite + FTS5 โ”€โ”€โ–บ Perfect Context
  • 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

Data Storage

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

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
});

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

Contributing

git clone https://github.com/ceorkm/kratos-mcp.git
npm install
npm run build
npm run dev

License

MIT


View this README on GitHub

์„ค์น˜

npx --yes kratos-mcp@latest

์„ค์ •

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