# memex

memex stores an agent’s findings in linked Markdown cards and brings related context into later sessions. It suits workflows that span multiple tasks.

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

## What it does

memex turns useful findings from completed tasks into separate Markdown cards. Before a later task, the server can retrieve related cards, so the agent can build on earlier work. Cards use bidirectional links, and the system works without a vector database or embeddings.

The shared store is `~/.memex/cards/`, which lets Claude Code, Cursor, and Codex access the same memory. The MCP server exposes 12 tools; `memex serve` opens a timeline and link graph for browsing the cards. Node.js 18+ is required for Codex, Cursor, and other MCP clients.

Keep secrets, credentials, tokens, and exact secret-file contents out of cards and queries. memex filters some high-confidence secrets, but it cannot redact unsafe tool arguments already shown in the client transcript.

## Requirements
- Needs: Node.js (commands run via npx)
- Environment variables: `MEMEX_HOME` — keys and tokens: ask the human for the values, never commit them or put them in shared files.

## Install

### Claude Code (native platform)

**Platform CLI**
```bash
claude mcp add --env MEMEX_HOME=<MEMEX_HOME> --transport stdio memex -- npx -y @touchskyer/memex
```
Replace <…> with your own values

### Codex

**Platform CLI**
```bash
codex mcp add memex --env MEMEX_HOME=<MEMEX_HOME> -- npx -y @touchskyer/memex
```
Replace <…> with your own values

### Cursor

**Config file**
File `.cursor/mcp.json`:
```json
{
    "mcpServers": {
        "memex": {
            "command": "npx",
            "args": [
                "-y",
                "@touchskyer/memex"
            ],
            "env": {
                "MEMEX_HOME": "<MEMEX_HOME>"
            }
        }
    }
}
```
Replace <…> with your own values

### GitHub Copilot

**Config file**
File `.vscode/mcp.json`:
```json
{
    "servers": {
        "memex": {
            "type": "stdio",
            "command": "npx",
            "args": [
                "-y",
                "@touchskyer/memex"
            ],
            "env": {
                "MEMEX_HOME": "<MEMEX_HOME>"
            }
        }
    }
}
```
Replace <…> with your own values

### Gemini CLI

**Platform CLI**
```bash
gemini mcp add -e MEMEX_HOME=<MEMEX_HOME> memex npx -y @touchskyer/memex
```
Replace <…> with your own values

## When to use it
- carry agent knowledge across sessions
- retrieve cards related to a coding task
- inspect the graph of linked memories
- share cards across Claude Code, Cursor, and Codex
- sync the memory store through Git

## Example prompts
- Save the decision about this database migration as a card and link it to related notes.
- Before changing authentication, search the memory for cards connected to this project.
- Inspect the card network and show orphaned cards, hubs, and conflicts.

## 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
- [World Monitor](https://affpapa.org/en/nevibecode/mcp/world-monitor.md) — MCP server · ★ 89408
- [Netdata](https://affpapa.org/en/nevibecode/mcp/netdata.md) — MCP server · ★ 81115
- [Front-End Checklist](https://affpapa.org/en/nevibecode/mcp/front-end-checklist.md) — MCP server · ★ 74559
- [Scrapling MCP Server](https://affpapa.org/en/nevibecode/mcp/scrapling-mcp-server.md) — MCP server · ★ 89433

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