# CortexGraph MCP server

> Gives AI assistants a local, human-like memory system where memories decay over time and strengthen with repeated use.

- Repository: https://github.com/prefrontal-systems/cortexgraph
- Page: https://hostedmcp.org/servers/prefrontal-systems/cortexgraph
- Transport: —
- Stars: 39
- License: AGPL-3.0

## Environment variables

| Name | Required | Secret | Description |
|---|---|---|---|
| `CORTEXGRAPH_AUTO_REINFORCE` | no | no |  |
| `CORTEXGRAPH_DECAY_BETA` | no | no |  |
| `CORTEXGRAPH_DECAY_LAMBDA` | no | no |  |
| `CORTEXGRAPH_DECAY_MODEL` | no | no |  |
| `CORTEXGRAPH_FORGET_THRESHOLD` | no | no |  |
| `CORTEXGRAPH_PL_ALPHA` | no | no |  |
| `CORTEXGRAPH_PL_HALFLIFE_DAYS` | no | no |  |
| `CORTEXGRAPH_PROMOTE_THRESHOLD` | no | no |  |
| `CORTEXGRAPH_REVIEW_BLEND_RATIO` | no | no |  |
| `CORTEXGRAPH_REVIEW_DANGER_ZONE_MAX` | no | no |  |
| `CORTEXGRAPH_REVIEW_DANGER_ZONE_MIN` | no | no |  |
| `CORTEXGRAPH_STORAGE_PATH` | no | no |  |
| `LTM_VAULT_PATH` | no | no |  |

## Tools (13)

- `save_memory`
- `search_memory`
- `search_unified`
- `touch_memory`
- `observe_memory_usage`
- `analyze_message`
- `analyze_for_recall`
- `promote_memory`
- `cluster_memories`
- `consolidate_memories`
- `read_graph`
- `open_memories`
- `create_relation`

## FAQ

### Where does CortexGraph store its data?

All data is stored locally on your machine in human-readable formats: JSONL or SQLite for short-term memory and Markdown files for long-term memory.

### How does CortexGraph decide when to forget a memory?

Each memory gets a decay score combining recency, use frequency, and importance; memories scoring below the forget threshold are deleted.

### When are memories promoted to long-term storage?

A memory is promoted when its score reaches the promote threshold or it is used at least five times within 14 days.

### What is the default half-life for memory decay?

The balanced default uses a 3-day half-life, which can be tuned along with beta and thresholds.

### Can CortexGraph extract entities automatically?

Yes, it uses spaCy named entity recognition to extract people, technologies, and organizations and auto-calculates memory strength.
