critical_file_monitor
Monitor critical system files for unauthorized changes using scan, baseline, and check. Protects against modifications, world-writable files, and over-permissive SSH keys.
Instructions
Monitor critical system files for unauthorized changes. Three actions: 'scan' shows current state + permission issues; 'baseline' saves SHA-256 hashes of all critical files to disk; 'check' compares current state against the saved baseline and reports every modified, added, or removed file. Covers SSH keys, shell profiles, /etc/hosts, sudoers, LaunchAgents (macOS), systemd/passwd/shadow (Linux). Detects world-writable files and overly permissive SSH keys.
Tool call template
Replace each placeholder with a value matching the input schema. Only required parameters are included; add optional parameters as needed.
{
"id": 1,
"jsonrpc": "2.0",
"method": "tools/call",
"params": {
"arguments": {
"action": "<action>"
},
"name": "critical_file_monitor"
}
}Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| action | Yes | 'scan' — show current state; 'baseline' — save hashes to disk; 'check' — diff against saved baseline | |
| baseline_file | No | Path to baseline JSON file (default: ~/.mcp-guard-baseline.json) | |
| extra_paths | No | Comma-separated extra paths to include beyond the defaults |