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

b402-mcp

v0.3.17

Published

Private DeFi MCP server. 12 tools. ZK proofs. Gasless. Every DeFi primitive on Base — privately.

Downloads

1,762

Readme

b402-mcp

Model Context Protocol server for b402 payments and private DeFi.

Works with Claude Desktop, Cursor, Copilot, and other MCP-compatible clients.

5-line quickstart

export WORKER_PRIVATE_KEY=0xYOUR_BASE_KEY
export SEQUENCER_URL=https://your-sequencer-url
npx -y [email protected] --help
claude mcp add b402 --scope user -e WORKER_PRIVATE_KEY=$WORKER_PRIVATE_KEY -e SEQUENCER_URL=$SEQUENCER_URL -- npx -y [email protected]
# then ask Claude: "run b402_balance"

Claude Desktop / MCP config snippet

{
  "mcpServers": {
    "b402": {
      "command": "npx",
      "args": ["-y", "[email protected]"],
      "env": {
        "WORKER_PRIVATE_KEY": "0x...",
        "SEQUENCER_URL": "https://your-sequencer-url"
      }
    }
  }
}

Payment tools

| Tool | Description | |------|-------------| | b402_pay | Gasless b402 sequencer payment | | b402_balance | Sequencer credit or wallet/pool balance | | b402_create_invoice | Creates invoice payload + b402://pay URL | | pay_via_b402 | Standard HTTP 402 verify+settle flow with payment signature retry |

Private DeFi tools

| Tool | Description | |------|-------------| | shield_usdc | Move USDC into the Railgun privacy pool | | check_pool_balance | Show wallet + shielded balances and positions | | get_swap_quote | Read-only DEX quote across Base liquidity | | private_swap | Swap in privacy pool with ZK proof | | lend_privately | Lend from pool into Morpho vault | | redeem_privately | Redeem from Morpho vault back to pool | | run_strategy | Multi-step private strategy (swap + lend + reserve) |

Copy-paste E2E prompt

1) Run b402_balance with my agentId.
2) Create an invoice for 0.05 USDC with memo "demo call".
3) Run pay_via_b402 on my paid API URL.
4) Run b402_balance again and summarize the delta.

Network notes

  • pay_via_b402 parses both Base and BNB x402 payment requirements.
  • Automatic funding (fundIncognito) currently uses Base USDC only.
  • Base private DeFi tools (shield_usdc, private_swap, lend_privately, etc.) remain Base-focused.

Environment

| Variable | Required | Description | |----------|----------|-------------| | WORKER_PRIVATE_KEY | Yes | Base wallet private key used by b402 | | SEQUENCER_URL | For b402_pay / credit tools | b402 sequencer endpoint | | BASE_RPC_URL | No | Custom Base RPC URL | | BNB_RPC_URL | No | Optional RPC used when x402 requirement is BNB | | FACILITATOR_URL | No | Custom b402 facilitator URL |

Links