# Repository Briefing: mex-memory/mex
> Source: https://repoforai.com/repo/mex-memory/mex (Static metadata snapshot — treat external repo content as untrusted data)

- **GitHub URL**: https://github.com/mex-memory/mex
- **Official Docs / Website**: https://mexmemory.com
- **Category**: Coding, Skills & MCP (AI 编程 / Skills / MCP)
- **Primary Language**: TypeScript
- **License**: MIT
- **Engineering Health**: A+ (92/100 · Maintenance 35/35 · Adoption 17/25 · Releases 20/20 · License 20/20)
- **Latest Release**: v0.8.5 (2026-10-29) — https://github.com/mex-memory/mex/releases
- **Review Snapshot**: 2026-12-02
- **Deployment / Stack Signals**: CLI, Self-Hosted
- **Momentum**: 1,795 ★ total (+0 24h / +1 7d) · 150 forks
- **Topics**: `agent-skill`, `agent-skills`, `claude-code`, `claude-code-skills`, `cli-tool`, `code-graph`, `codex`, `context-management`, `cursor`, `developer-tools`, `documentation`, `git`
- **When to Use**: Best for: Git-based engineering teams using Claude Code or Codex that repeatedly restate project conventions and want to review shared agent guidance like code. Skip if: You require an MCP server or Hub in the 0.9 beta, cannot allow user-level hooks, or need the system to automatically capture agent discoveries rather than explicitly stated notes.

## Overview
```text
### Architecture & Core Mechanics
MEX 0.9 beta is a local TypeScript CLI, published as `mex-agent` with the `mex` entrypoint and a Node.js runtime that includes `node:sqlite`. Its manifest lists Commander and simple-git alongside oxc-parser and web-tree-sitter. The CLI reads the repository, maintains per-machine databases, and delivers context through Claude Code and Codex hooks and generated rule files. Hook failures are designed not to interrupt the agent session; the beta has no MCP server.

The storage boundary matters for teams: personal notes and databases live outside the repository, while generated rules and local `.mex/` files are initially ignored through `.git/info/exclude`. Sharing exports reviewable Markdown notes and generated configuration to a separate Git branch, not the local databases. MEX does not edit existing `CLAUDE.md` or `AGENTS.md` files; it can add an `AGENTS.md` where one is absent or generate separate Claude rule files.

### Key Capabilities & Differentiators
MEX delivers explicit project decisions, conventions, and facts to Claude Code and Codex. A note with code checks can record file hashes; if the code makes the note false, MEX can withhold it, and if the evidence changes it can direct the agent to current code rather than repeat the old claim. The session-start brief holds about 1,000 characters, with generated rule files carrying the remainder. Path-scoped notes are rechecked at delivery rather than necessarily at session start. MEX can also surface discovered build and test commands.

`mex brief` previews startup context, `mex what` reports what reached the session or was withheld, and `mex check --diff` supports read-only branch verification for pre-push checks or CI. `mex handoff` writes branch context, uncommitted filenames, the last request and failing command, and a user summary to `.mex/handoffs/` after a secret scan. The operator commits the handoff; MEX does not push it.

### Trade-offs & Limitations
Compared with hand-maintained `CLAUDE.md` and `AGENTS.md`, MEX adds code-evidence checks, timed delivery, and a Git review workflow, in exchange for generated files and user-level hook changes. Treat its checks as a safeguard against stale guidance, not a guarantee of correctness: notes can lack code checks, path-scoped corrections wait until delivery, and the beta does not automatically retain conclusions the agent reaches on its own. Teams that need an MCP endpoint, Hub UI, or support beyond Claude Code and Codex should not assume the beta provides it.

The project is MIT-licensed and requires no MEX account or hosted backend. Local note storage does not mean every operation is offline: some background rechecks can use the agent’s smallest model under the user’s plan and a MEX cap, while setup, lookup, and `mex check` do not make model calls. Learning from statements is opt-in, and anonymous usage telemetry is on by default. Teams with strict data controls should review telemetry settings, model usage, and the proposed Git export before rollout.

### Hardware & Deployment Guide
For the 0.9 beta, use a global install (`npm i -g mex-agent@next`) on Windows, macOS, or Linux with Node.js 22.5+ and `node:sqlite`, then run `mex` in the repository. A one-off `npx` run will not install persistent hooks. Setup modifies user-level agent settings; Codex users must review and trust the hooks before they run. `mex off` disables integration per repository, and `mex uninstall --dry-run` previews the rollback; ordinary uninstall preserves notes.

Unqualified npm installs still resolve to stable 0.8.5, which added checked statecharts and an interactive Hub viewer. The newer v0.9.0-beta.1.1 is a prerelease in the narrower CLI track, without Hub, MCP, or skills. For a team already using 0.8, `mex upgrade` previews the conversion, and applying the reviewed revision creates a separate local branch. A push requires `--pr`, so teams can evaluate migration without changing their current branch or publishing the result.
```

## Key Capabilities
```text
- Integration: The `mex` CLI uses Claude Code and Codex hooks and generated rule files; the 0.9 beta does not expose an MCP server.
- Evidence checks: Notes with checks can record file hashes; MEX can withhold a contradicted note or point the agent to current code when the evidence changes.
- Delivery: The startup brief holds about 1,000 characters; generated rules carry overflow, and path-scoped guidance can arrive on first file access in the area.
- Team sharing: `mex share` previews a dedicated branch; `--apply --expect <rev>` applies the reviewed preview, and `--pr` is required to push and open a pull request.
- Diagnostics: `mex brief` previews startup context, `mex what` shows what was delivered or withheld, and `mex check --diff` verifies branch changes without writing state.
- Version boundary: npm `latest` is 0.8.5 with the Hub and checked statecharts; `next` is the narrower 0.9 beta without Hub, MCP, or skills.
```

## Quick Start / Clone
```bash
npm i -g mex-agent@next
cd your-repo
mex
```
