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-mcp

v0.2.1

Published

MCP wallet for agents: pay HTTP 402 APIs per request in sats with Cashu or Lightning L402. No accounts, no API keys.

Readme

satgate-mcp

An MCP server with a built-in bitcoin wallet, so AI agents can pay for APIs per request.

When an API answers 402 Payment Required, the agent pays it in sats with Cashu ecash or a Lightning L402 invoice and gets the response. No accounts, no API keys, no sign-up.

Install

Add this to your MCP client's configuration (Claude Desktop, Cursor, Claude Code, and others):

{
  "mcpServers": {
    "satgate": {
      "command": "npx",
      "args": ["-y", "satgate-mcp"]
    }
  }
}

Node 22 or newer is required.

Fund the wallet

Ask the agent to call wallet_status. With an empty wallet it returns a top-up link. Open the link, pay the Lightning invoice with any wallet, and the sats arrive in the agent's wallet within a few seconds. To choose the amount, call wallet_status with topup_sats.

You can also paste a Cashu token (cashuA... or cashuB...) and have the agent call wallet_import_cashu. Tokens from a real mint are swapped at the mint on import, so nobody else who saw the token can spend it.

Tools

| Tool | What it does | Cost | | --- | --- | --- | | wallet_status | Balance, plus a Lightning top-up link when the balance is low | free | | wallet_import_cashu | Import a Cashu token | free | | satgate_fetch | Fetch any URL and pay its HTTP 402 within max_sats_budget | the API's price | | scrape_url_to_markdown | Any public web page as clean Markdown | 2 sats | | run_isolated_code | Run JavaScript in an isolated QuickJS VM | 5 sats | | bitcoin_fee_and_utxo_advisor | Live fee rates and the cost to spend or consolidate UTXOs | 1 sat | | discover_paid_apis | List the paid APIs published on Satgate | free |

Every paid call states its price up front and refuses to pay more than the budget you give it.

How payment works

  1. The tool calls the API without payment and gets 402 with a Cashu payment request and an L402 Lightning challenge.
  2. By default it pays with Cashu: it sends exact ecash, splitting proofs at the mint the API advertised when needed, and keeps the change.
  3. With prefer: "l402", or when the API only takes Lightning, the wallet pays the invoice by melting its ecash at the mint and retries with the L402 credential.

Configuration

| Variable | Default | Purpose | | --- | --- | --- | | SATGATE_GATEWAY_URL | https://satgate.dev | Gateway used for top-ups and the built-in API tools | | SATGATE_WALLET_PATH | ~/.satgate/wallet.json | Where the wallet's ecash is stored |

The wallet file holds bearer ecash. Anyone with a copy can spend it, so treat it like cash. If you used the earlier tollgate-mcp package, its wallet at ~/.tollgate/wallet.json is moved to ~/.satgate/wallet.json on first start, and the old file is kept as wallet.json.migrated-to-satgate.

Sell your own API

Put any HTTPS endpoint behind Satgate at satgate.dev/publish, set a price per call, and get paid to your Lightning address.