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 · Harness adapters
Overview
Agents forget your stack, rules, and past decisions. Memex keeps that knowledge in local files and brings relevant memories into coding sessions.
Markdown is the memory. Each page under
~/.memex/docs/is readable, editable, portable, and suitable for version control.Search is rebuildable. SQLite FTS5 provides BM25 search;
memex rebuild-indexrestores the index from the pages.Sessions are traceable. Captured transcripts link to episode memories, so you can find the conversation behind a memory.
Memex combines model-initiated MCP tools, harness hooks that inject context and
capture transcripts, and memex verify for CI checks. The same memory store
works with pi, Claude Code, Codex, and GitHub Copilot.
Related MCP server: exomem
Quick start
Install Memex from Git
Requires Python 3.12+ and uv. Install the CLI directly from GitHub; a source checkout is optional.
uv tool install git+https://github.com/phanijapps/memex.gitConnect your coding agent
Run the command for your harness from the project where you want Memex:
memex install claude # Claude Code
memex install codex # Codex
memex install pi # pi
memex install copilot # GitHub Copilotmemex install opens an interactive picker. See the harness guide
for what each adapter installs and how it captures sessions.
Store and recall a memory
memex write --type preference --title "Deploy on Fridays" \
--body "The team deploys to production on Fridays only." \
--description "Production deploys happen on Fridays only." --tags deploy
memex recall "deploy"The page is a plain file at
~/.memex/docs/global/preferences/deploy-on-fridays.md. The optional
--description stores a one-sentence signpost that is searched and returned
with every hit. For repository
architecture, conventions, and decisions, use --scope project; Memex can
derive the project identity from the working directory. See
project memory for scope details.
Explore your memory
Run memex viz to open the local, read-only dashboard. It shows memory pages,
projects, sessions, token usage, and index health. Generated index.md
files also list titles and descriptions one directory at a time under
~/.memex/docs/, so agents can descend the store with plain file reads —
disposable views that memex rebuild-index restores from the pages.

See the Memories view for scope and type filters. These screenshots use sample data.
Remove Memex
Run memex uninstall <name> from each project where you installed an adapter.
It removes that harness's Memex wiring and keeps your memories. Then remove
the CLI if you no longer need it:
memex uninstall claude # repeat for each installed harness
uv tool uninstall memex # remove the CLIMemories and transcripts remain under ~/.memex/ unless you remove that
directory separately.
More ways to use Memex
Command | Purpose |
| Store and search memory pages |
| Retire, archive, decay, or delete a memory |
| Distill session episodes into durable memories |
| Browse memories and sessions in the local dashboard |
| Check store health and optional recall/write activity in CI |
| Pick up hand edits to Markdown pages; regenerate directory indexes |
| Archive the store or move JSON nodes |
The user guide covers commands, transcripts, provenance, scope, configuration, and data safety. The specification and implementation notes cover the full contract and shipped differences.
from 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()The installed harness adapter registers memex serve-mcp where supported.
For a manual Claude Code setup:
claude mcp add memex -- memex serve-mcpmemex verify always checks that pages parse, the index matches them, and
links resolve. Add a time cutoff to require memory activity in CI:
memex verify --since "$PR_CREATED" --require-recall --require-writeThe Copilot workflow is a ready-made example.
Development
Architecture
The CLI, MCP server, and harness adapters use the same application services. Those services write Markdown pages, maintain the disposable SQLite search index, and capture session JSONL. The optional dashboard reads this store. See the architecture overview for code ownership and runtime flows.
Work from a clone
git clone https://github.com/phanijapps/memex.git
cd memex
uv sync --all-groupsTo install your checkout as the memex CLI, run uv tool install . --force.
Test and contribute
uv run pytest
uv run ruff check .
uv run ruff format --check .
uv run mypy src tests
uv run mkdocs build --strictContributions welcome. Read AGENTS.md for repository conventions and the user guide for behavior and configuration.
License
MIT © Memex contributors
This server cannot be deployed
Maintenance
Related MCP Connectors
Hosted MCP memory for coding agents: persistent across sessions, editable markdown, team sharing.
- 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 gradedqualityBmaintenanceDurable 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.2,146 PyPI10AGPL 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.7 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