Temporal memory for AI with decay and reinforcement. Two-layer storage (JSONL + Markdown).
Copy the AI prompt to install this server into Claude Code, Cursor, or another agent — or use 1-click editor setup below.
💡 Paste the JSON block into your client's configuration file under mcpServers, then restart the application.
A Model Context Protocol (MCP) server providing human-like memory dynamics for AI assistants. Memories naturally fade over time unless reinforced through use, mimicking the Ebbinghaus forgetting curve.
[!NOTE] About the Name & Version
This project was originally developed as mnemex (published to PyPI up to v0.6.0). In November 2025, it was transferred to Prefrontal Systems and renamed to CortexGraph to better reflect its role within a broader cognitive architecture for AI systems.
Version numbering starts at 0.1.0 for the cortexgraph package to signal a fresh start under the new name, while acknowledging the mature, well-tested codebase (791 tests, 98%+ coverage) inherited from mnemex. The mnemex package remains frozen at v0.6.0 on PyPI.
This versioning approach:
- Signals "new package" to PyPI users discovering cortexgraph
- Gives room to evolve the brand, API, and organizational integration before 1.0
- Maintains continuity: users can migrate from
pip install mnemex→pip install cortexgraph- Reflects that while the code is mature, the cortexgraph identity is just beginning
[!IMPORTANT] 🔬 RESEARCH ARTIFACT - NOT FOR PRODUCTION
This software is a Proof of Concept (PoC) and reference implementation for research purposes. It exists to validate theoretical frameworks in cognitive architecture and AI safety (specifically the STOPPER Protocol and CortexGraph).
It is NOT a commercial product. It is not maintained for general production use, may contain breaking changes, and offers no guarantees of stability or support. Use it to study the concepts, but build your own production implementations.
📖 New to this project? Start with the ELI5 Guide for a simple explanation of what this does and how to use it.
CortexGraph gives AI assistants like Claude a human-like memory system.
When you chat with Claude, it forgets everything between conversations. You tell it "I prefer TypeScript" or "I'm allergic to peanuts," and three days later, you have to repeat yourself. This is frustrating and wastes time.
CortexGraph makes AI assistants remember things naturally, just like human memory:
No flashcards. No explicit review. Just natural conversation.
Most memory systems are dumb:
CortexGraph is smart:
This repository contains research, design, and a complete implementation of a short-term memory system that combines:
CortexGraph follows a modular architecture:
cortexgraph.core: Foundational algorithms (decay, similarity, clustering, consolidation, search validation)cortexgraph.agents: Multi-agent consolidation pipeline and storage utilitiescortexgraph.storage: JSONL and SQLite storage backends with batch operationscortexgraph.tools: MCP tool implementationsAll data stored locally on your machine - no cloud services, no tracking, no data sharing.
Short-term memory:
~/.config/cortexgraph/jsonl/)~/.config/cortexgraph/cortexgraph.db)Long-term memory: Markdown files optimized for Obsidian
Export: Built-in utility to export memories to Markdown for portability.
You own your data. You can read it, edit it, delete it, or version control it - all without any special tools.
The temporal decay scoring function:
$$ \Large \text{score}(t) = (n_{\text{use}})^\beta \cdot e^{-\lambda \cdot \Delta t} \cdot s $$
Where:
Thresholds:
Decay Models:
See detailed parameter reference, model selection, and worked examples in docs/scoring_algorithm.md.
Decision thresholds:
Unlike traditional caching (TTL, LRU), Mnemex scores memories continuously by combining recency (exponential decay), frequency (sub-linear use count), and importance (adjustable strength). See Core Algorithm for the mathematical formula. This creates memory dynamics that closely mimic human cognition.
Patterns for making AI assistants use memory naturally, now enhanced with automatic entity extraction and importance scoring:
Auto-Enrichment (NEW in v0.6.0)
When you save memories, CortexGraph automatically:
Auto-Save
No reviews yet — be the first to share how this listing worked for you.
Showcase your server listing on GitHub or your project documentation. Embed this dynamic SVG badge to highlight official listing status and live engagement.
[](https://allmcps.com/mcp/mnemex)<a href="https://allmcps.com/mcp/mnemex"><img src="https://allmcps.com/api/badge/mnemex?style=directory" alt="Mnemex on AllMCPs" /></a>