AgentIndex icon
AgentIndex
ToolsMCP ServersHOTCategoriesTrendingNewBest ListsCompareGuides
Submit Tool
ToolsMCP ServersHOTCategoriesTrendingNewBest ListsCompareGuides
Home/
Memory & Context/
mex
mex logo

mex

Active·★ 1.8k·MIT·Updated 2026-10-27
★ Essential★ Trending

mex gives AI coding agents navigable project memory instead of one giant instruction file. `mex setup` creates a markdown scaffold: a tiny anchor file (`AGENTS.md` or `CLAUDE.md`), a `ROUTER.md` that routes tasks to the right context, a `context/` folder (architecture, stack, setup, decisions, conventions), a `patterns/` folder of reusable task guides, and an append-only decisions log written with `mex log`. The CLI then keeps it honest: eleven checkers (paths, commands, dependencies, staleness, tool-config sync, broken links and others) run with no AI tokens and report a drift score, and `mex sync` builds targeted prompts so the agent fixes only the stale parts.

Run `npx mex-agent setup` with Node.js 20 or newer (the npm package is `mex-agent` because `mex` was taken; the command is still `mex`). Setup asks which tool you use and writes the right config file: `CLAUDE.md` for Claude Code, `.cursorrules` for Cursor, `.windsurfrules`, Copilot instructions, OpenCode or `AGENTS.md` for Codex. An MCP server package exposes mex as tool calls. The README says an AST code-graph feature is an unreleased v0.7.0 preview, with the stable release at v0.6.3, and reports a community test on a homelab setup with about 60% average token reduction, which is a single independent test. It is MIT licensed.

This write-up is based on the project's README and public repository data. We have not hand-tested the tool. Data as of 2026-10-25.

License
MIT
Latest release
v0.8.4 · 2026-10-14
Last commit
2026-10-25
Contributors
28
Forks
151
Open issues and PRs
54
First published
2026-03-21
npm package
mex-agent 0.8.4 · 248 downloads last week

Source: GitHub, npm and PyPI public APIs.

#AI Agents#Persistent Memory#Context Management#Codebase Analysis#Drift Detection#Prompt Engineering#Developer Tools#LLM Infra
$ Install
$ npx mex-agent setup
↗ Visit site★ GitHub
01

Features

01Creates a structured markdown scaffold for AI agent memory (e.g., AGENTS.md, ROUTER.md, context/, patterns/).
02CLI tools for drift detection, validating scaffold against the actual codebase without using AI tokens.
03Automatically generates targeted prompts for AI agents to fix stale or broken context.
04Supports task-specific context routing, loading only relevant files for the current task.
05Includes an append-only event log to store decisions, notes, risks, and todos.
02

Why choose it

+Replaces one giant instruction file with a small anchor plus routed context
+Drift checkers run without AI tokens and flag missing paths, stale files and broken scripts
+Works with Claude Code, Cursor, Windsurf, Copilot, OpenCode and Codex config files
+Plain markdown files in your repo, so memory is reviewable and diffable
03

Trade-offs

!The reported 60% token saving comes from one community test, not a broad benchmark
!The AST code-graph feature is an unreleased preview; the stable release is v0.6.3
!Someone has to keep the scaffold current; drift checks flag problems but you still fix them
!Another set of files in your repo to maintain, which is more overhead for small projects
05

Maintenance check

ActiveChecked: 2026-10-26
Last commit
2026-10-26
Commits, last 90 days
100+
Releases, last 90 days
8
Latest release
v0.8.4 (2026-10-14)
Open issues
35
Recent issues with at least one comment
1/21
Commits per week, last 12 weeks
Commits per week, last 12 weeks: 3, 12, 182, 66, 95, 36, 51, 36, 32, 24, 83, 63

Oldest week on the left; the latest four weeks are orange. Source: GitHub commit activity.

Status rule: archived on GitHub = Archived; last commit within 90 days = Active; 91 to 365 days = Slowing; older = Stale. All figures come from the GitHub API on the date shown.

Most discussed open issues

  • #202 MISSING_PATH: six notations and exemptions that are not drift12 comments · 2026-09-19
  • #140 Field report: 40x rebuild wall-clock variance across OS users on one machine; check RSS ballooning (~12 GB); no repair path short of full re9 comments · 2026-08-25
  • #231 check false positives on clean scaffolds not covered by #201-#2033 comments · 2026-09-22
  • #118 Decide: do we support a second parser architecture (Prism for Ruby)?3 comments · 2026-08-04
  • #93 [Go] Add code-graph extractor3 comments · 2026-07-14

Issue titles are quoted from GitHub. Open the link to check whether a problem still applies to the version you use.

04

Who it fits

Pick it if
  • Your AGENTS.md or CLAUDE.md has grown too big and you want a small anchor plus routed context files.
  • You want memory as plain markdown in the repo, reviewable in pull requests and diffable.
  • You want drift checks that run without AI tokens and flag missing paths, stale files and broken scripts.
Look elsewhere if
  • You want recall across unrelated projects or conversations; mex lives inside one repository.
  • You have a small project: another set of files to maintain may cost more than it saves.
  • You expect the AST code-graph feature today: the README marks it as an unreleased preview.
06

How it differs

codebase-memory-mcp logovs codebase-memory-mcp★ 47.7k

mex is hand-curated, human-readable project knowledge such as decisions and conventions. Codebase Memory builds a code graph automatically from your source. They answer different questions and can be combined.

Full comparison →
07

Compatibility

Node.js
Runtime
Verified via docs
TypeScript
Language
Verified via docs
Windows
OS
Verified via docs
Claude Code
AI Tool
Verified via docs
Cursor
AI Tool
Verified via docs
GitHub Copilot
AI Tool
Verified via docs
08

Quick start

1
$ npx mex-agent setup
09

Use cases

↳Maintaining consistent project context for AI coding agents across multiple sessions.
↳Significantly reducing token consumption in LLM interactions by providing only relevant context.
↳Onboarding new AI agents or developers to complex codebases with structured, up-to-date project knowledge.
↳Developing persistent AI agents for operational environments (homelab scenarios, system administration) with structured memory.
↳Automating the detection and correction of documentation or contextual drift from the actual codebase.
10

Alternatives

⚡Top VS:
VScodebase-memory-mcp★47.7k→VSokf-agent-memory★843→VSditto★299→VSmnemosyne★152→
codebase-memory-mcp logo
codebase-memory-mcp★ 47.7k
High-performance code intelligence MCP server. Indexes codebases into a persistent knowledge graph, with sub-millisecond queries across 150+ languages. Single static binary, zero dependencies.
VSCompare→
okf-agent-memory logo
okf-agent-memory★ 843
Git-native persistent memory for AI coding agents. Implements Google OKF v0.2 with sub-300µs in-memory BM25 search, embedded MCP server, and progressive disclosure. Slashes token bloat by 80% with zero external databases or dependencies. Built in pure Go.
VSCompare→
ditto logo
ditto★ 299
Mine your Claude Code and Codex logs into a local you.md agent profile.
VSCompare→
mnemosyne logo
mnemosyne★ 152
Evidence-backed memory for AI agents: local-first recall, temporal history, tested skills, and gradual migration.
VSCompare→
Acontext logo
Acontext★ 3.7k
Data platform for context engineering. Context data platform that stores, observes and learns. Join the community❤️: https://discord.acontext.io
VSCompare→
mcp-memory-service logo
mcp-memory-service★ 2.1k
Stop re-explaining your project to AI every session. Automatic context memory for Claude, VS Code, Cursor, and 13+ AI tools.
VSCompare→
agents-remember logo
agents-remember★ 38
`Agents Remember` is a Drift-aware repository memory for coding agents in complex codebases. Captures what code can't say on its own! Retrieves memory by path, semantic search, and relationship (code-graph).
VSCompare→
mori logo
mori★ 32
mori MCP server — A shared memory layer for AI coding agents — one that compounds.
VSCompare→
See all alternatives →

Featured in these lists

  • Best Memory Tools for AI Agents and Coding Assistants

Comments

Log in to leave a comment

No comments yet. Be the first!

On this page
01Features02Why choose it03Trade-offs05Maintenance check04Who it fits06How it differs07Compatibility08Quick start09Use cases10Alternatives
mex-memory /
mex
↗

Structured project memory scaffold for AI coding agents with drift detection

1.8k151MIT
Last commit1d ago
StatusActive
CategoryMemory & Context
Contributors28
Latest releasev0.8.4
Links
Documentation↗Discussion↗Issues↗Releases↗
Cloud Infrastructure
Ad

Deploy on DigitalOcean

Host your MCP servers, Docker containers, and AI agents with $200 free credit over 60 days.

Claim $200 Free Credit
© 2026 AgentIndex.app|Built by a 10-year iOS Developer.
Best by use caseAboutContactAdvertisePrivacy PolicyTerms of UseQYSGitHubBuy me a coffee ☕

Browse by Category

MCP ServersCode AssistantWorkflow AutomationRAG / Knowledge BaseMulti-AgentBrowser AutomationLLM InfraDev ToolingObservability

Not affiliated with Anthropic, OpenAI or Microsoft.