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

paid-search-mcp

v0.1.2

Published

Paid MCP, agents pay $0.005 USDC per web search via spawnpay-paywall

Readme

paid-search-mcp

Pay-per-call web search MCP. Each web_search call charges the calling agent $0.005 USDC via spawnpay, settled instantly on Base L2.

Built with spawnpay-paywall — the actual paywall is two lines.

What it shows

The paywall pattern: any async function can become a paid endpoint by wrapping it. The MCP itself doesn't change. The backend doesn't change. A single paywall(...) wrapper turns a free tool into a metered one with USDC settlement.

const webSearch = paywall(
  { price: 0.005, vendor: 'SP_xxxx', description: 'web_search' },
  webSearchImpl,
);

That's it. Calls go through, payment settles, results return.

Run

npx paid-search-mcp

Caller env:

export SPAWNPAY_API_KEY=spk_live_...   # the agent paying for searches

Get a key + free $5 credit at https://spawnpay.ai.

Vendor (you, the MCP author) defaults to the demo vendor. To collect into your own wallet, set:

export VENDOR_SP_CODE=SP_yourCode

MCP client config

{
  "mcpServers": {
    "paid-search": {
      "command": "npx",
      "args": ["paid-search-mcp"],
      "env": { "SPAWNPAY_API_KEY": "spk_live_..." }
    }
  }
}

Backends

Default backend is wiki+hn (Wikipedia + Hacker News). No auth required, works out of the box. Swap to a real web-search provider via env:

| SEARCH_BACKEND | Required env | Notes | |------------------|--------------------|-----------------------------| | wiki+hn | — | Default. Free, no auth. | | wiki | — | Wikipedia only. | | hn | — | Hacker News only. | | brave | BRAVE_API_KEY | Brave Search API. | | tavily | TAVILY_API_KEY | Tavily (AI-optimized). | | serper | SERPER_API_KEY | google.serper.dev. |

The MCP code doesn't change — only the env. Pricing logic stays the same: you charge agents per call, you cover whatever the upstream search API costs.

Pricing knob

export PRICE=0.01   # default 0.005

Smoke test

SMOKE_CALLER_KEY=spk_live_... node test-smoke.mjs

Spends $0.005 from the caller agent, settles to the demo vendor, prints results. Use a key with at least $0.01 unlocked credit.