🎩 You're Invited:Meet the Socket team at Black Hat in Las Vegas, August 3-6.RSVP
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.

latest
Source
npmnpm
Version
0.7.1
Version published
Maintainers
1
Created
Source

@mcpspend/proxy

One-command observability for MCP (Model Context Protocol) servers.

Detects every MCP client installed on your machine — Claude Desktop, Cursor, Windsurf, VS Code, Claude Code — and transparently wraps each configured server so MCPSpend can attribute tool calls, latency and cost. The proxy never blocks the MCP wire: if our API is unreachable, your agent keeps working.

Zero-friction setup — no install needed

npx @mcpspend/proxy init --key mcps_live_xxx

That single command:

  • Saves your API key to ~/.mcpspend/config.json (mode 0600).
  • Discovers every supported MCP client config on your machine.
  • Rewrites each mcpServers entry to be wrapped by npx -y @mcpspend/proxy wrap -- (so the moment you restart your MCP client, it auto-fetches the proxy if missing).
  • Leaves a .mcpspend.bak backup next to every file it touches.

Prefer a global binary? npm install -g @mcpspend/proxy then use mcpspend init — everything below works the same way.

Restart your clients (Claude Desktop, Cursor, Windsurf, etc.) and head to mcpspend.com — calls start showing up within a minute.

Get an API key at mcpspend.com/dashboard/keys.

Verify

npx @mcpspend/proxy doctor

Reports API key status, endpoint reachability, and for every detected client: how many MCP servers are configured and how many are wrapped.

Undo

npx @mcpspend/proxy init --unwrap

Restores every wrapped entry to its original command + args. The .mcpspend.bak files are left in place for paranoia.

Supported clients

ClientConfig path (detected automatically)
Claude Desktop%APPDATA%\Claude\claude_desktop_config.json · ~/Library/Application Support/Claude/claude_desktop_config.json
Cursor~/.cursor/mcp.json
Windsurf~/.codeium/windsurf/mcp_config.json
VS Code (user)%APPDATA%\Code\User\mcp.json · ~/.config/Code/User/mcp.json
Claude Code~/.claude.json

Manual single-server wrap

If you want to wrap one specific invocation without touching client configs:

npx @mcpspend/proxy wrap --key mcps_live_xxx -- npx @modelcontextprotocol/server-filesystem /data

Or paste this into a client config yourself:

{
  "mcpServers": {
    "filesystem": {
      "command": "npx",
      "args": ["-y", "@mcpspend/proxy", "wrap", "--", "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

The API key is never written into client config files (which often land in dotfile repos). It lives only in ~/.mcpspend/config.json (mode 0600) or MCPSPEND_API_KEY.

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 25 May 2026

Did you know?

Socket

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts