Dev builds secure Rust filesystem MCP server using cap-std, fixes TOCTOU flaws
Kuba_Z2 · reddit · 2026-09-22
Developer KubaZ2 open-sourced (MIT) agentic-filesystem-mcp, a drop-in Rust replacement for the official Filesystem MCP server, which he found insecure (TOCTOU symlink escapes) and context-hostile (raw binary dumps).
Key design choices:
- cap-std capability-based security confines the LLM to explicitly granted paths, eliminating path traversal and TOCTOU attacks at the OS level
- In-file search reuses ripgrep's battle-tested libraries, skipping binary, hidden and gitignored files
- Supports paginated line-numbered reads, media files, full file CRUD/metadata
- Virtual mounts expose a fake filesystem layout to the LLM while hiding the real structure
More from coding & agent
- Google open-sources ax, an agentic orchestration runtime in Go, gaining 2,300+ stars in a day — google · 2026-09-22
- Univer pitches itself as the Office harness for AI agents, at 15k GitHub stars — dream-num · 2026-09-22
- treg, an 'OpenRouter for agent tools' unifying MCP credentials, trends on GitHub — superdesigndev · 2026-09-22
- Replicating agent self-organization locally — and accidentally, the tragedy of the commons — menhguin · 2026-09-22
- Astorias AI launches budget inference service with Qwen at $0.1/M input tokens — me_broke · 2026-09-22
- Berkeley study: open-source agent harness beats Claude Code and Codex CLI 75% of the time — solyarisoftware · 2026-09-22