cortexgraph
Temporal memory system for AI assistants with human-like forgetting curves. All data stored locally in human-readable formats: JSONL for short-term memory, Markdown (Obsidian-compatible) for long-term. Memories naturally decay unless reinforced. Features knowledge graphs, smart prompting, and MCP server integration for Claude.
claude mcp add --transport stdio prefrontal-systems-cortexgraph python -m cortexgraph \ --env LOG_LEVEL="INFO (default) or DEBUG" \ --env COREFOLDER="path to CortexGraph config/data (optional)"
How to use
CortexGraph is an MCP server that provides a human-like memory system for AI assistants. It stores memories as structured data and applies a temporal decay model so memories fade over time unless reinforced by use, mirroring human forgetting curves. The server exposes MCP endpoints to add, retrieve, update, and query memories, and it leverages a two-layer architecture (short-term STM memory and long-term memory) with a reinforcement mechanism driven by usage frequency and recency. Tools under cortexgraph.tools implement various MCP actions such as adding memories, retrieving relevant memory fragments, updating memory strengths, and exporting memories for external analysis. You can integrate CortexGraph with your AI agent to automatically capture conversational context, reinforce important memories through repeated references, and progressively promote frequently used memories to long-term storage. Start the server and connect your MCP client to the server-name you configured (cortexgraph in the default setup).
How to install
Prerequisites:
- Python 3.10+ installed on your system
- Git installed to clone the repository
- Optional: virtual environment support (venv) for isolating dependencies
Step-by-step installation:
- Clone the repository
git clone https://github.com/prefrontal-systems/cortexgraph.git
cd cortexgraph
- Create and activate a virtual environment (optional but recommended)
python -m venv venv
# On Windows
venv\Scripts\activate.bat
# On macOS/Linux
source venv/bin/activate
- Install dependencies
pip install -r requirements.txt
- Verify installation (optional)
python -m cortexgraph --version
- Run the MCP server
python -m cortexgraph
Notes:
- The server exposes an MCP API; ensure your environment allows network connections on the configured port (default is typically 8000/HTTP or as configured in your app).
- If you need a different entrypoint, you can adjust by running the specific module or script provided by the project.
Additional notes
Tips and common considerations:
- Environment variables: COREFOLDER can point to a directory for config/data; LOG_LEVEL controls verbosity. Adjust as needed for debugging in development vs production.
- Data persistence: CortexGraph stores memories in JSONL/SQLite locally; ensure the configured data directory is writable.
- Tuning: Familiarize yourself with the core decay model parameters (half-life, beta, tau_forget, tau_promote). See docs/scoring_algorithm.md for detailed references.
- Networking: If deploying behind a reverse proxy or in a container, open/forward the port CortexGraph uses and secure access as appropriate.
- Upgrades: The project is under active development; when upgrading, review release notes for changes to MCP endpoints or memory schema.
Related MCP Servers
ai-guide
程序员鱼皮的 AI 资源大全 + Vibe Coding 零基础教程,分享大模型选择指南(DeepSeek / GPT / Gemini / Claude)、最新 AI 资讯、Prompt 提示词大全、AI 知识百科(RAG / MCP / A2A)、AI 编程教程、AI 工具用法(Cursor / Claude Code / OpenClaw / TRAE / Lovable / Agent Skills)、AI 开发框架教程(Spring AI / LangChain)、AI 产品变现指南,帮你快速掌握 AI 技术,走在时代前沿。本项目为开源文档版本,已升级为鱼皮 AI 导航网站
iterm
A Model Context Protocol server that executes commands in the current iTerm session - useful for REPL and CLI assistance
gtm
An MCP server for Google Tag Manager. Connect it to your LLM, authenticate once, and start managing GTM through natural language.
israel-drugs
MCP server from DavidOsherdiagnostica/israel-drugs-mcp-server
subcog
Persistent memory system for AI coding assistants. Captures decisions, learnings, and context from coding sessions. Features hybrid search (semantic + BM25), MCP server integration, SQLite persistence with knowledge graph, and proactive memory surfacing. Written in Rust.
mcp-claude-hackernews
An integration that allows Claude Desktop to interact with Hacker News using the Model Context Protocol (MCP).