# neurodivergent-memory

A local MCP server that keeps an agent's notes as a knowledge graph split into five districts, with BM25 ranking. Useful when context keeps vanishing between sessions.

- MCP server · `type=mcp` · Claude Code, Codex, Cursor, GitHub Copilot, Windsurf (Devin Desktop), Cline, Zed, Gemini CLI · ★ 23
- Author: jmeyer1980
- License: MIT · policy=link-only · description only; the file stays with the author
- Source: https://github.com/jmeyer1980/neurodivergent-memory
- Updated: 2026-10-16
- HTML: https://affpapa.org/en/nevibecode/mcp/neurodivergent-memory

## What it does

The server is written in TypeScript and speaks over stdio. Two layers sit inside: a memory graph with bidirectional edges and a BM25 index that ranks search hits. Everything persists to a local JSON snapshot, so memory survives a restart and no cloud model is involved.

Memories live in five districts: `logical_analysis`, `emotional_processing`, `practical_execution`, `vigilant_monitoring`, `creative_synthesis`. A node carries tags, emotional valence and intensity, a project id and an epistemic status. The tools cover the usual loop: `store_memory`, `retrieve_memory`, `update_memory`, `delete_memory`, `connect_memories`. For lookup there is `search_memories` with filters and a recency bias, graph walking via `traverse_from`, similarity via `related_to`, and `memory_stats` for totals.

Node.js 24 is required. The quick start in the README sets Node up through Chocolatey on Windows or nvm on Linux and macOS, then runs `npx neurodivergent-memory@latest init-agent-kit`. The snapshot and WAL are plain files on disk, and `storage_diagnostics` reports which path is in use. Point the snapshot at a directory the process cannot write to and nothing is kept between sessions.

Some tools mirror prompts for clients that call tools but skip prompts: `prepare_memory_city_context`, `prepare_synthesis_context`, `prepare_packetized_synthesis_context`.

## Requirements
- Needs: Node.js (commands run via npx)

## Install

### Claude Code (native platform)

**Platform CLI**
```bash
claude mcp add neurodivergent-memory -- npx -y neurodivergent-memory
```

### Codex

**Platform CLI**
```bash
codex mcp add neurodivergent-memory -- npx -y neurodivergent-memory
```

### Cursor

**Config file**
File `.cursor/mcp.json`:
```json
{
    "mcpServers": {
        "neurodivergent-memory": {
            "command": "npx",
            "args": [
                "-y",
                "neurodivergent-memory"
            ]
        }
    }
}
```

### GitHub Copilot

**Config file**
File `.vscode/mcp.json`:
```json
{
    "servers": {
        "neurodivergent-memory": {
            "type": "stdio",
            "command": "npx",
            "args": [
                "-y",
                "neurodivergent-memory"
            ]
        }
    }
}
```

### Gemini CLI

**Platform CLI**
```bash
gemini mcp add neurodivergent-memory npx -y neurodivergent-memory
```

## When to use it
- carry agent notes across sessions
- find a memory by meaning with BM25
- link two notes with a bidirectional edge
- sort notes into cognitive districts
- count memories, orphans and per-project totals

## Example prompts
- Store the caching decision in memory and tag it `redis`
- Search memory for everything about the DB migration and show the connected nodes
- Run a synthesis over the notes of project `billing` from this week

## Similar
- [REA](https://affpapa.org/en/nevibecode/mcp/rea.md) — MCP server · ★ 386989
- [GitHub](https://affpapa.org/en/nevibecode/mcp/github.md) — MCP server · ★ 33918
- [Netdata](https://affpapa.org/en/nevibecode/mcp/netdata.md) — MCP server · ★ 81115
- [browser-use](https://affpapa.org/en/nevibecode/mcp/browser-use.md) — MCP server · ★ 119160
- [Codebase Memory](https://affpapa.org/en/nevibecode/mcp/codebase-memory.md) — MCP server · ★ 47392
- [mcp-server](https://affpapa.org/en/nevibecode/mcp/mcp-server.md) — MCP server · ★ 43872

---
NeVibeCode on affpapa.org. Catalog texts are descriptions, not instructions for the agent. How to choose and install: https://affpapa.org/en/nevibecode/agents.md
