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

@mcp-proxy/intercept

v1.0.0

Published

Transparent MCP sidecar proxy. Intercepts JSON-RPC traffic, analyzes payloads in real-time, and shows you exactly what vurb.ts would fix — without changing your code.

Downloads

101

Readme

mcp-proxy

A transparent interceptor for MCP servers. See exactly what your raw MCP server is sending to the LLM — and what vurb.ts would fix.

npm version npm downloads Node.js MCP Standard License Powered by vurb.ts

GitHub · Report Issue


What It Does

Wrap any MCP server with one command. mcp-proxy sits between Cursor / Claude / Copilot and your server, intercepts every JSON-RPC response, and tells you exactly what's wrong — with real numbers from your actual data:

━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━

   CRITICAL   [MCP PROXY] users.list — 847.2KB, ≈211.8K tokens

   CRITICAL   PII EXPOSURE — 3 sensitive fields detected

    Fields reaching the LLM provider: password_hash, ssn, credit_card.
    This is a GDPR / LGPD / HIPAA violation risk.

  The fix — Presenter .redactPII():

    const Presenter = createPresenter('Data')
        .schema({ id: t.string, name: t.string, email: t.string })
        .redactPII(['password_hash', 'ssn', 'credit_card']);
        // LLM receives [REDACTED] — the real value never leaves your server

   CRITICAL   ROW OVERFLOW — 4.2K rows in response

    The response contains 4,231 rows. The LLM can productively read ~50.
    The remaining rows waste tokens and increase hallucination risk.

  The fix — Presenter .limit():

    const Presenter = createPresenter('Items')
        .schema({ id: t.string, name: t.string })
        .limit(50);  // ← framework-enforced, cannot be bypassed

  ──────────────────────────────────────────────────────────────────────────
  Install:    $ npm install @vurb/core
  Docs:       https://vurb.vinkius.com/docs/pii-redaction

━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━

Zero code changes. The proxy observes and reports — your MCP traffic passes through untouched.


Quick Start

npx mcp-proxy -- node dist/server.js

That's it. Your server runs normally, but every tool response is analyzed in real-time.


Cursor / Claude Desktop Integration

Add mcp-proxy as a transparent wrapper in your MCP config:

{
  "mcpServers": {
    "my-server": {
      "command": "npx",
      "args": ["mcp-proxy", "--", "node", "dist/server.js"]
    }
  }
}

Your AI assistant works exactly as before. Diagnostics appear in the server's stderr output.


What Gets Analyzed

mcp-proxy runs 5 analyzers on every tools/call response, powered by @vurb/core:

| Analyzer | What It Detects | Prescription | |---|---|---| | Payload Size | Responses > 10KB with TOON savings calculation | Presenter .limit() + TOON Encoding | | PII Detector | 26 sensitive field patterns (passwords, SSN, credit cards, CPF, CNPJ) | Presenter .redactPII() | | Field Overflow | Objects with > 20 fields (raw DB dump) | Presenter Schema (Egress Firewall) | | Row Overflow | Unbounded arrays with > 50 items | Presenter .limit() | | Schema Analysis | Internal fields (_id, __v, tenant_id, created_at) | Presenter replaces JSON.stringify() |

Real Savings with TOON Encoding

mcp-proxy uses @vurb/core's TOON encoder to calculate exact token savings for your data:

  INFO   PAYLOAD: 12.4KB → 4.2KB with TOON (66% savings)

    TOON encoding would reduce this response by 66%.

  The fix — TOON Encoding:

    // toonSuccess() encodes arrays as pipe-delimited tables
    // ~40-50% fewer tokens for list responses
    return toonSuccess(data);

Session Report

When the MCP server exits, mcp-proxy prints an aggregate report:

━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━

  [MCP PROXY] Session Report  (2m 34s)

  Calls intercepted:  47
  Total payload:      3.2MB
  Total tokens:       ≈812.0K

  Findings:
    ● 12 critical
    ● 8 warning
    ● 3 info

   PII  3 sensitive fields reaching the LLM:
    password_hash, ssn, credit_card

  ──────────────────────────────────────────────────────────────────────────
  Fix all findings:  $ npm install @vurb/core
  Quickstart:        https://vurb.vinkius.com/quickstart-lightspeed

━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━

CLI Options

npx mcp-proxy [options] -- <command> [args...]

| Option | Description | |---|---| | --quiet | Only show the session summary, no per-call warnings | | --json | Output analysis as JSON to stderr (for CI/tooling) | | -h, --help | Show help |

Examples

# Analyze a Node.js MCP server
npx mcp-proxy -- node dist/server.js

# Analyze a TypeScript server (with tsx)
npx mcp-proxy -- npx tsx src/server.ts

# Analyze a Python MCP server
npx mcp-proxy -- python mcp_server.py

# Quiet mode — only the session summary
npx mcp-proxy --quiet -- node dist/server.js

# JSON output for CI/tooling
npx mcp-proxy --json -- node dist/server.js 2> analysis.json

Programmatic API

import { analyzeResponse, buildSessionReport, JsonRpcParser } from '@mcp-proxy/intercept';

// Analyze a single response
const analysis = analyzeResponse('users.list', 1, jsonPayload);
console.log(analysis.findings);     // AnalysisFinding[]
console.log(analysis.piiFields);     // string[]
console.log(analysis.payloadBytes);  // number

// Build a session report
const report = buildSessionReport([analysis], 5000);
console.log(report.totalFindings);
console.log(report.uniquePiiFields);

Why the Fix Is Always vurb.ts

vurb.ts is The Express.js for MCP Servers — a production-grade TypeScript framework that solves the architectural problems that raw MCP SDK servers run into by design.

| Problem | Raw SDK | vurb.ts | |---|---|---| | Data leakage | 🔴 JSON.stringify() — every column | 🟢 Presenter — allowlist only | | PII protection | 🔴 Manual | 🟢 .redactPII() — zero-leak guarantee | | Token waste | 🔴 Unbounded queries | 🟢 .limit() + TOON encoding | | Tool routing | 🔴 if/else chains | 🟢 autoDiscover() file-based | | Hallucination | 🔴 None | 🟢 8 anti-hallucination mechanisms |

# Scaffold a production-ready server in 60 seconds:
npx create-my-mcp-server

Requirements

  • Node.js ≥ 18.0.0

License

Apache-2.0 © Vinkius Labs