data-ai MCP Server
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.
Discovered via smithery and last synced 3mo ago.
Install instructions not detected yet
Check the source repository for the latest setup steps.
Retrieve specific memories
two_component) CORTEXGRAPH_DECAY_MODEL=power_law # Power-law parameters (default model) CORTEXGRAPH_PL_ALPHA=1.1 CORTEXGRAPH_PL_HALFLIFE_DAYS=3.0 # Exponential (if selected) # CORTEXGRAPH_DECAY_LAMBDA=2.673e-6 # 3-day half-life # Two-component (if selected) # CORTEXGRAPH_TC_LAMBDA_FAST=1.603e-5 # ~12h # CORTEXGRAPH_TC_LAMBDA_SLOW=1.147e-6 # ~7d # CORTEXGRAPH_TC_WEIGHT_FAST=0.7 # Common parameters CORTEXGRAPH_DECAY_LAMBDA=2.673e-6 CORTEXGRAPH_DECAY_BETA=0.6 # Thresholds CORTEXGRAPH_FORGET_THRESHOLD=0.05 CORTEXGRAPH_PROMOTE_THRESHOLD=0.65 # Long-term memory (optional) LTM_VAULT_PATH=~/Documents/Obsidian/Vault ``` **Where cortexgraph looks for .env files:** 1. **Primary**: `~/.config/cortexgraph/.env` ← Use this for `uv tool install` / `uvx` 2. **Fallback**: `./.env` (current directory) ← Only works for editable installs ### MCP Configuration **Recommended: Use absolute path (works everywhere)** Add to `~/Library/Application Support/Claude/claude_desktop_config.json`: ```json { "mcpServers": { "cortexgraph": { "command": "/Users/yourusername/.local/bin/cortexgraph" } } } ``` **Find your actual path:** ```bash which cortexgraph # Example output: /Users/yourusername/.local/bin/cortexgraph ``` Use that path in your config. Replace `yourusername` with your actual username. **Why absolute path?** GUI apps like Claude Desktop don't inherit your shell's PATH configuration (`.zshrc`, `.bashrc`). Using the full path ensures it always works. **For development (editable install):** ```json { "mcpServers": { "cortexgraph": { "command": "uv", "args": ["--directory", "/path/to/cortexgraph", "run", "cortexgraph"], "env": {"PYTHONPATH": "/path/to/cortexgraph/src"} } } } ``` Configuration can be loaded from `./.env` in the project directory OR `~/.config/cortexgraph/.env`. #### Troubleshooting: Command Not Found If Claude Desktop shows `spawn cortexgraph ENOENT` errors, the `cortexgraph` command isn't in Claude Desktop's PATH. **macOS/Linux: GUI apps don't inherit shell PATH** GUI applications on macOS and Linux don't see your shell's PATH configuration (`.zshrc`, `.bashrc`, etc.). Claude Desktop only searches: - `/usr/local/bin` - `/opt/homebrew/bin` (macOS) - `/usr/bin` - `/bin` - `/usr/sbin` - `/sbin` If `uv tool install` placed `cortexgraph` in `~/.local/bin/` or another custom location, Claude Desktop can't find it. **Solution: Use absolute path** ```bash # Find where cortexgraph is installed which cortexgraph # Example output: /Users/username/.local/bin/cortexgraph ``` Update your Claude config with the absolute path: ```json { "mcpServers": { "cortexgraph": { "command": "/Users/username/.local/bin/cortexgraph" } } } ``` Replace `/Users/username/.local/bin/cortexgraph` with your actual path from `which cortexgraph`. ### Maintenance Use the maintenance CLI to inspect and compact JSONL storage: ```bash # Show storage stats (active counts, file sizes, compaction hints) cortexgraph-maintenance stats # Compact JSONL (rewrite without tombstones/duplicates) cortexgraph-maintenance compact ``` ### Migrating to UV Tool Install If you're currently using an editable install (`uv pip install -e .`), you can switch to the simpler UV tool install: ```bash # 1. Uninstall editable version uv pip uninstall cortexgraph # 2. Install as UV tool uv tool install git+https://github.com/simplemindedbot/cortexgraph.git # 3. Update Claude Desktop config to just: # {"command": "cortexgraph"} # Remove the --directory, run, and PYTHONPATH settings ``` **Your data is safe!** This only changes how the command is installed. Your memories in `~/.config/cortexgraph/` are untouched. ## CLI Commands The server includes 7 command-line tools: ```bash cortexgraph # Run MCP server cortexgraph-migrate # Migrate from old STM setup cortexgraph-index-ltm # Index Obsidian vault cortexgraph-backup # Git backup operations cortexgraph-vault # Vault markdown operations cortexgraph-search # Unified STM+LTM search cortexgraph-maintenance # JSONL storage stats and compaction ``` ## Visualization Interactive graph visualization using PyVis: ```bash # Install visualization dependencies pip install "cortexgraph[visualization]" # or with uv uv pip install "cortexgraph[visualization]" # Or install dependencies manually pip install pyvis networkx # Generate interactive HTML visualization python scripts/visualize_graph.py # Custom output location python scripts/visualize_graph.py --output ~/Desktop/memory_graph.html # Custom data paths python scripts/visualize_graph.py --memories ~/data/memories.jsonl --relations ~/data/relations.jsonl ``` **Features:** - Interactive network graph with pan/zoom - Node colors by status (active=blue, promoted=green, archived=gray) - Node size based on use count - Edge colors by relation type - Hover tooltips showing full content, tags, and entities - Physics controls for layout adjustment The visualization reads directly from your JSONL files and creates a standalone HTML file you can open in any browser. ## MCP Tools 13 tools for AI assistants to manage memories:
Save new memory with tags, entities (auto-enrichment in v0.6.0+)
Find similar memories
11.4×
Record memory usage for natural spaced repetition
Link memories explicitly
✨ **NEW v0.6.0** - Detect recall intent, suggest search queries
1.0×
Unified search across STM + LTM
Get entire knowledge graph
Search with filters and scoring (includes review candidates)
Merge similar memories (algorithmic)
Reinforce memory (boost strength)
✨ **NEW v0.6.0** - Detect memory-worthy content, suggest entities/strength
Score
Garbage collect low-scoring memories
2.6×
4.0×
Move to long-term storage
decay style decay fill:#ffebee,stroke:#b71c1c,stroke-width:2px style cluster fill:#fff3e0,stroke:#e65100,stroke-width:2px style merge fill:#f3e5f5,stroke:#4a148c,stroke-width:2px style promote fill:#e8f5e9,stroke:#1b5e20,stroke-width:2px style relations fill:#e1f5fe,stroke:#01579b,stroke-width:2px ``` **The Five Agents:**