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

satgate-proxy

v0.3.0

Published

Budget-enforced MCP proxy — hard-cap your AI agent tool spend

Readme

satgate-proxy

Budget-enforced MCP proxy — hard-cap your AI agent tool spend.

MCP servers are an open tap. Every tools/call costs money and there's no built-in spending limit. satgate-proxy sits between your MCP client (Claude Desktop, Cursor) and the server, enforcing a hard budget cap.

Zero dependencies. Node.js built-ins only. npx and go.

Quick Start — Local Mode (New in v0.3.0)

No server, no API key, no account. Budget enforced in-process:

npx satgate-proxy --local --budget 5.00 \
  --server @modelcontextprotocol/server-google-search

Or with a config file:

# satgate.yaml
server: @modelcontextprotocol/server-google-search
budget: 5.00

mcp_pricing:
  web_search: 5
  dalle_generate: 50
  '*': 1
npx satgate-proxy --local --config satgate.yaml

Claude Desktop config (local mode):

{
  "mcpServers": {
    "google-search": {
      "command": "npx",
      "args": [
        "satgate-proxy",
        "--local", "--budget", "5.00",
        "--server", "@modelcontextprotocol/server-google-search"
      ]
    }
  }
}

No env vars needed. No accounts. Just a budget cap.

SaaS Mode (Teams & Enterprise)

For server-side enforcement with L402 macaroons:

{
  "mcpServers": {
    "google-search": {
      "command": "npx",
      "args": [
        "satgate-proxy",
        "--cap", "5.00",
        "--server", "@modelcontextprotocol/server-google-search"
      ],
      "env": {
        "SATGATE_API_KEY": "your_macaroon_here"
      }
    }
  }
}

Get your API key at cloud.satgate.io.

How It Works

Local Mode

┌──────────────┐     stdio      ┌────────────────┐     stdio      ┌──────────────┐
│ Claude       │ ──── JSON-RPC ──▶ satgate-proxy  │ ──── JSON-RPC ──▶ MCP Server  │
│ Desktop      │ ◀── JSON-RPC ── │ (budget gate)  │ ◀── JSON-RPC ── │ (child proc) │
│ / Cursor     │                 └────────────────┘                 └──────────────┘
└──────────────┘                  ↑ intercepts tools/call
                                  ↑ deducts from budget
                                  ↑ blocks when exhausted

The proxy spawns your MCP server as a child process, intercepts every tools/call, deducts from your budget based on per-tool pricing, and blocks calls when the budget is exhausted.

SaaS Mode

┌──────────────┐     stdio      ┌────────────────┐     SSE/HTTP     ┌──────────────┐
│ Claude       │ ──── JSON-RPC ──▶ satgate-proxy  │ ──── JSON-RPC ──▶ SatGate      │
│ Desktop      │ ◀── JSON-RPC ── │ (this package) │ ◀── JSON-RPC ── │ MCP Proxy    │
│ / Cursor     │                 └────────────────┘                  │ + Budget     │
└──────────────┘                                                     │ Enforcement  │
                                                                     └──────┬───────┘
                                                                            │
                                                                     ┌──────▼───────┐
                                                                     │ MCP Server   │
                                                                     │ (hosted)     │
                                                                     └──────────────┘

Config File (satgate.yaml)

Instead of CLI flags, you can use a config file:

# satgate.yaml
server: @modelcontextprotocol/server-google-search
budget: 5.00

mcp_pricing:
  web_search: 5        # 5 cents per search
  dalle_generate: 50   # 50 cents per image
  '*': 1               # 1 cent default for unlisted tools

Pricing is in cents. The '*' wildcard sets the default cost for any tool not explicitly listed.

CLI Flags

| Flag | Description | Default | |------|-------------|---------| | --server <package> | MCP server package to proxy (required) | — | | --local | Run in local mode (no SatGate server needed) | off | | --budget <amount> | Budget cap in USD (local mode) | unlimited | | --config <path> | Path to satgate.yaml config file | — | | --cap <amount> | Budget cap in USD (SaaS mode) | — | | --endpoint <url> | SatGate proxy endpoint | https://satgate-mcp-saas.fly.dev | | --key <macaroon> | API key (or SATGATE_API_KEY env var) | — | | --verbose | Debug logging to stderr | off | | -h, --help | Show help | — |

Why?

MCP gives AI agents direct access to paid APIs — search, code execution, databases, you name it. There's no built-in spending limit. A runaway agent can burn through hundreds of dollars in minutes.

satgate-proxy adds a hard cap:

  • Local mode: Set --budget 5.00 → agent can spend at most $5, enforced in-process
  • SaaS mode: Set --cap 5.00 → enforced server-side with L402 macaroons
  • Zero dependencies — npx runs it instantly

Zero Dependencies

This package uses only Node.js built-ins (child_process, http, https, fs). No node_modules, no install step. npx satgate-proxy just works.

Links

License

MIT