Rust MCP Tool Cuts Next.js Error Tokens by 99.7% While Blocking Credential Leaks
A developer has released an open-source Rust-based tool called Tokenectomy that compresses verbose Next.js and other framework error logs before they are sent to AI coding assistants. The tool reduces a typical 45,820-token error dump to just 118 tokens in under 0.2 milliseconds by stripping irrelevant node_modules stack frames and retaining only the actionable crash location. It also locally redacts secrets such as database passwords and API keys using a deterministic regex pipeline, preventing credentials from reaching cloud-based AI models. Built on the Model Context Protocol (MCP), it integrates with tools like Cursor and Claude Desktop via a pre-built binary distributed through npm, requiring no Rust installation. The tool runs entirely locally over stdio with a memory footprint of 3.45 MB and received a Grade A score from an independent audit by Glama.ai.
This is an AI-generated summary. ShortSingh links to the original source for the complete article.
Discussion (0)
Log in to join the discussion and vote.
Log in