CogniLayer: An MCP Server for Persistent Memory in Claude Code

✍️ OpenClawRadar📅 Published: March 1, 2026🔗 Source
CogniLayer: An MCP Server for Persistent Memory in Claude Code
Ad

CogniLayer is an MCP server built specifically for Claude Code that provides persistent memory across sessions. The tool addresses the problem where Claude Code forgets everything when starting a new session—including project architecture, past decisions, and debugging insights—forcing users to re-explain context repeatedly.

Technical Implementation

The system uses a SQLite database with FTS5 full-text search and vector embeddings (fastembed + sqlite-vec) to store knowledge locally. It implements hybrid search that combines keyword matching with semantic vector similarity.

Key Features

  • Stores 14 types of facts: decisions, patterns, gotchas, error fixes, API contracts, and more
  • Staleness detection: warns when remembered facts reference changed files
  • Session bridges: automatically passes context between sessions
  • Heat decay system: facts age over time (hot/warm/cold) with frequently accessed information staying relevant
  • Identity Card system: prevents deploying to the wrong server
  • 3 hooks: SessionStart, SessionEnd, PostToolUse
  • 10 MCP tools and 7 slash commands
Ad

Setup and Usage

To install and use CogniLayer:

git clone https://github.com/LakyFx/CogniLayer.git
python install.py

After starting Claude Code in any project, run the /onboard command. The tool runs entirely locally with SQLite and works on Windows, macOS, and Linux.

The project was built using Claude Code sessions, with Claude helping design the database schema, write the MCP server, build the hook system, implement the hybrid search ranker, and iterate on the embedding pipeline. The tool is 100% free, open source under GPL v3, with UI strings currently in Czech but functional with any language.

📖 Read the full source: r/ClaudeAI

Ad

👀 See Also