sprawl mount
📌 1. The Target Problem
AI agents run with full host filesystem permissions and can exfiltrate SSH keys or database secrets. Blocking filesystem access entirely prevents models from reading legitimate shared dependencies, APIs, or documentation templates on disk.
⚙️ 2. Usage & Options
sprawl mount <add|remove|list>
Options & Flags
add <path> --alias NAME: Mounts a path to the given alias prefix.remove <alias>: Deregisters a path mount.list: Displays all configured directory mounts.
🔍 3. How it Works (Under the Hood)
- Registers directory paths and keys under
allowed_mountsin.agents/sprawl-config.json. - Automatically synchronizes workspace boundary permissions into
AGENTS.mdand passes--mount <alias>=<path>arguments tosprawl-workspace-fsinmcp_config.json. - Validates agent read/write/list queries at the MCP server level, enabling safe
@<alias>/access while blocking out-of-bounds traversal with JSON-RPC error codes.
🩺 4. Troubleshooting
- Agent fails to find files in mount directory
- Resolution: Ensure the agent is instructed to use the
@<alias>/path syntax (e.g.@shared-lib/utils.py) to access mounted files.