6 ms·
Show HN: MCP file tools silently eat your context window.I built one that doesnt
Hi, I am Anthony.
Every token your filesystem tools consume is context the model cannot use for reasoning. Most MCP file servers are O(file size) on every operation: reads return the whole file, edits rewrite the whole file. The context window fills up before the agent gets anything meaningful done, and the problem compounds silently as your files grow.
Chisel makes edits O(diff) and reads O(match). The agent sends a unified diff instead of a full rewrite, and queries with grep or sed instead of reading entire files. On a 500-line file this is nearly two orders of magnitude less context per operation. The savings scale linearly with file size, so the larger your codebase, the more it matters.
The other thing I cared about was security. Path confinement is enforced at the kernel level via cap-std and openat with O_NOFOLLOW, not a userspace prefix check. Shell commands run via direct execve against a fixed compile-time whitelist — no sh -c wrapper, no arbitrary execution. Atomic writes use a tmp-and-rename so a failed patch never corrupts the target file.
It ships as a standalone MCP server, as chisel-core, a plain sync Rust library you can embed in your own MCP server, and as a WASM build for Node.js and Python runtimes, you can bring your own MCP and build on top of it.
Would love feedback, especially from anyone building agents that do heavy file manipulation.
GitHub: https://github.com/ckanthony/Chisel https://github.com/ckanthony/Chisel
- jeremy65431 8mo agonicee gonna give it a try!
- verdverm 8mo agohmmmm https://news.ycombinator.com/threads?id=jeremy65431 https://news.ycombinator.com/threads?id=jeremy65431
- alan200994 8mo agogonna try it together with roocode's contextual engine, excited to see how much faster file-related CRUD can go with this setup!
- ckanthony 8mo agoThat combo should work well. Roocode's contextual engine handles what to work on, Chisel keeps the actual file operations lean. Would love to hear what numbers you get on the context cost side once you've had a chance to run it.
- tommytcchan 8mo agogreat concept! can you show you how much tokens you can save vs. vanilla approach? I think that will be super cool
- ckanthony 8mo agoI just added a comparison video on the GitHub repo that shows exactly that. Check it out at https://github.com/ckanthony/Chisel https://github.com/ckanthony/Chisel and let me know what you think.
- leobg 8mo agoLooks interesting. Any pointers to how to integrate it in GitHub Copilot Chat? It seems to support skills, so I'd guess it should work?