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

@b4bit/b4bit-pay-mcp

v0.1.0

Published

MCP server for B4bit Pay — probe the API, verify webhooks, search docs from any Claude client.

Downloads

122

Readme

@b4bit/b4bit-pay-mcp

MCP server for B4bit Pay. Use from any MCP-compatible client (Claude Desktop, Claude Code, Cursor, VS Code MCP extension) to probe the API, verify webhook signatures, and work with B4bit Pay data without writing HTTP code.

Install

Two ways:

1. Via npx (recommended for end users)

No install step. Just add this to your MCP client config:

{
  "mcpServers": {
    "b4bit-pay": {
      "command": "npx",
      "args": ["-y", "@b4bit/b4bit-pay-mcp"],
      "env": {
        "B4BIT_API_KEY": "<your-device-api-key>"
      }
    }
  }
}

2. Local install

pnpm add -D @b4bit/b4bit-pay-mcp

Then point the client to node_modules/.bin/b4bit-pay-mcp.

Configuration

| Env var | Required | Default | Purpose | |---------|:-:|---------|---------| | B4BIT_API_KEY | ✓ | — | Device API Key (UUID) from pay.b4bit.com/settings/commerce/devices | | B4BIT_BASE_URL | — | https://pos.b4bit.com/api/v1 | Override for staging/local testing |

Tools

Generic

| Tool | Purpose | |------|---------| | probe_endpoint | Arbitrary HTTP against pos.b4bit.com/api/v1/*. Supports dry_run. | | verify_webhook | Validate HMAC-SHA256 of a webhook. Returns diagnostics when invalid. | | list_endpoints | Catalog of the 5 public endpoints. |

Typed (less error-prone for agents)

| Tool | Endpoint | Notes | |------|----------|-------| | list_currencies | GET /currencies | Authoritative source for symbols. | | create_order | POST /orders/ | JSON body. All optional fields. | | get_order | GET /orders/info/{id} | Returns array of 1. | | list_orders | GET /orders/ | Default last 7 days. | | create_device | POST /device/ | Destructive — requires confirm_creation: true. | | map_status | — | Maps NR|PE|AC|IA|CO|CA|EX|OC|FA|DE|CM + safe → merchant state. |

Webhook HMAC test vector

verify_webhook self-validates on the official vector:

  • secret_hex: 02d4b921007cad413e79731dd02b3267cd43a14d150a0ae6a1c651942122bb62
  • nonce: 1645634942
  • body: {"fiat_amount": 100.0, "fiat_currency": "USD", "status": "AC", "crypto_amount": 1.21461894, "unconfirmed_amount": 8.0, "confirmed_amount": 0.0, "currency": "DASH", "identifier": "1040095a-737d-41a2-a2e1-d031d19ec8cd"}
  • Expected signature: 395a6c0294f0896fcc0e5827e926e12308f4fdca5c18da69d3af6879e5c80e2d

When invalid, the tool returns actionable diagnostics (wrong secret encoding, trimmed body, reversed concatenation, etc.).

Dev

pnpm install
pnpm dev        # tsx watch
pnpm build      # tsc -> dist/
pnpm start      # node dist/index.js
pnpm test       # vitest

Docs

Full documentation for the API: https://docs.b4bit.com/pay/api/.

License

MIT — see LICENSE.