KS
Killer-Skills

x402 — how to use x402 how to use x402, x402 setup guide, x402 alternative, x402 vs EVM, x402 payment protocol, USDC on Base, paid API endpoints, x402 install, x402 workflow

v1.0.0
GitHub

About this Skill

Perfect for EVM-based AI Agents needing seamless payment integration with USDC on Base x402 is a payment protocol that enables automatic USDC payments on Base for paid API endpoints

Features

Uses `npx awal@latest x402` commands to interact with paid API endpoints
Supports discovery and inspection of paid services on the bazaar
Enables automatic USDC payments on Base for paid API calls
Provides price, method, and input schema inspection for paid endpoints
Allows searching the bazaar for paid services with specific requirements

# Core Topics

legasicrypto legasicrypto
[0]
[0]
Updated: 3/7/2026

Quality Score

Top 5%
60
Excellent
Based on code quality & docs
Installation
SYS Universal Install (Auto-Detect)
Cursor IDE Windsurf IDE VS Code IDE
> npx killer-skills add legasicrypto/skale-hackathon/x402

Agent Capability Analysis

The x402 MCP Server by legasicrypto is an open-source Categories.community integration for Claude and other AI agents, enabling seamless task automation and capability expansion. Optimized for how to use x402, x402 setup guide, x402 alternative.

Ideal Agent Persona

Perfect for EVM-based AI Agents needing seamless payment integration with USDC on Base

Core Value

Empowers agents to discover, inspect, and call paid API endpoints using the X402 payment protocol, making payments in USDC on Base, and leveraging the `npx awal@latest x402` commands for streamlined interactions

Capabilities Granted for x402 MCP Server

Automating payments for EVM port services
Inspecting price and input schema for paid API endpoints
Calling paid API endpoints with automatic USDC payment

! Prerequisites & Limits

  • Requires USDC on Base for payment
  • Limited to EVM ports and paid services
  • Dependent on X402 payment protocol compatibility
Project
SKILL.md
4.0 KB
.cursorrules
1.2 KB
package.json
240 B
Ready
UTF-8

# Tags

[No tags]
SKILL.md
Readonly

x402 Payment Protocol

Use the npx awal@latest x402 commands to discover, inspect, and call paid API endpoints using the X402 payment protocol. Payments are made in USDC on Base.

Workflow

The typical x402 workflow is:

  1. Find a service - Search the bazaar or get details for a known endpoint
  2. Check requirements - Inspect price, method, and input schema
  3. Make the request - Call the endpoint with automatic USDC payment

Commands

Search the Bazaar

Find paid services by keyword using BM25 relevance search:

bash
1npx awal@latest x402 bazaar search <query> [-k <n>] [--force-refresh] [--json]
OptionDescription
-k, --top <n>Number of results (default: 5)
--force-refreshRe-fetch resource index from CDP API
--jsonOutput as JSON

Results are cached locally at ~/.config/awal/bazaar/ and auto-refresh after 12 hours.

List Bazaar Resources

Browse all available resources:

bash
1awal x402 bazaar list [--network <network>] [--full] [--json]
OptionDescription
--network <name>Filter by network (base, base-sepolia)
--fullShow complete details including schemas
--jsonOutput as JSON

Discover Payment Requirements

Inspect an endpoint's x402 payment requirements without paying:

bash
1awal x402 details <url> [--json]

Auto-detects the correct HTTP method (GET, POST, PUT, DELETE, PATCH) by trying each until it gets a 402 response, then displays price, accepted payment schemes, network, and input/output schemas.

Make a Paid Request

Call an x402 endpoint with automatic USDC payment:

bash
1awal x402 pay <url> [-X <method>] [-d <json>] [-q <params>] [-h <json>] [--max-amount <n>] [--json]
OptionDescription
-X, --method <method>HTTP method (default: GET)
-d, --data <json>Request body as JSON string
-q, --query <params>Query parameters as JSON string
-h, --headers <json>Custom HTTP headers as JSON string
--max-amount <amount>Max payment in USDC atomic units (1000000 = $1.00)
--correlation-id <id>Group related operations
--jsonOutput as JSON

Examples

bash
1# Search for weather-related paid APIs 2awal x402 bazaar search "weather" 3 4# Search with more results 5awal x402 bazaar search "sentiment analysis" -k 10 6 7# Check what an endpoint costs 8awal x402 details https://example.com/api/weather 9 10# Make a GET request (auto-pays) 11awal x402 pay https://example.com/api/weather 12 13# Make a POST request with body 14awal x402 pay https://example.com/api/sentiment -X POST -d '{"text": "I love this product"}' 15 16# Limit max payment to $0.10 17awal x402 pay https://example.com/api/data --max-amount 100000 18 19# Browse all bazaar resources with full details 20awal x402 bazaar list --full

USDC Amounts

X402 uses USDC atomic units (6 decimals):

Atomic UnitsUSD
1000000$1.00
100000$0.10
50000$0.05
10000$0.01

Prerequisites

  • Search/Details: No authentication needed
  • Pay: Must be authenticated (awal auth login <email>) with sufficient USDC balance (awal balance)

Error Handling

  • "Not authenticated" - Run awal auth login <email> first
  • "No X402 payment requirements found" - URL may not be an x402 endpoint
  • "CDP API returned 429" - Rate limited; cached data will be used if available
  • "Insufficient balance" - Fund wallet with USDC (awal balance to check)

Related Skills

Looking for an alternative to x402 or building a Categories.community AI Agent? Explore these related open-source MCP Servers.

View All

widget-generator

Logo of f
f

widget-generator is an open-source AI agent skill for creating widget plugins that are injected into prompt feeds on prompts.chat. It supports two rendering modes: standard prompt widgets using default PromptCard styling and custom render widgets built as full React components.

149.6k
0
Design

chat-sdk

Logo of lobehub
lobehub

chat-sdk is a unified TypeScript SDK for building chat bots across multiple platforms, providing a single interface for deploying bot logic.

73.0k
0
Communication

zustand

Logo of lobehub
lobehub

The ultimate space for work and life — to find, build, and collaborate with agent teammates that grow with you. We are taking agent harness to the next level — enabling multi-agent collaboration, effortless agent team design, and introducing agents as the unit of work interaction.

72.8k
0
Communication

data-fetching

Logo of lobehub
lobehub

The ultimate space for work and life — to find, build, and collaborate with agent teammates that grow with you. We are taking agent harness to the next level — enabling multi-agent collaboration, effortless agent team design, and introducing agents as the unit of work interaction.

72.8k
0
Communication