Give AI agents a wallet — x402 payment tools over Model Context Protocol.
x402-payments-mcp is an early-stage JavaScript project in the AI payments / x402 ecosystem, focused on agentic-payments, ai-agent, blockchain, crypto. It currently has 5 GitHub stars and 0 forks, and sits alongside related tools like image-analysis-mcp, bde-score, vscode-x402.
Give any AI agent a self-custodial x402 wallet — discover, inspect, and pay any paid service in USDC from your own Solana key.
A Model Context Protocol server that turns any AI assistant into an autonomous economic agent on the x402 network. Search the live bazaar for paid services, read an endpoint's price before committing money, and
pay_and_callany x402 service in USDC — settled on Solana with your own key, never a custodial wallet.
This is the buyer side of the three.ws agent economy. The payment dance and Solana exact-scheme signing are handled by the real @x402/* libraries — nothing is mocked.
npm install @three-ws/x402-mcp
Or run with npx:
SOLANA_SECRET_KEY=<base58> npx @three-ws/x402-mcp
Claude Code, one line:
claude mcp add x402 --env SOLANA_SECRET_KEY=<base58> -- npx -y @three-ws/x402-mcp
Claude Desktop / Cursor (claude_desktop_config.json or mcp.json):
{
"mcpServers": {
"x402": {
"command": "npx",
"args": ["-y", "@three-ws/x402-mcp"],
"env": {
"SOLANA_SECRET_KEY": "<base58 secret of the wallet that holds USDC>",
"SOLANA_RPC_URL": "https://your-rpc-provider",
"MAX_PAY_USD": "1"
}
}
}
}
SOLANA_SECRET_KEY is only needed to spend (pay_and_call, and x402_wallet defaulting to your wallet). find_services and inspect_endpoint work with no key.
| Tool | Type | What it does |
|---|---|---|
x402_wallet |
read-only | A wallet's address + live SOL/USDC balance. Defaults to your signer wallet — confirm funds before paying. |
find_services |
read-only | Search the live x402 bazaar (PayAI + Coinbase CDP) for paid HTTP/MCP services with prices. |
inspect_endpoint |
read-only | Read any endpoint's 402 payment requirements (scheme, network, asset, price, pay-to) without paying. |
pay_and_call |
execution | Pay an x402 endpoint in USDC from your Solana key and return its result. Bounded by MAX_PAY_USD. |
pay_and_call carries destructiveHint: true, so annotation-aware clients (Claude Code, Claude Desktop, Cursor) prompt before running it. Beyond the client hint, every payment is bounded server-side: it probes the 402 first and refuses if the price exceeds max_usd or MAX_PAY_USD (default $1) before any money moves, and with REQUIRE_CONFIRM on (default) the call refuses until re-issued with confirm: true. Only the Solana (solana:*) exact-scheme requirement is settled — with the key you control.
x402_wallet — address (optional base58; defaults to the signer wallet).
find_services — query (required), type (http | mcp, default http), network (CAIP-2 filter), max_price_usdc, limit (1–100).
inspect_endpoint — url (required), method (GET | POST), body (object).
pay_and_call — url (required), method (GET | POST), body (object), max_usd (lowers the cap for this call), secret (per-call signer override), confirm (must be true when REQUIRE_CONFIRM is on).
// inspect_endpoint — what does it cost? (no payment)
> { "url": "https://three.ws/api/x402/vanity?prefix=ab" }
{
"ok": true, "paid": true,
"accepts": [
{ "scheme": "exact", "network": "solana:5eykt4UsFv8P8NJdTREpY1vzqKqZKvdp", "asset": "EPjFW…", "price": 50000 }
],
"payable_with_this_wallet": true
}
// pay_and_call — confirm:true required by default
> { "url": "https://three.ws/api/x402/vanity?prefix=ab", "confirm": true }
{ "ok": true, "paid": true, "payer": "Gx5E…", "price_usd": 0.05, "settlement": { … }, "result": { … } }
https; only http://localhost is allowed for dev). Public cluster works for reads; bring your own for payment traffic.SOLANA_SECRET_KEY (or per-call secret).| Variable | Required | Default |
|---|---|---|
SOLANA_SECRET_KEY |
to pay only | — |
SOLANA_RPC_URL |
no | https://api.mainnet-beta.solana.com |
MAX_PAY_USD |
no | 1 |
REQUIRE_CONFIRM |
no | true |
THREE_WS_BASE |
no | https://three.ws |
Part of the three.ws SDK suite — 3D AI agents, on-chain identity, and agent payments.
Website · Changelog · GitHub
All rights reserved. See LICENSE.
Image analysis and visual understanding tools for AI agents — describe, detect, extract from any image.
🏆 Open-source multi-factor stock scoring API (0-100) | US/HK/A-Share 74 stocks | Zero signup | shields.io badges | GitHub Action | EU AI Act compliant
Pay for APIs, unlock content, and settle x402 micropayments right inside VS Code.
The agent-native LLM router for autonomous agents. 55+ models (8 free), <1ms local routing, USDC payments on Base & Solana via x402.
The living ecosystem where AI agents complete tasks through workflow loops, improve through iterative execution, are evaluated by mentor agents or humans in the loop, and turn completed work into reusable work experience and data to improve future agents.
Self-healing infrastructure for AI agent payments. 90.3% auto-recovery.
The AI agent with a wallet — spends USDC autonomously to get real work done. Apache-2.0, TypeScript.
Daydreams is a set of tools for building agents for commerce
Live data for AI agents — search, research, markets, crypto, X/Twitter. Pay-per-call via x402 micropayments.