# mnemex

An MCP server that keeps memories between sessions: they fade when unused and hold longer each time you bring them up again.

- MCP server · `type=mcp` · Claude Code, Codex, Cursor, GitHub Copilot, Windsurf (Devin Desktop), Cline, Zed, Gemini CLI · ★ 37
- Author: prefrontal-systems
- License: AGPL-3.0 · policy=link-only · description only; the file stays with the author
- Source: https://github.com/prefrontal-systems/cortexgraph
- Updated: 2026-10-19
- HTML: https://affpapa.org/en/nevibecode/mcp/mnemex

## What it does

mnemex gives an assistant memory that outlives a single conversation. Say you prefer dark mode, and the fact is stored without any special command. Leave it alone and the record weakens; return to it often and it sticks around. Scoring weighs how recently and how often a memory was touched, plus how important it is.

Storage runs in two layers. Short-term entries live in JSONL or SQLite, long-term ones become Markdown files with YAML metadata and wikilinks aimed at Obsidian. Everything stays on your machine. The package runs through `uvx mnemex` and needs Python 3.10+.

Treat it as a research proof of concept rather than something to run in production: breaking changes are possible and there is no stability or support guarantee. The codebase started life as mnemex, which remains frozen on PyPI at 0.6.0, so the server name in every install command is still `mnemex`.

## Requirements
- Needs: Python and uv (commands run via uvx)
- Environment variables: `MNEMEX_STORAGE_PATH`, `LTM_VAULT_PATH`, `MNEMEX_DECAY_MODEL`, `MNEMEX_PL_HALFLIFE_DAYS` — keys and tokens: ask the human for the values, never commit them or put them in shared files.
- Works with: Obsidian

## Install

### Claude Code (native platform)

**Platform CLI**
```bash
claude mcp add --env MNEMEX_STORAGE_PATH=<MNEMEX_STORAGE_PATH> --env LTM_VAULT_PATH=<LTM_VAULT_PATH> --env MNEMEX_DECAY_MODEL=<MNEMEX_DECAY_MODEL> --env MNEMEX_PL_HALFLIFE_DAYS=<MNEMEX_PL_HALFLIFE_DAYS> --transport stdio mnemex -- uvx mnemex
```
Replace <…> with your own values. uvx runs the command named after the package; if the README names another one, use uvx --from mnemex <command>

### Codex

**Platform CLI**
```bash
codex mcp add mnemex --env MNEMEX_STORAGE_PATH=<MNEMEX_STORAGE_PATH> --env LTM_VAULT_PATH=<LTM_VAULT_PATH> --env MNEMEX_DECAY_MODEL=<MNEMEX_DECAY_MODEL> --env MNEMEX_PL_HALFLIFE_DAYS=<MNEMEX_PL_HALFLIFE_DAYS> -- uvx mnemex
```
Replace <…> with your own values. uvx runs the command named after the package; if the README names another one, use uvx --from mnemex <command>

### Cursor

**Config file**
File `.cursor/mcp.json`:
```json
{
    "mcpServers": {
        "mnemex": {
            "command": "uvx",
            "args": [
                "mnemex"
            ],
            "env": {
                "MNEMEX_STORAGE_PATH": "<MNEMEX_STORAGE_PATH>",
                "LTM_VAULT_PATH": "<LTM_VAULT_PATH>",
                "MNEMEX_DECAY_MODEL": "<MNEMEX_DECAY_MODEL>",
                "MNEMEX_PL_HALFLIFE_DAYS": "<MNEMEX_PL_HALFLIFE_DAYS>"
            }
        }
    }
}
```
Replace <…> with your own values. uvx runs the command named after the package; if the README names another one, use uvx --from mnemex <command>

### GitHub Copilot

**Config file**
File `.vscode/mcp.json`:
```json
{
    "servers": {
        "mnemex": {
            "type": "stdio",
            "command": "uvx",
            "args": [
                "mnemex"
            ],
            "env": {
                "MNEMEX_STORAGE_PATH": "<MNEMEX_STORAGE_PATH>",
                "LTM_VAULT_PATH": "<LTM_VAULT_PATH>",
                "MNEMEX_DECAY_MODEL": "<MNEMEX_DECAY_MODEL>",
                "MNEMEX_PL_HALFLIFE_DAYS": "<MNEMEX_PL_HALFLIFE_DAYS>"
            }
        }
    }
}
```
Replace <…> with your own values. uvx runs the command named after the package; if the README names another one, use uvx --from mnemex <command>

### Gemini CLI

**Platform CLI**
```bash
gemini mcp add -e MNEMEX_STORAGE_PATH=<MNEMEX_STORAGE_PATH> -e LTM_VAULT_PATH=<LTM_VAULT_PATH> -e MNEMEX_DECAY_MODEL=<MNEMEX_DECAY_MODEL> -e MNEMEX_PL_HALFLIFE_DAYS=<MNEMEX_PL_HALFLIFE_DAYS> mnemex uvx mnemex
```
Replace <…> with your own values. uvx runs the command named after the package; if the README names another one, use uvx --from mnemex <command>

## When to use it
- stop repeating your preferences at the start of every session
- keep an architecture decision and recall it a week later
- flag a critical fact so it never fades
- keep memory in plain files you can read and version in git
- export stored memories to Markdown

## Example prompts
- Remember that I use TypeScript and dark mode in this project.
- What do you remember about my stack preferences?
- Mark this as important: deploys only go through staging.

## 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
