tpay runs as a Model Context Protocol server, so an agent can pay for APIs and read balances as tools — no shell access required. This is the cleanest way to give an LLM-based agent a wallet.
The MCP tools
tpay mcp exposes the active wallet over stdio with two tools:
Makes an HTTP request from the wallet. If the endpoint responds with
402 Payment Required, tpay settles the payment and retries automatically. The user is asked to approve the payment (Touch ID on macOS) before it is signed. Returns the upstream status, headers, and body, plus a receipt when a payment was made.Parameters: url (required), method, headers, body.Returns the wallet’s balances for known stablecoins and SUI on the given network.Parameters:
network (mainnet or testnet, defaults to mainnet).The agent proposes a payment, but it settles only after you approve it on your device. The model never sees or holds the secret key.
Run with Claude
The fastest path istpay claude, which launches the Claude CLI with the active wallet already wired in as an MCP server. It forwards every Claude flag:
pay tool, pausing for your approval before spending.
tpay claude requires the Claude CLI to be installed and on your PATH.Add to any MCP client
To wire the wallet into another MCP client (Claude Desktop, Cursor, and others), registertpay mcp as a stdio server. The exact file differs per client, but the server entry looks the same:
mcp config
tpay account default <label>.
Run the server directly
You can also start the server yourself — useful for custom agent runtimes that speak MCP over stdio:Next steps
CLI reference
Every command and flag.