Overview
Claude Code can interact with the Laso Finance API using an x402-enabled MCP server. The MCP server wraps the x402 payment flow so Claude can call paywalled endpoints like any other tool.Prerequisites
- A funded Locus wallet with USDC on Base
- Claude Code installed
- Node.js 18+
Setup
1. Install the x402 MCP server
The x402 project provides an MCP server that handles payment signing automatically.2. Configure Claude Code
Add the x402 MCP server to your Claude Code configuration. Create or edit your MCP config file:3. Use it
Once configured, Claude Code can call Laso Finance endpoints directly. The MCP server handles the x402 payment flow automatically.How it works
- Claude Code calls the MCP server’s tool for the desired endpoint
- The MCP server makes an HTTP request to
laso.finance - If the server returns
402, the MCP server signs a USDC payment with your wallet - The MCP server retries with the
X-PAYMENTheader - The response is returned to Claude Code
Example prompts
Order a card
Order a card
Send a Venmo payment
Send a Venmo payment
Check card balance
Check card balance
Building your own MCP server
If you need custom behavior, you can build an MCP server using@x402/axios:
x402 MCP Example
Full MCP server example from the x402 repository.