# open-memex

A local memory layer for coding agents: facts live in Markdown files, search runs on SQLite FTS5, and every connected editor reads the same store.

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

## What it does

Each new chat starts blank, so you explain the deploy process again and watch the agent rediscover the same traps. open-memex writes those facts to small Markdown files, one per fact, and hands the most relevant ones to the agent on the first turn of a session. After that the agent searches the rest on its own.

Markdown is the source of truth; the SQLite FTS5 index beside it is only a search accelerator and rebuilds from the files with `open-memex reindex`. A curated synonym map is indexed at write time, so `ship` matches `deploy` and `单点登录` matches `SSO`. No embedding model is involved, which keeps results deterministic and auditable.

Memories sit in one of two scopes. `project` covers the current repo and is set up for you; `personal` holds your own preferences and never leaves the machine. Node.js ≥ 22.14 is required, otherwise `npm install -g open-memex` fails. `open-memex init` wires up the editors it detects, and you restart them afterwards. Run `open-memex doctor` if you want to confirm the connection before trusting it.

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

## Install

### Claude Code (native platform)

**Platform CLI**
```bash
claude mcp add open-memex -- npx -y open-memex
```

### Codex

**Platform CLI**
```bash
codex mcp add open-memex -- npx -y open-memex
```

### Cursor

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

### GitHub Copilot

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

### Gemini CLI

**Platform CLI**
```bash
gemini mcp add open-memex npx -y open-memex
```

## When to use it
- carry a deploy convention across sessions
- recall a past decision by a synonym instead of the exact word
- keep personal preferences out of the repo's shared memory
- point several editors at one memory store
- surface duplicates and stale entries with `open-memex audit`

## Example prompts
- Remember: this project deploys on Fridays
- What did we decide about the auth schema?
- Search memory for everything about database migrations

## Similar
- [open-zk-kb](https://affpapa.org/en/nevibecode/mcp/open-zk-kb.md) — MCP server · ★ 7
- [desk-open](https://affpapa.org/en/nevibecode/skills/desk-open.md) — skill · 23 installs
- [Palinode](https://affpapa.org/en/nevibecode/mcp/palinode.md) — MCP server · ★ 46
- [context-mem](https://affpapa.org/en/nevibecode/mcp/context-mem.md) — MCP server · ★ 19
- [Global Agent Memory](https://affpapa.org/en/nevibecode/mcp/global-agent-memory.md) — MCP server · ★ 14
- [sqlite-graph-memory](https://affpapa.org/en/nevibecode/mcp/sqlite-graph-memory.md) — MCP server · ★ 12

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