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 🙏

© 2025 – Pkg Stats / Ryan Hefner

@blockia-pay/merchant-demo-mcp

v0.3.11

Published

**Merchant Demo MCP** is a sample Model Context Protocol (MCP) server that simulates a digital storefront (like _Steam_) and integrates with the **Blockia Pay MCP** for crypto-based payments using the **X402 payment standard**.

Readme

🕹️ Merchant Demo MCP

Merchant Demo MCP is a sample Model Context Protocol (MCP) server that simulates a digital storefront (like Steam) and integrates with the Blockia Pay MCP for crypto-based payments using the X402 payment standard.

It exposes endpoints to search for games, view details, and purchase games securely through a decentralized payment flow powered by Blockia.


🚀 Features

  • 🔍 Search games by title, region, or genre
  • 🧾 View game details including price and availability
  • 💳 Purchase games using Blockia Pay payment headers (X402 standard)
  • 🔐 Secure 402 Payment Flow requiring payment authorization headers
  • 📦 Returns license keys, transaction hashes, and receipts after successful purchase

🧩 Architecture Overview

This server is designed to work together with the blockia-pay-mcp server.

| Role | MCP Server | Responsibility | | ----------- | ------------------- | -------------------------------------------------------------- | | 💰 Payments | blockia-pay-mcp | Handles token balance checks and creates valid payment headers | | 🕹️ Merchant | merchant-demo-mcp | Exposes product data and enforces X402 payment requirements |


🧭 End-to-End Payment Flow

1. Search for a Game

search_games('Cyberpunk 2077');

→ Returns a list of matching games.

2. Prepare the Purchase

prepare_purchase('cyberpunk-2077');

→ Returns payment requirements (PaymentRequirements object).

3. Create Payment Headers (via Blockia Pay MCP)

create_payment_header({
  requirement: <PaymentRequirements>,
  x402Version: 1
})

→ Returns x-payment and x-payment-record-id headers.

4. Make the Purchase

make_purchase({
  gameId: 'cyberpunk-2077',
  paymentHeader: '<x-payment>',
  paymentHeaderRecordId: '<x-payment-record-id>',
});

→ Returns:

{
  "licenseKey": "CYBER-XYZ-123-KEY",
  "receiptUrl": "https://merchant.demo/receipts/abc123",
  "transactionHash": "0xabcde12345..."
}

⚙️ Tools Registered

search_games

Searches for games by name, with optional limit and region filters.

get_game_details

Retrieves detailed info about a game by ID.

prepare_purchase

Returns PaymentRequirements for a given game — used to generate a valid X402 payment header.

make_purchase

Completes a purchase using valid payment headers. Returns license key, transaction hash, and receipt URL.


🧩 Installation

npm install @blockia-pay/merchant-demo-mcp
npm run build

🧠 Notes

  • This server does not require a blockchain wallet, but enforces payment via headers.
  • Use together with the Blockia Pay MCP to simulate complete on-chain commerce flows.
  • All data is mock/demo — replace endpoints with your backend to enable real purchases.

📜 License

MIT License © 2025 Blockia Labs