JSPM

satgate-proxy

0.1.0
  • ESM via JSPM
  • ES Module Entrypoint
  • Export Map
  • Keywords
  • License
  • Repository URL
  • TypeScript Types
  • README
  • Created
  • Published
  • Downloads 9
  • Score
    100M100P100Q39594F
  • License MIT

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

Package Exports

    This package does not declare an exports field, so the exports above have been automatically detected and optimized by JSPM instead. If any package subpath is missing, it is recommended to post an issue to the original package (satgate-proxy) to support the "exports" field. If that is not possible, create a JSPM override to customize the exports field for this package.

    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 via SatGate.

    Quick Start

    Add to your Claude Desktop config (claude_desktop_config.json):

    {
      "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

    ┌──────────────┐     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)     │
                                                                         └──────────────┘
    1. Claude/Cursor launches satgate-proxy as a stdio MCP server
    2. The proxy connects to SatGate's SSE endpoint
    3. JSON-RPC messages from stdin are forwarded to SatGate via HTTP POST
    4. SatGate enforces your budget cap and proxies to the real MCP server
    5. Responses stream back via SSE and are written to stdout
    6. If budget is exceeded → 402 → clean error back to the client

    CLI Flags

    Flag Description Default
    --server <package> MCP server package to proxy (required)
    --cap <amount> Budget cap in USD
    --endpoint <url> SatGate proxy endpoint https://satgate-mcp-saas.fly.dev
    --key <macaroon> API key (or use 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:

    • Set --cap 5.00 → agent can spend at most $5
    • Enforced server-side by SatGate (can't be bypassed by the client)
    • Uses L402 macaroons for cryptographic budget enforcement
    • Zero dependencies — npx runs it instantly

    Zero Dependencies

    This package uses only Node.js built-ins. No node_modules, no install step. npx satgate-proxy just works.

    License

    MIT