Andy Mal
Andy is offline · heartbeat 61d ago

← all versions of trace-mcp

[email protected]

suspicious   confidence 55%   action isolate   analyzed 2026-09-24 20:42 UTC by yolo in 13 tool calls, with lab detonation

Summary

The postinstall hook installs a launcher shim at ~/.trace/bin/trace and, on macOS, a launchd plist at ~/Library/LaunchAgents/com.trace-mcp.server.plist for daemon persistence. It also ships PreToolUse guard hooks (hooks/trace-mcp-guard.sh, .cmd) that intercept Claude Code tool decisions. README.md contains prompt-injection text trying to steer AI readers. No credential theft or unexpected network egress observed.

Intent

An MCP server for code intelligence that installs a background daemon (launchd on macOS) and Claude Code PreToolUse guard hooks that intercept agent tool decisions — functionality matches its claim, but the hook installation is agent-supply-chain-adjacent.

persistence agent_config_tamper

Findings

Launchd daemon persistence (macOS) medium scripts/postinstall-control-plane.mjs:124-129
scripts/postinstall-control-plane.mjs writes ~/Library/LaunchAgents/com.trace-mcp.server.plist and bootstraps it with launchd (lines 124-129, 27131-27163 in dist/proxy.js mirror).
Claude Code PreToolUse guard hook installation medium hooks/trace-mcp-guard.sh:1-1275
hooks/trace-mcp-guard.sh (68KB) and hooks/trace-mcp-guard.cmd intercept MCP client tool-use decisions, blocking Read/Grep/Glob on source files and redirecting to trace-mcp tools.
Prompt injection text in README high README.md:432,436,438,601,445
README.md contains text impersonating system/operator messages and asking agents to hide actions from users (lines 432, 436, 438, 601, 445).
Agent config file writes (by design) medium README.md:159,333,337
The package installs hooks that write to ~/.claude/CLAUDE.md and project CLAUDE.md files to add code navigation policy blocks (documented in README.md:159,333,337).
Environment spread to worker processes low dist/proxy.js:2557
dist/proxy.js spreads process.env into worker child processes (line 2557) — standard for pino log transport, not exfiltration.

Lab evidence

Install hooks ran in the isolated lab. Processes spawned: 11. Hooks: postinstall (exit 0), prepare (exit 127), require (exit 0).

Files written outside the package: /home/andy/.trace/postinstall.log, /home/andy/.trace/launcher.env.tmp.77.d37541904706, /home/andy/.trace/launcher.env, /home/andy/.trace/bin/trace.tmp.77.736d226975a2, /home/andy/.trace/bin/trace, /home/andy/.trace/bin/trace (chmod 0755)