mason — Claude Code MCP server: what it does, how to install
Records technical decisions and architectural context alongside your repository. Helps coding assistants recall why code was shaped a certain way.
claude mcp add mason -- npx -y mason-contextWhat mason does
The server links design reasoning to source code. It tracks rejected alternatives, structural limits, and reasons for specific workarounds. When an assistant edits modified files later, Mason retrieves earlier accepted rationale so the agent avoids repeating past mistakes.
Built-in CLI tools handle static consistency checks. Running mason audit validates repository instructions against actual file paths and npm scripts. Similarly, mason review inspects committed patches against a base branch. Both operations run locally and need zero model tokens.
Git is strictly required for operation. Mason tracks historical links between files, so without an active Git repository the auditing and context features will not start.
What it helps with
- record engineering rationale and rejected approaches in the repository
- audit documentation against missing file paths and scripts
- locate related test suites and historical co-changes for a patch
- preserve diagnostic context when resuming an interrupted fix
Example prompts for the agent
- Record why we chose this database index approach using Mason.
- Audit the README and agent instructions for outdated file paths.
- Check accepted architectural decisions before modifying the auth flow.
How to install mason
Platform CLI
claude mcp add mason -- npx -y mason-contextPlatform CLI
codex mcp add mason -- npx -y mason-contextConfig file
{
"mcpServers": {
"mason": {
"command": "npx",
"args": [
"-y",
"mason-context"
]
}
}
}Config file
{
"servers": {
"mason": {
"type": "stdio",
"command": "npx",
"args": [
"-y",
"mason-context"
]
}
}
}Platform CLI
gemini mcp add mason npx -y mason-contextStep by step, with commands for each platform: How to add an MCP server to Claude Code, Codex, Cursor, VS Code, Gemini CLI and more
Questions about mason
How to install mason in Claude Code?
Run claude mcp add mason -- npx -y mason-context in your terminal. You must have Git installed on your system.
What does mason do?
It records engineering choices directly in the codebase and provides that reasoning to coding assistants during future edits. It also verifies documentation claims.
Do audit and review commands consume AI tokens?
No, CLI commands like mason audit and mason review are read-only local operations that run without contacting language models.