memex
Integrates with GitHub Copilot by carrying memory context through a CI workflow and enforcing memory verification gates with memex verify.
Click on "Deploy Server".
Wait a few minutes for the server to deploy. Once ready, it will show a "Started" state.
In the chat, type
@followed by the MCP server name and your instructions, e.g., "@memexsave that I prefer Python 3.12 for new projects and tag it workflow"
That's it! The server will respond to your query, and you can continue using it as needed.
Here is a step-by-step guide with screenshots.
A durable, local-first memory layer for AI coding agents.
The filesystem is the memory · the index is disposable · every session is provable.
Documentation · User guide · Specification · Harness adapters
Why
Agents that matter forget things that matter: your stack, your rules, your decisions from last Tuesday. Vector databases and cloud memory services solve this with infrastructure. Memex solves it with a filesystem:
The filesystem is the memory. Every memory is a Markdown page under
~/.memex/docs/— human-readable, git-able, editable by hand, portable forever. No blobs, no lock-in, no server.The index is disposable. SQLite FTS5 provides fast BM25 search, and it is never the source of truth: delete
mem.db, runmemex rebuild-index, everything comes back from the pages.Every session is provable. Captured transcripts link to episode nodes, so any memory traces back to the conversation that produced it.
Related MCP server: exomem
Agents forget to call tools — memex doesn't rely on them remembering
Layer | Mechanism | Guarantee |
Pull | 8 typed MCP tools ( | The model can read/write memory when it chooses |
Push | Harness hooks ( | Memories are injected into context every turn; transcripts are captured automatically |
Proof |
| Health and memory-activity evidence — or the build fails |
One contract, every harness:
Harness | Push | Pull | Transcript capture |
per-turn injection (extension) | stdio MCP | session JSONL | |
SessionStart / UserPromptSubmit / SessionEnd hooks | stdio MCP | transcript | |
AGENTS.md contract + | stdio MCP | rollout | |
CI carries it | remote (future) |
|
memex install # interactive: pick a harness
memex install claude # or codex, pi, copilot, customQuickstart
# install (Python 3.12+)
uv tool install --path . memex
# store a memory — it's a plain Markdown page
memex write --type preference --title "Deploy on Fridays" \
--body "The team deploys to production on Fridays only." --tags deploy
# recall it — BM25-ranked, snippet-highlighted
memex recall "deploy"
# read it, edit it by hand, commit it to git
cat ~/.memex/docs/preferences/deploy-on-fridays.mdfrom memex import Memex, WriteInput
memex = Memex()
memex.write(WriteInput(type="entity", title="Ruff linter", body="Fast linter."))
result = memex.recall("linter", top_k=3)
provenance = memex.get_provenance(result.hits[0].slug)
memex.close()memex_write · memex_recall · memex_consolidate · memex_forget ·
memex_ingest_transcript · memex_provenance · memex_export ·
memex_import
claude mcp add memex -- memex serve-mcpmemex verify --since "$PR_CREATED" --require-recall --require-writeAlways checks: every page parses, the index matches content hashes, every
[[link]] resolves. With --since, enforces recall/write activity evidence.
Exit 1 fails the build. Ready-made workflow: marketplace/copilot/memex-verify.yml.
Commands
Command | Purpose |
| Store and search memory nodes (BM25, filters, snippets, expiry semantics) |
|
|
| LLM distillation of episodes into durable nodes — any OpenAI-compatible endpoint, or the coding harness itself ( |
| Store a session JSONL + create the linked episode node |
| Harness hook contract: context injection + transcript capture |
| Deterministic health + activity gate for CI |
| Seamless harness setup: adapters, MCP wiring, |
| stdio MCP server (official SDK) |
| Rebuild |
| Hardened tar.gz archives; JSON node portability |
Documentation
Guide, specification, implementation notes | |
Concepts, every operation, harness integration, config reference | |
Memory model, schemas, C4 diagrams, acceptance tests | |
Spec deviations and the reasoning | |
pi · Claude Code · Codex · GitHub Copilot |
Contributing
uv sync --all-groups
uv run pytest && uv run ruff check . && uv run mypy src testsContributions welcome — see AGENTS.md for engineering conventions and the guide for architecture context.
License
MIT © Memex contributors
Memex stores memory as plain files on your machine and treats stored memories and tool inputs as untrusted: logs never contain memory contents, archives are validated before extraction, and tool errors are sanitized.
This server cannot be deployed
Maintenance
Related MCP Connectors
Shared, governed long-term memory for AI agents across tools and sessions via MCP and REST.
- memnodeOAuthdev.memnode
Persistent, inspectable memory for AI agents with lineage, correction, and a hosted MCP endpoint.
Persistent memory for AI agents across Claude, ChatGPT and any MCP client.
Token-efficient MCP memory for Markdown vaults. Tiered search, GraphRAG, AI memories.
Related MCP Servers
- AlicenseAqualityBmaintenanceProvides a hybrid memory architecture with a thin SQLite index and Markdown cold storage, enabling AI agents to write, query, link, and rebuild long-term memories via MCP tools, model-agnostic and zero third-party dependencies.74MIT
- AlicenseNot gradedqualityAmaintenanceDurable memory with sources, proof, history, and review for MCP-capable agents. It turns a Markdown/Obsidian vault into a local knowledge substrate, enabling agents to store, search, and retrieve governed knowledge.10AGPL 3.0
- AlicenseNot gradedqualityBmaintenanceProvides portable memory for AI agents using plain Markdown files. Enables storing, recalling, and managing memories via MCP tools like recall, remember, forget, list, and get.1 npm1MIT
- AlicenseNot gradedqualityCmaintenanceProvides a cross-session memory system for AI assistants via MCP, with markdown-based storage, BM25 retrieval, and tools for writing, searching, reading, and managing memories.10 npmMIT