x402-commerce-tools

x402-commerce-tools is a skill for Claude Code from nirholas/x402-mcp-commerce. It costs 64 tokens per session (1,152 once invoked), scanned A, original, Apache-2.0.

A tool server that lets an agent search services such as flights, hotels, restaurants, news and domains, then buy items or data using USDC. USDC is a digital dollar token, and x402 is a payment method for HTTP-based services.

In plain words
What is it for?
Use it to search and purchase travel, dining, news, domain or other merchant services through Base or Solana.
Why use it?
It lets the agent pay for services without exposing wallet keys to the model. Spending limits and separate payment wallets help restrict real payments.

Skill for Claude Code

Written for Claude Code: shipped in a Claude Code plugin. Also seen: positional $N argument; mentions Claude Code.

Part of the x402-mcp-commerce plugin — 1 skill shipped together

Good fit Use it to search and purchase travel, dining, news, domain or other merchant services through Base or Solana.

Compare 6 skills from other repositories ↓
Install with agentmods
npx agentmods add skills/nirholas/x402-mcp-commerce/x402-commerce-tools
Install

Getting it into your agent

One page per mod, every tool's command on it. A separate URL per tool would split the same page into five that compete with each other.

Any agent
npx skills add nirholas/x402-mcp-commerce --skill x402-commerce-tools
Clone the repo
git clone --depth 1 https://github.com/nirholas/x402-mcp-commerce

Made for: Claude Code.

Or install x402-mcp-commerce, the plugin that ships this one along with the rest of its 1 skill.

Wrote this? Show the measurements

A badge with what this costs and how it scanned, read live from this page, so it follows the numbers instead of freezing them. Markdown for a README, HTML for a documentation site or a project page.

agentmods badge for x402-commerce-tools

README.md
[![agentmods](https://agentmods.dev/badge/skills/nirholas/x402-mcp-commerce/x402-commerce-tools/github.svg)](https://agentmods.dev/skills/nirholas/x402-mcp-commerce/x402-commerce-tools)
Your own site
<a href="https://agentmods.dev/skills/nirholas/x402-mcp-commerce/x402-commerce-tools"><img src="https://agentmods.dev/badge/skills/nirholas/x402-mcp-commerce/x402-commerce-tools/github.svg" alt="Measured on agentmods" height="20"></a>

Or the 80×15 button, for a site that already has a row of RSS and ATOM ones. Only the verdict fits; the numbers stay here.

agentmods 80×15 button for x402-commerce-tools

Your own site · 80×15
<a href="https://agentmods.dev/skills/nirholas/x402-mcp-commerce/x402-commerce-tools"><img src="https://agentmods.dev/badge/skills/nirholas/x402-mcp-commerce/x402-commerce-tools.svg" alt="Reviewed on agentmods" width="80" height="20"></a>
Per session 64 Skills are progressive disclosure: only the name and description are preloaded; the body loads when the skill is used.
When invoked 1,152 The whole file, excluding the scripts and references it only reads on demand.
Security scan A 0 findings. A grade says what 26 rules found in the file — not that it is safe.
Origin original No closer match found in the catalogue.
Token cost

What it costs to keep this loaded

Counted locally with the o200k_base tokenizer, which is exact for GPT models; Claude uses its own tokenizer and its counts differ. Treat this as one consistent yardstick across the catalogue rather than a bill. Prices are per million input tokens.

ModelPer sessionOnce invoked
Fable 5.1 $0.00064 $0.01152
Opus 5.5 $0.00026 $0.00461
Sonnet 5.5 $0.00013 $0.00230
Haiku 4.5 $0.00006 $0.00115

Measured today against content hash a332ff9794f6, method: parsed. Prices are Anthropic first-party input rates as of 2026-10-07, from the pricing page.

Security

Grade A, and why

x402-commerce-tools scanned grade A with 0 findings against 26 rules in 11 categories — prompt injection, anti-refusal, data exfiltration, privilege escalation, supply chain, agent snooping, system-prompt leakage, SSRF and excessive agency — measured today.

A static scan of the body, not an audit. Every finding is printed with the line that produced it so you can judge whether it matters here. A mod is markdown that instructs an agent; that is exactly why what it instructs is worth reading.

Nothing flagged

None of the 26 patterns this scan looks for appear in this file: no shell pipes, no recursive deletes, no credential paths, no hidden text, no instruction-override or anti-refusal phrasing, no agent-config snooping. That is not a guarantee, it is the absence of the things that are checkable.

plugins/x402-mcp-commerce/skills/x402-commerce-tools/SKILL.md · 61 lines

How it starts

The opening of the file, as written. The whole thing — 61 lines — stays where its author put it; the contents beside it link to each section on GitHub.

x402-mcp-commerce

An MCP server (stdio) that turns x402 merchant routes into tools. Calling a tool pays the upstream merchant in USDC over HTTP 402 and returns the merchant's artifact plus the payment receipt. Keys and spending caps live in the server environment, so the model never sees a key.

Launch

The plugin's .mcp.json runs npx -y @nirholas/x402-mcp-commerce (bin x402-mcp-commerce, entry dist/mcp.js). From a clone instead: npm install && npm run mcp.

Export these in the shell you start Claude Code from. The server inherits that environment, and the plugin's .mcp.json deliberately lists no keys, so no key is ever written to a config file:

  • SOLANA_PRIVATE_KEY: base58 or JSON-array secret key, enables the USDC-on-Solana rail. Without it, Solana payments fail with SOLANA_PAYMENT_FAILED.
  • PRIVATE_KEY: EVM key, enables the USDC-on-Base rail. Without it, calls on that rail fail with NO_WALLET.
  • Optional: SOLANA_RPC_URL, SOLANA_DEVNET_RPC_URL, X402_TIMEOUT_MS (default 20000).

Use throwaway, low-balance wallets. Every payment is real USDC on the configured network.

Upstreams

config/tools.json ships with baseUrls of the form http://localhost:40NN. Point each at a live deployment with X402_UPSTREAM_<UPSTREAM> (upper-snake-case, for example X402_UPSTREAM_X402_TABLEBOOK=https://...), or use another registry file with X402_TOOLS_CONFIG=/path/to/tools.json. The repo also ships config/tools.sandbox.json for rehearsal against x402-agent-sandbox.

Tools

Free built-ins (no payment):

  • list_commerce_tools: every tool with upstream, route, price, rail and which rails you hold keys for.
  • spending_report: caps, spend so far, remaining budget, full payment ledger.
  • discover_service with {baseUrl}: reads any service's /.well-known/x402 manifest.

Paid commerce tools (price is the registry hint; the upstream 402 is authoritative): search_flights ($0.005), price_flight ($0.003), find_tables ($0.001), book_table ($0.01), search_hotels ($0.005), check_weather ($0.001), browse_catalog (free), buy_item (per item), search_places ($0.002), search_news ($0.003), check_domain ($0.001), track_confirmation ($0.005). Call list_commerce_tools for the exact input fields of each.

Read the full file on GitHub · 61 lines

Changes

What this file has done since we first saw it

Hashed on every crawl. A supply-chain change to an agent config is a question of when, not whether, so the history is kept rather than the latest state alone.

  1. today First seen · 61 lines · 64 tokens per session scan A a332ff9794f6

Subscribe to this mod's changes

x402-commerce-tools is a skill published in the GitHub repository nirholas/x402-mcp-commerce (8 stars, last pushed today), licensed Apache-2.0. It adds 64 tokens to every session and 1,152 once invoked, about $0.0003 per session on Opus 5.5. A static security scan graded it A with 0 findings. No closer match exists in the catalogue, so it is treated as the original; first seen 2026-11-11.

Related

x402-commerce-tools compared with skills from other repositories

x402-commerce-tools next to 6 skills from other repositories
ModTypeStarsLast pushLicenceScanTokensWorks with
x402-commerce-toolsnirholas/x402-mcp-commerceSkill8todayApache-2.0A64Claude Code
scvd-personal-shopperseancrecord/scvd-general-store-repoSkill3yesterdayMITA73Claude Code
corbits-marketplacemoonpay/skillsSkill11222d agoMITA76Claude Code, Codex
agoragentic-transaction-assurancerhein1/agoragentic-integrationsSkill4121d agoMITA65Cursor
agoragentic-assurerhein1/agoragentic-integrationsSkill4121d agoMITA50Cursor
scvd-general-storeseancrecord/scvd-general-store-repoSkill3yesterdayMITA79Claude Code
agoragentic-sellrhein1/agoragentic-integrationsSkill4121d agoMITA44Cursor