Mason is a context engineering MCP (Model Context Protocol) tool for AI coding agents, whose core goal is to prevent agents from writing code based on outdated instructions. By preserving reviewed engineering reasoning, it enables future maintainers and coding agents to retrieve the evidence behind important decisions.
Purpose Mason is used to record why code is built in a certain way. It encourages recording workarounds, rejected approaches, and constraints while the reasons are still available, and revisiting these records when the underlying code changes. In this way, subsequent tasks can retrieve the currently effective accepted revisions, while proposed alternatives remain separate, and changes to referenced code can trigger review, revision, or retirement.
Main capabilities
- Generate CLAUDE.md from Git history and file sampling.
- Maintain a concept map that links features and flows to files, so agents skip repeated searches.
- Record sourced engineering reasoning proposals for review and acceptance as project guidance.
- Provide read-only audits that check claims in a repository's README and agent instruction files.
- Provide read-only reviews that compare committed changes against a selected baseline.
- Neither audits nor reviews require model calls.
- Complement tests, code checks, and code review; findings serve as evidence to be examined, and unavailable checks remain explicit.
How to use Install on macOS or Linux, or install in Windows PowerShell. Installation requires no Node or npm, but requires Git. The installer configures PATH for Bash, Zsh, and Windows. New standard standalone installations update automatically in the background, and updates take effect at future MCP startups after the existing Mason MCP server exits. You can run mason updates to check or change this preference. Existing installations require a one-time manual upgrade, after which mason updates enables update control.
Run the installation command in a Git repository (if the installer requires it, open a new terminal). If the repository already has a compatible Mason configuration, simply run mason setup. Initialization prepares MCP, hooks, and project instructions; setup does not modify shared files. Review the host's trust settings, start a new session, and then give the agent an ordinary task. You can confirm whether Mason is being used through a status check; the status distinguishes configuration from observed usage.
You can also try checks without performing setup: the audit checks READMs throughout the repositoryE and declarations in the agent instruction file; the review compares submitted changes against a selected baseline. Both are read-only and require no model calls.
Applicable scenarios Suitable for code repositories that want to preserve the rationale for engineering decisions, especially scenarios where AI coding agents need to avoid repeated searching in subsequent tasks and avoid writing code based on outdated instructions. Also suitable for teams that need to audit documentation claims and review differences between submitted changes and a baseline.
Limitations Mason supplements rather than replaces tests, code checks, and code review. Early read-only decision retrieval scored 9.0/10 (with Mason) versus 7.0/10 (without); the initial ten-task patch comparison was 10/10 for both, and improved patch results remain to be proven. Recent hook experiments verified supported file delivery, but increased context cost and did not prove correctness gains; direct delivery in ordinary Bash workflows remains unresolved. The current focus is effectively preserving and reusing engineering reasoning in ordinary work, and the capture and maintenance cost needs to feel worthwhile. Preventing repeated mistakes is one of the expected benefits, but comparative advantage has not yet been established.
Development requirements: Use Node 20 (20.19+), Node 22 (22.13+), or Node 24+. After running npm ci, execute npm run format to format TypeScript source code, tests, and tool configuration. CI uses npm run format:check to check formatting, and runs npm run lint, npm run typecheck, and the test suite. Run npm test locally to check behavior. ESLint uses the recommended TypeScript rules and performs type-aware checks for unhandled Promises, misused async callbacks, and invalid await. Prettier handles formatting. Test fixtures and generated output are excluded from formatting and lint. Production source code also rejects explicit any as well as unsafe assignments, property access, calls, arguments, and returns. External data is validated before use. Test doubles retain more permissive rules.
Mason is licensed under the MIT License.