Sign In

@mcpspend/proxy

Package Overview
Dependencies
Maintainers
1
Versions
14
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@mcpspend/proxy - npm Package Compare versions

Comparing version
0.1.4
to
0.1.5
+9
-7
dist/proxy.js
"use strict";
var __importDefault = (this && this.__importDefault) || function (mod) {
return (mod && mod.__esModule) ? mod : { "default": mod };
};
Object.defineProperty(exports, "__esModule", { value: true });
exports.runProxy = runProxy;
const node_child_process_1 = require("node:child_process");
const cross_spawn_1 = __importDefault(require("cross-spawn"));
const node_crypto_1 = require("node:crypto");

@@ -46,10 +49,8 @@ const ingest_js_1 = require("./ingest.js");

}
// On Windows, Node's spawn() can't find `.cmd`/`.bat` shims (npx, etc.)
// without going through cmd.exe. Use shell: true to let the OS resolve the
// command — same path most Node-based CLIs take.
const isWindows = process.platform === 'win32';
const child = (0, node_child_process_1.spawn)(command, args, {
// cross-spawn handles Windows .cmd/.bat resolution and argument quoting
// properly, avoiding both spawn ENOENT (no shell) and backslash mangling
// (shell: true). See https://github.com/moxystudio/node-cross-spawn.
const child = (0, cross_spawn_1.default)(command, args, {
stdio: ['pipe', 'pipe', 'inherit'],
env: process.env,
shell: isWindows,
});

@@ -127,2 +128,3 @@ const pending = new Map();

}
// stdio: ['pipe', 'pipe', 'inherit'] guarantees stdin/stdout exist
pipeWithInspect(process.stdin, child.stdin, handleClientMessage);

@@ -129,0 +131,0 @@ pipeWithInspect(child.stdout, process.stdout, handleServerMessage);

{
"name": "@mcpspend/proxy",
"version": "0.1.4",
"version": "0.1.5",
"description": "Transparent proxy CLI for MCP servers — tracks tool calls, latency, and cost via MCPSpend.",

@@ -32,2 +32,5 @@ "license": "MIT",

},
"dependencies": {
"cross-spawn": "^7.0.6"
},
"scripts": {

@@ -40,2 +43,3 @@ "build": "tsc",

"devDependencies": {
"@types/cross-spawn": "^6.0.6",
"@types/node": "^22.10.10",

@@ -42,0 +46,0 @@ "tsx": "^4.19.2",