Skip to main content
MCP server CX Codex

x402 Wallet — Claude Code MCP server: features and setup

Let an AI agent find x402 services, check prices, and pay for calls in USDC from a Solana wallet. Set a wallet key to enable payments.

Install into Claude Code · Platform CLI All methods and platforms ↓
claude mcp add --env SOLANA_SECRET_KEY=<SOLANA_SECRET_KEY> --env SOLANA_RPC_URL=<SOLANA_RPC_URL> --env MAX_PAY_USD=<MAX_PAY_USD> --env REQUIRE_CONFIRM=<REQUIRE_CONFIRM> --env THREE_WS_BASE=<THREE_WS_BASE> --transport stdio x402-mcp -- npx -y @three-ws/x402-mcp
Open on GitHub

What x402 Wallet does

x402 Wallet gives an agent tools to search the x402 service directory, inspect an endpoint’s payment terms, and call a paid service. Named tools cover tasks such as weather forecasts, research and book searches, news, transit, and places. The server can also show wallet balances and payment totals.

Payments require SOLANA_SECRET_KEY; service discovery and endpoint inspection do not. The server settles only Solana exact-scheme payments and checks the price before funds move. It rejects amounts above MAX_PAY_USD, which defaults to $1. With REQUIRE_CONFIRM enabled, a payment call also needs confirm: true. Your key signs the payment.

For Claude Code, add the server with npx -y @three-ws/x402-mcp. You can configure SOLANA_RPC_URL, a spending cap, and confirmation requirements. Setup commands are also provided for Codex and other supported editors.

What it helps with

  • search the x402 directory for paid HTTP and MCP services
  • inspect an endpoint’s price before paying
  • call a service and settle its fee in USDC
  • check a wallet balance and review payment totals

Example prompts for the agent

  • Find x402 services that can search academic papers.
  • Inspect this endpoint’s payment terms without paying.
  • Call the weather forecast service and return its result.

How to install x402 Wallet

Platform CLI

claude mcp add --env SOLANA_SECRET_KEY=<SOLANA_SECRET_KEY> --env SOLANA_RPC_URL=<SOLANA_RPC_URL> --env MAX_PAY_USD=<MAX_PAY_USD> --env REQUIRE_CONFIRM=<REQUIRE_CONFIRM> --env THREE_WS_BASE=<THREE_WS_BASE> --transport stdio x402-mcp -- npx -y @three-ws/x402-mcp

Replace <…> with your own values

Step by step, with commands for each platform: How to add an MCP server to Claude Code, Codex, Cursor, VS Code, Gemini CLI and more

Questions about x402 Wallet

How do I install x402 Wallet in Claude Code?

Run claude mcp add x402-mcp -e SOLANA_SECRET_KEY=<SOLANA_SECRET_KEY> -- npx -y @three-ws/x402-mcp. A second setup command adds SOLANA_RPC_URL, MAX_PAY_USD, REQUIRE_CONFIRM, and THREE_WS_BASE as environment values.

What does x402 Wallet do?

It lets an agent discover paid x402 services, inspect payment requirements, and make USDC payments for service calls. The server also includes tools for selected services and payment reporting.

Can I search services without a Solana key?

Yes. find_services and inspect_endpoint work without a key. pay_and_call uses SOLANA_SECRET_KEY, unless you use the session_token settlement mode.

Similar MCP servers

All MCP servers for Agent setup: memory, context, orchestration →

From the same set43

x402 Universal Payer An MCP server that settles x402 payments for your agent: it signs, retries and returns the response with a settlement receipt, under spending caps. CX Codex +1 ★ 249repo stars three.ws Vision Examines images, extracts screenshot text, and generates captions through visual models. Runs over stdio without billing or API credentials. CX Codex +1 ★ 249repo stars three.ws Vanity Inspect the Solana vanity-address market from an AI agent: estimate a pattern’s difficulty and USDC bounty, rate an address, and browse listings. Handy for market research without leaving your coding assistant. CX Codex +1 ★ 249repo stars three.ws Tutor Reads the itemized tab of a Pay-As-You-Learn tutoring session and seals it with an attested invoice. Neither call costs the learner anything. CX Codex +1 ★ 249repo stars three.ws Avatars Brings interactive 3D models into chat windows and generates iframe embed snippets. Works out of the box with zero API keys required for public assets. CX Codex +1 ★ 249repo stars $THREE Token This MCP server lets an agent check $THREE prices and wallet balances, then burn tokens on Solana. Burning requires tokens in the wallet and a confirmed call. CX Codex +1 ★ 249repo stars three.ws Solana Memo Media Pulls images embedded in Solana SPL Memo instructions and hands them to your assistant inline. Useful when you have a transaction signature instead of a file. CX Codex +1 ★ 249repo stars three.ws Signals Connects AI agents to copy-trade feeds and verified on-chain publisher rankings. Useful when automating trade monitoring or mirror-trading. CX Codex +1 ★ 249repo stars

Project sponsors

Companies that keep this analytics open
Gold sponsor

Impressions, clicks and code copies — open statistics. We keep the numbers public for the same reason NeBlask itself is public. Become a sponsor