memeX · Documentation

memeX with Claude Code

Wire memeX into Claude Code with one command. Persistent cognitive memory for every Claude Code session via MCP — recall, validate, observe, add. Open source, Apache 2.0 licensed.

MCP stdioone-line setup9 native tools exposed

Claude Code speaks MCP natively. Setup is one line.

Install memeX

pipx install memex
# or
uv tool install memex

Wire memeX into Claude Code

claude mcp add memex memex serve

That’s it. The next Claude Code session has these tools available:

recall(query, budget_tokens, kind, expand_hops)

Retrieve a budget-bounded subgraph.

add_node(name, description, kind, source, confidence, verification)

Add a concept.

link(from_id, to_id, kind, source)

Create a typed edge.

observe(kind, actor, payload)

Emit an episodic event.

validate(skill, actor)

Get the structured approach + checks for a skill.

progress(actor)

What's been done in this store.

list_skills() · install_skill(name)

List or install builtin skill bundles.

stats()

Storage stats and tier status.

Bootstrap your install with the meta-skills

memex install skill:using-memex
memex install skill:core-validations

The first skill teaches Claude Code how to use memeX. The second gives it validation rules for every sensitive domain (security, money, concurrency, crypto, SQL, untrusted input).

Verify

In a Claude Code session, ask:

What memex tools do you have available? Run stats() to confirm.

Claude Code should list the tools above and return your memeX storage stats.

Tips

  • Always recall first. Tell Claude Code (in your project CLAUDE.md or your prompt) to call recall(<topic>) before generating code in non-trivial contexts.
  • Always validate sensitive domains. Tell Claude Code to call validate(<approach>) before generating subprocess, money, async, crypto, SQL, or HTTP-input code.
  • Always observe decisions. Tell Claude Code to call observe(kind="decision", payload={...}) whenever it makes a non-trivial choice. The activity log builds up automatically.
  • Persistent across sessions. memeX’s storage is at ~/.memex/ (or %LOCALAPPDATA%/memex/ on Windows) — what one session adds, the next session can recall, even after Claude Code restarts.

Multi-tool: also wire Cursor / Windsurf

memeX storage is shared across all editors that point at the same daemon. Cursor / Windsurf MCP configs:

{
  "mcpServers": {
    "memex": {
      "command": "memex",
      "args": ["serve"]
    }
  }
}

Drop this in ~/.cursor/mcp.json (Cursor) or your Windsurf settings. Multiple editors can run their own memex serve — they all read/write the same on-disk graph.