New:Microsoft Teams Notifications Are Now Available in Socket.Learn more →
Get Started

tokenectomy-razor

Package Overview
Dependencies
Maintainers
1
Versions
13
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

tokenectomy-razor

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

latest
Source
npmnpm
Version
1.3.3
Version published
Weekly downloads
126
-87.23%
Maintainers
1
Weekly downloads
 
Created
Source

tokenectomy-razor 🗡️

Listed on mcpservers.org Official MCP Registry Tokenectomy Razor on Glama.ai npm version crates.io version MIT License

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 NameCapability Description
get_error_contextPerforms 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_codePerforms 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_patchApplies 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_overflowQueries Stack Exchange API for relevant error signatures using sanitized search terms.
audit_context_healthProactively 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

MetricMeasured ValueStandard / Guarantee
Redaction Throughput73.3 MB/sec (749,652 lines/sec)250,000-line enterprise dump processed in 333 ms
ReDoS Immunity1.44 msLinear $O(N)$ evaluation on 50K pathological backtracking patterns
Concurrent Throughput7,312 ops/sec100 concurrent OS threads across simultaneous sanitization calls
Memory Footprint76.24 MB VmRSSPeak 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.

Keywords

mcp

FAQs

Package last updated on 18 Sep 2026

Related posts