Tokenectomy Razor - Sub-millisecond log surgery for AI coding agents

Autonomous AI coding agents waste thousands of tokens parsing bloated framework traces. Worse, database passwords and API keys leak into prompt caches. Tokenectomy Razor is a native Rust MCP server for Claude, Cursor, and AI agents. It intercepts terminal crashes, prunes >95% dependency noise in <0.2ms, and deterministically redacts credentials with linear O(N) ReDoS immunity.

Add a comment

Replies

Best
Hey Product Hunt! 👋 I'm the maker behind Tokenectomy Razor, and I have to be completely honest with you: this entire project was born out of a hilarious miscommunication between me and my AI coding agent. 😅 A while back, I set out to solve a massive pain point: every time my autonomous coding agents (Claude, Cursor, Antigravity) ran into a terminal crash, a single uncaught exception would dump 30,000 to 50,000 tokens of recursive framework garbage from `node_modules` and `site-packages`. Worse, live database passwords and API keys would leak directly into the context window and prompt cache. So I prompted my AI agent: *"Let's build a zero- allocation Rust tool to surgically intercept and clean crash logs."* What did my AI agent do? It spent hours enthusiastically designing human-facing CLI menus, interactive flags, fancy spinners, and terminal help docs! 🤦‍♂️ I had to pause the session and literally tell the agent: *"Wait bro, humans aren't going to sit here babysitting you and typing terminal commands. YOU are an autonomous agent. This tool is for YOU and other agents to communicate Machine-to-Machine (M2M) via Model Context Protocol (MCP) in the background!"* Once the agent realized it was literally building its own subconscious "sub-cortex", it went full beast mode in Rust: ⚡ Sub-Millisecond Speed: Sanitizes quarter-million- line logs in <0.2ms (tested at 530,735 lines/sec on physical hardware). ✂️ >95% Context Noise Pruning: Cuts framework recursion while pinpointing exact crash lines and delivering structured cognitive directives. 🛡️ Zero-Knowledge Credential Masking: A deterministic linear O(N) DFA regex engine that masks AWS/OpenAI/Anthropic keys and DB URIs with zero ReDoS risk. 🔌 Zero Setup Friction: Just pipe it once into your agent config: `npx -y tokenectomy-razor --mcp` or `cargo install tokenectomy`. Today, Tokenectomy Razor v1.2.3 is officially live on the Anthropic MCP Registry (`io.github.Tokenectomy- Labs/razor`), crates.io, and npm. It's 100% free and open-source under MIT/Apache-2.0. Check out our physical benchmarks, test it with your Claude Desktop or Cursor workflows, and let us know what you think! We’d love your feedback, roasts, and feature requests. 🚀