SkillAgentSearch skills...

Cogmemai MCP

Persistent cloud memory for Ai coding assistants — encrypted at rest. 28 MCP tools: semantic search, auto-learning, task tracking, correction patterns, knowledge graphs, and session replay. Works with Claude Code, Cursor, Windsurf, Cline, and any MCP client.

Install / Use

/learn @hifriendbot/Cogmemai MCP

README

<p align="center"> <img src="assets/hero.png" alt="CogmemAi — Why Claude Code Forgets Everything (And How to Fix It)" width="800"> </p>

npm version License: MIT Quantum Safe

CogmemAi — Cognitive Memory for Ai Coding Assistants

<p align="center"> <img src="assets/demo.svg" alt="CogmemAi demo — your Ai assistant remembers your project across sessions" width="800"> </p>

Your Ai coding assistant forgets everything between sessions. CogmemAi fixes that.

One command. Your assistant remembers your architecture, patterns, decisions, bugs, and preferences — permanently. Works with Claude Code, Cursor, Windsurf, Cline, Continue, and any MCP-compatible tool. Switch editors, switch models, switch machines — your knowledge stays.

What's New in v3

Quantum-Safe Encryption (v3.7)

CogmemAi is the first quantum-safe Ai memory system. All memories are encrypted at rest with quantum-resistant encryption — both in cloud mode and local mode. Your data is protected against today's threats and tomorrow's quantum computers. Encryption is automatic, zero-config, and enabled by default. No setup required.

Choose Your Storage Mode (v3.6)

CogmemAi now runs three ways — pick the one that fits your workflow:

| | Cloud (default) | Local | Hybrid | |---|---|---|---| | Best for | Full intelligence, team collaboration, cross-device portability | Zero-config start, offline-only environments | Local speed + cloud brains, travel/unreliable networks | | Setup | npx cogmemai-mcp setup (choose Cloud) | npx cogmemai-mcp setup (choose Local) | npx cogmemai-mcp setup (choose Hybrid) | | API key needed | Yes (free) | No | Yes (free) | | Search | Semantic (by meaning) | Keyword (by text match) | Semantic with local fallback | | Intelligence Engine | Full — auto-linking, contradiction detection, memory decay, auto-skills, query synthesis | Basic CRUD + keyword search | Full — with offline resilience | | Team collaboration | Yes | No | Yes | | Cross-device sync | Automatic | No — data stays on your machine | Automatic with local cache | | Offline support | Requires internet | Full offline | Falls back to local when offline | | Encryption | Quantum-safe (server) | Quantum-safe (local) | Quantum-safe (both) |

Cloud mode is the recommended experience. It gives you the full Intelligence Engine — semantic search that finds memories by meaning, auto-linking knowledge graph, contradiction detection, self-improving recall, auto-skills, query synthesis, and team collaboration. Everything that makes CogmemAi more than just a database.

Local mode is the zero-friction entry point. No API key, no account, no internet required. Great for trying CogmemAi in 10 seconds or working in air-gapped environments. You get basic memory storage with keyword search — and when you're ready for more, upgrading to cloud takes one command.

Hybrid mode is for developers who travel or work on unreliable networks. Saves to both local and cloud simultaneously. Reads from cloud when available, falls back to local when offline. Unsynced memories automatically push to cloud when connectivity returns.

Intelligence Engine + Auto-Skills (v3.5)

CogmemAi now gets smarter every time you use it. The Intelligence Engine is a self-improving memory system that learns what matters, connects related knowledge automatically, and synthesizes answers from your entire memory. Auto-Skills takes it further — CogmemAi doesn't just remember, it learns how to behave.

Auto-Skills (Closed-Loop Learning)

  • Behavioral skills — CogmemAi automatically synthesizes your corrections, preferences, and patterns into behavioral directives that tell your Ai assistant HOW to work, not just what to know
  • Closed learning loop — correct your assistant once, and CogmemAi detects the pattern. After enough evidence accumulates, it generates a skill that prevents the mistake from ever happening again
  • Confidence tracking — each skill has a confidence score that rises when it works and drops when it doesn't. Low-confidence skills are automatically retired
  • Self-evaluation — skills periodically review themselves against new evidence and adapt, strengthen, or retire as your practices evolve

Intelligence Engine — 85% Accuracy on LoCoMo Benchmark

CogmemAi scores 85% accuracy on the LoCoMo conversational memory benchmark, with 95% retrieval hit rate. That's higher than most competing memory systems and validates that CogmemAi finds the right memories when you need them.

  • Cross-encoder reranking — every recall runs a second-pass reranker that re-scores candidates for precision. The most relevant memory always surfaces first, not just the closest vector match
  • Self-improving recall — memories that consistently help you rank higher over time; memories you never use fade naturally. Your recall quality improves automatically with every session
  • Auto-linking knowledge graph — related memories are automatically connected when you save them. Your knowledge builds into a web of relationships, not a flat list
  • Contradiction detection — when recalled memories conflict with each other, CogmemAi flags the contradiction so you catch stale or outdated information before it causes problems
  • Context-aware ranking — tell CogmemAi what you're doing (debugging, planning, reviewing) and it boosts the right types of memories. Debugging? Bug reports and patterns surface first. Planning? Architecture decisions lead
  • Query synthesis — ask a question and get one coherent answer synthesized from all your relevant memories, not just a list of matches. Like asking a teammate who's read everything
  • Cross-project intelligence — patterns that appear across 3+ projects are automatically promoted to global scope. Your best practices follow you everywhere without manual effort
  • Proactive insights — at session start, CogmemAi tells you what you should know before you ask. Stale critical memories, duplicate subjects that need merging, patterns ready for promotion

Also in v3

  • Memory health score — 0-100 score with actionable factors
  • Session replay — pick up exactly where you left off with automatic session summaries
  • Self-tuning memory — importance adjusts based on real usage; stale memories auto-archive
  • Auto-ingest README — learn from your README on new projects instantly
  • Smart recall — relevant memories surface automatically as you switch topics
  • Auto-learning — CogmemAi learns from your sessions automatically
  • Task tracking — persistent tasks with status and priority
  • Correction learning — teach your assistant to avoid repeated mistakes
  • Session reminders — nudges that surface at the start of your next session
  • Mandatory rules — define absolute requirements ("NEVER do X", "ALWAYS do Y") that surface in every session, bypassing all scoring and decay
  • 33 tools — the most complete memory toolkit for Ai coding assistants

Quick Start

npx cogmemai-mcp setup

The setup wizard walks you through three choices: Cloud (recommended — full Ai intelligence), Local (no account needed), or Hybrid (both). Pick your mode, enter your API key if needed, and you're ready in under 60 seconds.

Don't have an API key yet? Get one free at hifriendbot.com/developer. Or choose Local mode to start immediately with no account.

The Problem

Every time you start a new session, you lose context. You re-explain your tech stack, your architecture decisions, your coding preferences. Built-in memory in tools like Claude Code is a flat file with no search, no structure, and no intelligence.

CogmemAi gives your Ai assistant a real memory system:

  • Semantic search — finds relevant memories by meaning, not keywords
  • Ai-powered extraction — automatically identifies facts worth remembering from your conversations
  • Smart deduplication — detects duplicate and conflicting memories automatically
  • Privacy controls — auto-detects API keys, tokens, and secrets before storing
  • Document ingestion — feed in READMEs and docs to instantly build project context
  • Project scoping — memories tied to specific repos, plus global preferences that follow you everywhere
  • Smart context — intelligently ranked for maximum relevance to your current work
  • Compaction recovery — survives Claude Code context compaction automatically
  • Token-efficient — compact context loading that won't bloat your conversation
  • Zero setup — no databases, no Docker, no Python, no vector stores

Why Cloud Is the Recommended Mode

CogmemAi offers three storage modes, but cloud is where the magic happens. The Intelligence Engine — semantic search, auto-linking knowledge graph, contradiction detection, self-improving recall, auto-skills, and query synthesis — runs server-side. In cloud mode, your MCP server is a thin HTTP client with zero local databases, zero RAM issues, zero maintenance. All memories are encrypted at rest, so your data is just as secure as local storage — with cross-device portability and team features on top.

Your memory follows you everywhere. Memories created in Claude Code are instantly available in Cursor, Windsurf, Cline, and any MCP-compatible tool. Switch between Opus, Sonnet, Haiku, or any model your editor supports — your memories persist regardless. New laptop? New OS? Log in and your full project knowledge is waiting. A local SQLite file dies with your machine. Cloud memory is permanent.

**The privacy argume

View on GitHub
GitHub Stars3
CategoryDevelopment
Updated2d ago
Forks3

Languages

TypeScript

Security Score

90/100

Audited on Mar 21, 2026

No findings