# 402-LAB

> 402-LAB is an open-source MCP server for finance and payments. Budget-capped x402 buyer that lets an agent find and pay for API calls in USDC. It runs locally on your machine and is started by your AI client.

- **Kind:** MCP server
- **Pricing:** Open source
- **Platforms:** macOS, Windows, Linux, CLI
- **Website:** https://handsel-mandate-demo.vercel.app
- **Repository:** https://github.com/kairose-master/handsel-mandate
- **MCP Registry name:** io.github.Kairose-master/402-lab
- **Categories:** finance and payments
- **Listing updated:** 2026-11-17

## About

402-LAB is the buyer half of an open-source experiment in agent commerce built around the x402 payment protocol. You give your assistant a spending allowance in plain words, such as staying within one dollar. The agent then looks for a paid API in the x402 Bazaar or in seller catalogue files, reads the price quoted in the HTTP 402 response, and pays in USDC only if the amount fits.

The server itself enforces the ceiling, the per-call limit, the network and the seller allow-list, so the agent cannot widen its own authority. It runs locally over stdio and needs a wallet private key, which the registry entry says should hold only small amounts. It defaults to Base Sepolia, with Base mainnet as an option.

The project's own demo seller offers a Korean business-registration status lookup at 0.02 USDC per call. The README says settlements so far are two from internal wallets and promises no buyer traffic or revenue.

## Features

- **Plain-language budget:** Takes a spending allowance stated in words and turns it into enforced limits.
- **Bazaar discovery:** Searches the x402 Bazaar and configured seller product.json files for matching APIs.
- **Pre-payment checks:** Checks per-call limit, remaining budget and seller policy before signing.
- **Server-enforced caps:** Applies the maximum, per-call limit, network and seller allow-list on the server side.
- **Free price check:** Quotes the price from the 402 response before any wallet signature.
- **Seller tooling:** The repository also includes a seller payment gate and a local Seller Studio draft.

## Good for

- Let an agent buy a paid API call within a fixed budget
- Test x402 payments on Base Sepolia without real funds
- Try a pay-per-call Korean business registration lookup
- Prototype pay-per-call selling for a vibe-coded API

## Install

### Claude Code (Terminal)

```sh
claude mcp add 402-lab --env BUYER_PRIVATE_KEY='<BUYER_PRIVATE_KEY>' -- npx -y https://github.com/Kairose-master/handsel-mandate/releases/download/mcp-v0.1.0/402-lab.mcpb
```

### Claude Desktop (claude_desktop_config.json)

```json
{
  "mcpServers": {
    "402-lab": {
      "command": "npx",
      "args": [
        "-y",
        "https://github.com/Kairose-master/handsel-mandate/releases/download/mcp-v0.1.0/402-lab.mcpb"
      ],
      "env": {
        "BUYER_PRIVATE_KEY": "<BUYER_PRIVATE_KEY>"
      }
    }
  }
}
```

### Cursor (~/.cursor/mcp.json)

```json
{
  "mcpServers": {
    "402-lab": {
      "command": "npx",
      "args": [
        "-y",
        "https://github.com/Kairose-master/handsel-mandate/releases/download/mcp-v0.1.0/402-lab.mcpb"
      ],
      "env": {
        "BUYER_PRIVATE_KEY": "<BUYER_PRIVATE_KEY>"
      }
    }
  }
}
```

### VS Code (.vscode/mcp.json)

```json
{
  "servers": {
    "402-lab": {
      "type": "stdio",
      "command": "npx",
      "args": [
        "-y",
        "https://github.com/Kairose-master/handsel-mandate/releases/download/mcp-v0.1.0/402-lab.mcpb"
      ],
      "env": {
        "BUYER_PRIVATE_KEY": "<BUYER_PRIVATE_KEY>"
      }
    }
  }
}
```

### Windsurf (~/.codeium/windsurf/mcp_config.json)

```json
{
  "mcpServers": {
    "402-lab": {
      "command": "npx",
      "args": [
        "-y",
        "https://github.com/Kairose-master/handsel-mandate/releases/download/mcp-v0.1.0/402-lab.mcpb"
      ],
      "env": {
        "BUYER_PRIVATE_KEY": "<BUYER_PRIVATE_KEY>"
      }
    }
  }
}
```

### Other clients (your client's MCP settings (most use this shape))

```json
{
  "mcpServers": {
    "402-lab": {
      "command": "npx",
      "args": [
        "-y",
        "https://github.com/Kairose-master/handsel-mandate/releases/download/mcp-v0.1.0/402-lab.mcpb"
      ],
      "env": {
        "BUYER_PRIVATE_KEY": "<BUYER_PRIVATE_KEY>"
      }
    }
  }
}
```

## FAQ

### Which networks does it support?

Base Sepolia by default and Base mainnet when configured.

### What does it need to run?

A wallet private key for the paying wallet, kept to small amounts, plus optional limit and catalogue settings.

### Can the agent raise its own spending limit?

No. The README says the agent cannot create its own delegation or widen permissions.

### How is it installed?

Via npx from the GitHub repository, or as an mcpb bundle for Claude Desktop.

### Is 402-LAB free?

Yes. 402-LAB is open source, so you can use and self-host it for free.

### How do I add 402-LAB to Claude Code?

Run this command in your terminal: claude mcp add 402-lab --env BUYER_PRIVATE_KEY='<BUYER_PRIVATE_KEY>' -- npx -y https://github.com/Kairose-master/handsel-mandate/releases/download/mcp-v0.1.0/402-lab.mcpb

### What are the best alternatives to 402-LAB?

The closest alternatives to 402-LAB are Solana MCP by Vybe, Tapetide - Indian Stock Market MCP, Budget Tracker, Quantivex Research and Provyan.

## Alternatives

- [Solana MCP by Vybe](https://ai-powered.com/mcp/solana-mcp-by-vybe): Solana MCP by Vybe is an MCP server for finance and payments.
- [Tapetide - Indian Stock Market MCP](https://ai-powered.com/mcp/tapetide-indian-stock-market-mcp): Tapetide - Indian Stock Market MCP is a freemium MCP server for finance and payments.
- [Budget Tracker](https://ai-powered.com/mcp/budget-tracker-2): Budget Tracker is a freemium MCP server for finance and payments.
- [Quantivex Research](https://ai-powered.com/mcp/quantivex-research): Quantivex Research is a free MCP server for finance and payments.
- [Provyan](https://ai-powered.com/mcp/provyan): Provyan is a free MCP server for finance and payments.
- [TribuJus](https://ai-powered.com/mcp/tribujus): TribuJus is an open-source MCP server for legal and government.
- [L2WS](https://ai-powered.com/mcp/l2ws): L2WS is a paid MCP server for finance and payments.
- [Invoices](https://ai-powered.com/mcp/invoices): Invoices is a paid MCP server for files and documents.

---
Source: https://ai-powered.com/mcp/402-lab
