MEX helps Claude Code load only the project context it needs

MEX is an open source tool for giving smaller, more targeted . It creates a `.mex/` folder in the project root. Instead of one large , the agent starts from a short bootstrap of about 120 tokens that points to a routing table.

The routing table chooses the right based on the task. For example, an auth task can load the architecture file, while new code work can load the conventions file. This means the agent reads the information it needs and avoids extra material.

MEX also includes drift detection for checking whether the scaffold still matches the real codebase. It uses 8 checkers without AI or token use, and can catch missing file paths, deleted npm scripts mentioned in docs, dependency s across files, and scaffold files that have not changed for more than 50 commits. When it finds problems, `mex sync` builds a focused prompt for Claude Code to fix only the broken files.

Key points

  • MEX is an open source project that stores AI inside a `.mex/` folder.
  • A short bootstrap points the agent to a routing table instead of loading one large .
  • The routing table sends each task to the most relevant .
  • Drift detection checks whether the scaffold still matches the real codebase without using AI tokens.
  • `mex sync` creates a targeted prompt so Claude Code can fix only the files with problems.
Read original