sprawl mount

Sandboxed Context

Configures allowed directory mounts for sandboxed MCP server access.


📌 1. The Target Problem

1. The Target Problem

"How do I stop my AI assistant from reading files outside my workspace while still granting it secure access to specific shared folders?"

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)

  1. Registers directory paths and keys under allowed_mounts in .agents/sprawl_manifest.yml.
  2. Updates the Claude Desktop/IDE MCP configurations (mcp_config.json).
  3. Validates agent read/write/list queries at the MCP level, returning JSON-RPC block codes if the target is out of bounds.

🩺 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.

🔗 Related Resources & Tutorials