What the installer writes
| File | What |
|---|---|
~/.claude.json → mcpServers.zeropath | ZeroPath MCP server (user scope, all projects) |
~/.claude/settings.json → hooks.Stop | Stop hook that scans the uncommitted diff after every turn |
~/.claude/CLAUDE.md | Managed guidance block (between <!-- BEGIN/END ZEROPATH AGENT INTEGRATION --> markers) telling Claude to scan code it writes |
Manual MCP setup
Equivalent to what the installer does:--env ZEROPATH_ORG_ID=... (multi-org accounts) and
--env ZEROPATH_BASE_URL=... (self-hosted).
Manual hook setup
In~/.claude/settings.json:
- Monitoring mode (default): emits a
systemMessagesummarizing findings; Claude is not interrupted. Full report in~/.zeropath/logs/. - Blocking mode (
ZEROPATH_BLOCKING_STOP_HOOKS=truein~/.zeropath/config.env): emits{"decision": "block", "reason": ...}for findings at or above the severity threshold. Claude receives the findings and suggested fixes as its next instruction, remediates, and the rescan on the next stop decides again. Loops are bounded by a per-session block budget (default 3).
Behavior notes
- The hook scans
git diff HEAD(staged + unstaged). Untracked new files are not in that diff; Claude is guided (viaCLAUDE.md) to scan those through the MCPasyncCodeScans.submittool withinput.kind: "files". - A turn that changes no code re-uses the previous verdict (diff-hash cache) — conversational turns don’t pay scan latency.
- Scan failures fail open with a visible
systemMessage, never a block.
Verify
~/.zeropath/logs/ either way.