# ClamGuard (mac-clamshell-mcp) > Keep your closed MacBook cool, quiet, and predictable during heavy builds and autonomous agent runs. - Official Site: https://clamguard.eatingdream.dev/ - Hub: https://eatingdream.dev/ - Repository: https://github.com/eatingDream-antigravity-plugins/mac-clamshell-mcp - AI Guide: https://github.com/eatingDream-antigravity-plugins/mac-clamshell-mcp/blob/main/docs/ai-guide.md - Upstream llms.txt: https://github.com/eatingDream-antigravity-plugins/mac-clamshell-mcp/blob/main/llms.txt - Platform: macOS · Apple Silicon & Intel - License: MIT ## Quick Install ```sh curl -fsSL https://raw.githubusercontent.com/eatingDream-antigravity-plugins/mac-clamshell-mcp/main/scripts/install.sh | sh ``` ## Portable Agent Skill ```sh npx skills add eatingDream-antigravity-plugins/mac-clamshell-mcp ``` ## Key Capabilities - **External-Display Safe Lid Guard**: Sleeps the panel cleanly on standalone lid close and restores saved brightness on open. When docked, protects external monitors without triggering displaysleepnow. - **Read-Only AppleSMC & Fan-Manager Yield**: Reads live fan RPM and SMC mode (auto, manual, unknown) with zero SMC writes. Detects Macs Fan Control, TG Pro, and smcFanControl separately from read-only monitors. - **Adaptive Build Throttling**: Wraps cargo, make, or test commands with CPU QoS (taskpolicy, nice) and parallel job caps tuned dynamically to lid state, power source, and thermal pressure. - **Built-In Brightness & Wake-Restore Queue**: Adjusts built-in panel brightness via reversible DisplayServices user-space APIs—or safely queues your wake-restore target while closed without touching a sleeping panel. - **Session-Verified Screen Lock**: Locks via SACLockScreenImmediate without sleeping background agent tasks, polls CGSSessionScreenIsLocked, and explicitly distinguishes verified vs submitted. - **Silent When Open & Cool**: Emits zero hook output under normal open-lid thermals; surfaces gentle wrap hints only when closed or thermally constrained, with an optional 24/7 LaunchAgent. ## Safety & Privacy - Zero root & zero SMC writes: never requires sudo, never writes SMC/NVRAM/kexts, and stores state in owner-only 0700/0600 files. - Hardware-confirmed brightness guard: refuses brightness writes unless hardware confirms the lid is open and internal display is awake. - Compile-time #[cfg(test)] hardware refusal: unit and integration tests can never lock your screen, sleep displays, or spawn daemons. - Zero outbound network traffic: 100% local Rust binary communicating exclusively over local MCP stdio.