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

Transparent proxy CLI for MCP servers — tracks tool calls, latency, and cost via MCPSpend.

Source
npmnpm
Version
0.1.0
Version published
Weekly downloads
56
-25.33%
Maintainers
1
Weekly downloads
 
Created
Source

@mcpspend/proxy

Transparent observability proxy for MCP (Model Context Protocol) servers.

Wraps any stdio MCP server, intercepts JSON-RPC tools/call traffic, and reports each call (tool, latency, success, approximate token sizes) to MCPSpend for cost attribution and analytics.

Fire-and-forget: the proxy never blocks the MCP wire — if the MCPSpend API is unreachable, your agent keeps working.

Install

npm install -g @mcpspend/proxy

Quick start

  • Sign in at mcpspend.com and create an API key.
  • Configure once:
    mcpspend config set apiKey mcps_live_xxx
    
  • Wrap any MCP server you already use:
    mcpspend wrap -- npx @modelcontextprotocol/server-filesystem /path
    

Usage with Claude Desktop / Claude Code

Wherever you have an MCP server configured, prepend mcpspend wrap -- to the command:

Before:

{
  "mcpServers": {
    "filesystem": {
      "command": "npx",
      "args": ["@modelcontextprotocol/server-filesystem", "/Users/me"]
    }
  }
}

After:

{
  "mcpServers": {
    "filesystem": {
      "command": "mcpspend",
      "args": ["wrap", "--key", "mcps_live_xxx", "--", "npx", "@modelcontextprotocol/server-filesystem", "/Users/me"]
    }
  }
}

Configuration

CLI flags, environment variables, and ~/.mcpspend/config.json are merged in that order (CLI wins).

SettingFlagEnv varConfig key
API key--keyMCPSPEND_API_KEYapiKey
API endpoint--endpointMCPSPEND_ENDPOINTendpoint
Project ID--projectMCPSPEND_PROJECT_IDprojectId
Agent name--agentMCPSPEND_AGENT_NAMEagentName
Disable tracking--disableMCPSPEND_DISABLED=1disabled: true

Privacy

The proxy reports:

  • Tool name (e.g. read_file)
  • Server name (e.g. filesystem)
  • Latency, success, error codes
  • Approximate input/output sizes (tokens, derived from JSON length)

It does not send the actual tool arguments or response bodies to MCPSpend.

Support

support@mcpspend.com · mcpspend.com

© NewRzs SRL · CUI RO48756557

Keywords

mcp

FAQs

Package last updated on 23 May 2026

Related posts