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

@henrylabs/x402-mcp

v1.0.2

Published

A Model Context Protocol (MCP) server for Henry Labs' x402 commerce APIs

Readme

Henry Labs x402 MCP Server

A Model Context Protocol (MCP) server that provides AI agents with access to Henry Labs' x402 commerce APIs, including product search, cart management, checkout, and payment processing.

Features

  • Product Discovery: Search products, get details, enrich product data, image search
  • Cart Management: Add items, view cart, delete items
  • Checkout: Single checkout, network token checkout, session-based checkout
  • Order Management: Check order status, list orders, delete orders
  • Wallet: Card collection, stored card management
  • Merchant: Merchant listings, status, shipping information
  • x402 Payment Integration: Built-in support for x402 payment protocol

Installation

Install the package globally via npm:

npm install -g @henrylabs/x402-mcp

Or with your preferred package manager:

# Using pnpm
pnpm install -g @henrylabs/x402-mcp

# Using yarn
yarn global add @henrylabs/x402-mcp

Configuration

This MCP server requires environment variables to be configured through your MCP client's settings.

Required Environment Variables

| Variable | Description | Example | | -------------------- | --------------------------------- | ---------------------------------------------------------------- | | WALLET_PRIVATE_KEY | EVM private key for x402 payments | 0x1234567890abcdef1234567890abcdef1234567890abcdef1234567890ab |

Optional Environment Variables

| Variable | Description | Default | Options | | ----------------- | ---------------------- | --------- | ------------------------- | | RESOURCE_SERVER | API environment to use | sandbox | sandbox or production |

Environment Variable Validation

The server validates all environment variables on startup. If validation fails, you'll see a clear error message:

MCP Client Setup

Cursor

  1. Install the package globally: npm install -g @henrylabs/x402-mcp
  2. Open Cursor Settings → MCP
  3. Add the server configuration to your mcp.json file:

Linux: ~/.config/Cursor/User/globalStorage/mcp.json macOS: ~/Library/Application Support/Cursor/User/globalStorage/mcp.json Windows: %APPDATA%\Cursor\User\globalStorage\mcp.json

{
  "mcpServers": {
    "henry-x402": {
      "command": "henry-mcp",
      "env": {
        "WALLET_PRIVATE_KEY": "0x1234567890abcdef1234567890abcdef1234567890abcdef1234567890ab",
        "RESOURCE_SERVER": "sandbox"
      }
    }
  }
}

Note: Set RESOURCE_SERVER to "production" when ready to use the live API.

  1. Restart Cursor

Claude Code

  1. Install the package globally: npm install -g @henrylabs/x402-mcp
  2. Add to your Claude Code settings (.clauderc or settings file):
{
  "mcpServers": {
    "henry-x402": {
      "command": "henry-mcp",
      "env": {
        "WALLET_PRIVATE_KEY": "0x1234567890abcdef1234567890abcdef1234567890abcdef1234567890ab",
        "RESOURCE_SERVER": "sandbox"
      }
    }
  }
}

Note: Set RESOURCE_SERVER to "production" when ready to use the live API.

  1. Restart Claude Code

Other MCP Clients

  1. Install the package globally: npm install -g @henrylabs/x402-mcp
  2. Configure your MCP client with:
  • Command: henry-mcp
  • Environment Variables:
    • WALLET_PRIVATE_KEY (required): Your EVM private key (66 characters starting with 0x)
    • RESOURCE_SERVER (optional): Either sandbox (default) or production

Refer to your client's documentation for specific configuration steps.

Available Tools

| Tool | Description | Method | | ------------------------------- | -------------------------- | ------ | | search-product | Search products by query | POST | | product-detail | Get product details | GET | | enrich-product | Enrich product data | POST | | enrich-by-id | Enrich product by ID | GET | | variant-check | Check product variants | POST | | variant-check-by-id | Check variants by ID | GET | | image-search | Search by image | POST | | add-to-cart | Add item to cart | POST | | cart-checkout | Checkout cart | POST | | delete-cart-items | Delete all cart items | DELETE | | delete-cart-item | Delete single cart item | DELETE | | session-quote | Get checkout session quote | POST | | session-confirm | Confirm checkout session | POST | | single-checkout | Single item checkout | POST | | single-network-token-checkout | Network token checkout | POST | | order-status | Check order status | GET | | order-delete | Delete order | DELETE | | initiate-card-collect | Initiate card collection | POST | | collect-cards | Collect cards | POST | | card-delete | Delete stored card | DELETE | | merchants-list | List merchants | GET | | merchant-status | Check merchant status | GET | | merchant-shipping-info | Get merchant shipping info | GET | | get-order-list | Get order list | GET | | get-cart-items | Get cart items | GET | | get-stored-cards | Get stored cards | GET |

Local Development

For contributors or local development:

# Clone the repository
git clone https://github.com/henrylabs/x402-mcp.git
cd x402-mcp

# Install dependencies
npm install

# Run in development mode
bun run dev

# Or run directly
bun run start

# Build the package
npm run build

Dependencies

  • @modelcontextprotocol/sdk - MCP server SDK
  • @x402/axios - x402 payment integration for Axios
  • @x402/evm - EVM scheme for x402
  • viem - Ethereum utilities
  • zod - Schema validation

License

MIT