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

@agents402/mcp

v0.2.1

Published

MCP server that lets an AI agent pay for L402 paid actions over Lightning. Includes in-band wallet setup (paste NWC or open browser to create a self-custodial Spark wallet) and decentralized Nostr-based service reputation.

Readme

@agents402/mcp

An MCP server that lets your AI agent pay for L402 paid actions over Lightning, with deterministic spend policy, decentralized reputation, and in-band wallet setup. The reference implementation of the agents402 protocol, by Faregate.

Install

In your MCP client config (e.g. ~/.config/claude/claude_desktop_config.json):

{
  "mcpServers": {
    "faregate": {
      "command": "npx",
      "args": ["-y", "@agents402/mcp"]
    }
  }
}

That's it. No wallet pre-configuration required — the first time the agent hits a paywall, it will ask you how you want to pair a wallet.

What the agent gets

| Tool | Purpose | | --- | --- | | discover | Look up an agents402.json manifest for a domain — what paid actions, what prices, network reputation. | | pay_and_invoke | Pay an L402 challenge and run the action atomically, under your spend policy. | | publish_feedback | Publish a Nostr kind:30402 rating receipt-anchored to the call you just paid for. | | get_reputation | Compute weighted reputation (Σ amount × score / Σ amount) for a service from Nostr. | | spend_summary | Today / week / all-time spend grouped by domain. | | wallet_status | Is a wallet configured? Provider, label, source. | | wallet_setup_nwc | Pair a Nostr-Wallet-Connect URI you already have. | | wallet_setup_browser | Open the user's browser to create a self-custodial Spark wallet (with sponsor faucet). | | wallet_setup_check | Poll the in-progress browser pairing. | | wallet_setup_cancel | Close the localhost listener if the user changes their mind. |

How wallet setup works

When pay_and_invoke is called without a wallet, it returns a structured needs_setup response listing the two paths. The agent presents these to the user and calls one of:

  • wallet_setup_nwc({ nwc_url, label? }) — User pastes a nostr+walletconnect:// URI. The MCP validates it by calling getBalance and saves to ~/.faregate/wallet.json.
  • wallet_setup_browser() — MCP binds a random 127.0.0.1 port, opens the browser to wallet.faregate.org/setup/new?callback=…&state=…, and the page POSTs the new wallet config to the listener once the user finishes the flow. Then wallet_setup_check confirms.

In both cases the user holds the keys. The MCP never transmits the wallet config off-machine.

Spend policy

Read from ~/.faregate/policy.json. Refusals happen in code, not in the model — if a call would breach daily_budget_msats, per_action_max_msats, allowed action types, trusted domains, or network-reputation gates, pay_and_invoke refuses before any payment.

Environment

| Var | Default | Purpose | | --- | --- | --- | | FAREGATE_DATA_DIR | ~/.faregate | Where wallet.json, policy.json, agent.db live. (TOLLGATE_DATA_DIR and ~/.tollgate/ are read as fallbacks for users who set up before the rename.) | | FAREGATE_POLICY_PATH | <data_dir>/policy.json | Override the policy file path. | | AGENTS402_WEB_URL | https://wallet.faregate.org | Web app to open for browser pairing. | | AGENT_NWC_URL | — | Legacy fallback if no wallet.json is present. | | FAREGATE_NOSTR_RELAYS | (built-in set) | Comma-separated relay URLs for reputation publish/fetch. |

Source

github.com/gereonelvers/tollgatemcp/tollgate-mcp.