npm package discovery and stats viewer.

Discover Tips

  • General search

    [free text search, go nuts!]

  • Package details

    pkg:[package-name]

  • User packages

    @[username]

Sponsor

Optimize Toolset

I’ve always been into building performant and accessible sites, but lately I’ve been taking it extremely seriously. So much so that I’ve been building a tool to help me optimize and monitor the sites that I build to make sure that I’m making an attempt to offer the best experience to those who visit them. If you’re into performant, accessible and SEO friendly sites, you might like it too! You can check it out at Optimize Toolset.

About

Hi, 👋, I’m Ryan Hefner  and I built this site for me, and you! The goal of this site was to provide an easy way for me to check the stats on my npm packages, both for prioritizing issues and updates, and to give me a little kick in the pants to keep up on stuff.

As I was building it, I realized that I was actually using the tool to build the tool, and figured I might as well put this out there and hopefully others will find it to be a fast and useful way to search and browse npm packages as I have.

If you’re interested in other things I’m working on, follow me on Twitter or check out the open source projects I’ve been publishing on GitHub.

I am also working on a Twitter bot for this site to tweet the most popular, newest, random packages from npm. Please follow that account now and it will start sending out packages soon–ish.

Open Software & Tools

This site wouldn’t be possible without the immense generosity and tireless efforts from the people who make contributions to the world and share their work via open source initiatives. Thank you 🙏

© 2026 – Pkg Stats / Ryan Hefner

tokenectomy-razor

v1.3.3

Published

Cut 95% of useless framework noise and token bloat from error logs before feeding them to AI coding agents

Readme

tokenectomy-razor 🗡️

Autonomous, machine-to-machine (M2M) Model Context Protocol (MCP) server & log surgery engine for AI coding agents (Claude Desktop, Cursor, Cline, Roo Code, Windsurf, and Google Antigravity).

  • Official MCP Registry Name: io.github.Tokenectomy-Labs/razor
  • Glama TDQS Rating: Grade A (100% Schema & Documentation Quality Score)

🚀 Instant Usage with npx

No Rust compiler, no manual build, and zero dependencies required! The package automatically provisions the verified native precompiled Rust binary for your operating system and architecture:

npx -y tokenectomy-razor --mcp

Supported Native Architectures

  • Linux: x86_64 (glibc & musl), aarch64 (ARM64)
  • macOS: Apple Silicon (arm64), Intel (x86_64)
  • Windows: x86_64 (MSVC)

🛠️ Exposed MCP Tools

Tokenectomy Razor equips agents with 5 high-performance tools adhering strictly to MCP JSON-RPC 2.0 specifications:

| Tool Name | Capability Description | |---|---| | get_error_context | Performs deep polyglot trace surgery on error dumps, removes 90%+ framework noise (node_modules, site-packages, .cargo/registry, Spring Boot, Tomcat, Hibernate, ASan, Go idle goroutines), redacts credentials, and extracts local source context bounded to the workspace. | | analyze_code | Performs static AST code analysis to detect resource leaks, unclosed handles, and security vulnerabilities with bounded execution limits and precise LSP UTF-16 coordinates. | | apply_code_patch | Applies atomic file modifications with post-write language syntax verification (cargo check, node --check, py_compile) and automated zero-dirty-diff rollback on validation failure. | | search_stack_overflow | Queries Stack Exchange API for relevant error signatures using sanitized search terms. | | audit_context_health | Proactively audits error logs, prompt payloads, or code snippets for token bloat, framework noise, and credential leaks. Returns actionable M2M telemetry and cost savings metrics. |


🔌 MCP Client Configuration

Claude Desktop

Add to your claude_desktop_config.json:

{
  "mcpServers": {
    "tokenectomy": {
      "command": "npx",
      "args": ["-y", "tokenectomy-razor", "--mcp"]
    }
  }
}

Cursor (.cursor/mcp.json)

Add to .cursor/mcp.json in your workspace root:

{
  "mcpServers": {
    "tokenectomy": {
      "command": "npx",
      "args": ["-y", "tokenectomy-razor", "--mcp"]
    }
  }
}

Google Antigravity CLI

Install directly into your Antigravity agent configuration:

agy mcp add tokenectomy -- npx -y tokenectomy-razor --mcp

Cline / Roo Code / Windsurf / VS Code

Add to your MCP settings (cline_mcp_settings.json or settings.json):

{
  "mcpServers": {
    "tokenectomy": {
      "command": "npx",
      "args": ["-y", "tokenectomy-razor", "--mcp"]
    }
  }
}

⚡ Verifiable Performance Benchmarks

| Metric | Measured Value | Standard / Guarantee | |---|---|---| | Redaction Throughput | 73.3 MB/sec (749,652 lines/sec) | 250,000-line enterprise dump processed in 333 ms | | ReDoS Immunity | 1.44 ms | Linear $O(N)$ evaluation on 50K pathological backtracking patterns | | Concurrent Throughput | 7,312 ops/sec | 100 concurrent OS threads across simultaneous sanitization calls | | Memory Footprint | 76.24 MB VmRSS | Peak resident memory under continuous high-load stress |


📦 Global Install (Optional)

You can also install the binary globally for standalone terminal CLI piping:

npm install -g tokenectomy-razor

# Run standalone CLI
razor --help
tokenectomy-razor --help

# Scrub framework frames and redact credentials via pipe
npm test 2>&1 | razor --scrub > sanitized.log

🗺️ Roadmap & Ecosystem Milestones

  • v1.0.0 - v1.1.0: Core polyglot log surgery, O(N) ReDoS-immune redaction, AI reverse proxy gateway (--proxy).
  • v1.1.3: Multi-architecture Docker images (GHCR) & GitHub Actions Marketplace Action.
  • v1.1.5: Static AST code analysis engine (analyze_code) & Glama.ai TDQS Grade A compliance.
  • v1.1.6: Precompiled standalone native binaries (Linux, macOS Apple Silicon/Intel, Windows).
  • v1.1.7: Canonical Anthropic MCP Registry validation (io.github.Tokenectomy-Labs/razor) & mcpservers.org directory listing.
  • v1.2.0 - v1.2.3: Java/Kotlin (Spring Boot 3), C/C++ backtrace, C# (.NET) & Ruby on Rails, custom rules (~/.tokenectomy.toml), interactive budgeting strategies.
  • v1.3.0: Declarative Advisory M2M Control Plane ([:TOKENECTOMY:M2M_CONTROL_PLANE:v1.3.0]), Anti-Prompt-Injection Architecture, Downstream Liability Disclaimer.
  • v1.3.1: Inline Dropped Frame Identities ([DROPPED_FRAMES: ...]) to prevent silent truncation & content-addressable raw log verification hash.
  • 📋 v1.4.0 (Planned): Native IDE companion extensions (VS Code, JetBrains) & Server-Sent Events (SSE) remote MCP transport.

🔗 Official Links & Resources