x402-mcp
Server Configuration
Describes the environment variables required to run the server.
| Name | Required | Description | Default |
|---|---|---|---|
| MAX_PAY_USD | No | Maximum payment amount in USD per call. | 1 |
| THREE_WS_BASE | No | Base URL for three.ws API. | https://three.ws |
| SOLANA_RPC_URL | No | Solana mainnet RPC endpoint URL. | https://api.mainnet-beta.solana.com |
| REQUIRE_CONFIRM | No | If 'true', requires explicit confirm=true parameter in pay_and_call. | true |
| SOLANA_SECRET_KEY | No | Base58 secret key of the Solana wallet that holds USDC. Required for pay_and_call and x402_wallet (to see balance) but not for read-only tools. |
Instructions
Guidance the server publishes about itself, which clients place ahead of the tool catalog so the model reads it before choosing anything.
x402 buyer MCP — give the agent a self-custodial wallet that can pay for anything on the x402 network. find_services searches the live bazaar (PayAI + Coinbase CDP). inspect_endpoint reads any endpoint's price/requirements WITHOUT paying. x402_wallet shows the signer wallet's address and SOL/USDC balance. pay_and_call is an EXECUTION ACTION: it pays an x402 endpoint in USDC from your Solana key (SOLANA_SECRET_KEY or a per-call secret) and returns the result, bounded by MAX_PAY_USD and gated by REQUIRE_CONFIRM. Settlement is the Solana exact scheme via the real @x402 libraries — never a wallet you do not control.
Capabilities
Features and capabilities supported by this server
Protocol revision2025-11-25
| Capability | Details |
|---|---|
| tools | {
"listChanged": true
} |
Tools
Functions exposed to the LLM to take actions
| Name | Description |
|---|---|
| x402_walletA | Show a Solana wallet's address and live SOL + USDC balance. With no |
| find_servicesA | Search the live x402 facilitator network (PayAI + Coinbase CDP bazaar) for paid services (HTTP APIs and MCP tools). Returns each match with its price, networks, and resource URL. Use this when a task needs a paid API or tool you do not already have; to use a match, check its price with inspect_endpoint, then pass its resource into pay_and_call. Read-only. |
| inspect_endpointA | Fetch an x402 endpoint and return its 402 payment requirements — every accepted scheme, network, asset, price and pay-to address — WITHOUT paying. If the endpoint is free, returns its result instead. No signer required. Use this to learn the cost before pay_and_call. |
| pay_and_callA | Call a paid x402 endpoint and settle the payment automatically, then return the result. Use this after inspect_endpoint has shown the price and the user has approved paying it; a settled payment cannot be undone. Two modes:
• Self-custodial (default): signs with SOLANA_SECRET_KEY or Pay in USDC (default) or, when the endpoint advertises it, in $THREE (set token:"three"). Bounded by max_usd and the MAX_PAY_USD cap; refuses before any money moves if the price is over the cap. With REQUIRE_CONFIRM on, the call refuses until re-issued with confirm:true. |
Prompts
Interactive templates invoked by user choice
| Name | Description |
|---|---|
No prompts | |
Resources
Contextual data attached and managed by the client
| Name | Description |
|---|---|
No resources | |
TDQS
Scored across 4 tools
Each tool occupies a distinct step in a linear workflow: x402_wallet checks balance, find_services discovers services, inspect_endpoint returns 402 requirements without paying, and pay_and_call settles. Descriptions explicitly cross-reference each other (check price with inspect_endpoint, then pass resource into pay_and_call), so boundaries are clear.
Three tools follow a consistent snake_case verb_noun pattern (find_services, inspect_endpoint, pay_and_call), with x402_wallet as a noun-only exception tied to the protocol. Minor deviation, but still predictable and readable.
Four tools is a well-scoped, minimal set for a payment agent: wallet check, discovery, price inspection, and payment execution. Each tool has a clear role with no redundancy.
The discover→inspect→pay loop is covered, but there's no way to list past payments/settlements, fetch receipts, or check session budget/allowlist status. These are notable gaps for an agent handling money that could hinder auditability.