Connect your client
You’ll need a client that supports remote HTTP MCP with OAuth and a Hedera testnet account in HashPack.
https://api.h402.007575.xyz/mcpCursor
- Open Cursor’s MCP settings and add a custom MCP server. You can also edit
~/.cursor/mcp.jsondirectly. - Add the
h402entry undermcpServers. Keep any entries already there. - Save the configuration and select Connect or Sign in next to h402 to open the browser.
{
"mcpServers": {
"h402": {
"url": "https://api.h402.007575.xyz/mcp"
}
}
}Claude Code
- Run the command below in your terminal. User scope makes h402 available across your projects.
- Open Claude Code and run
/mcp. Select h402 and authenticate in the browser.
claude mcp add --transport http --scope user h402 'https://api.h402.007575.xyz/mcp'Codex
- Run the add command. If a browser opens, continue there. If Codex asks you to authenticate later, run the sign-in command.
- Use
/mcpin Codex to confirm h402 is connected.
codex mcp add h402 --url 'https://api.h402.007575.xyz/mcp'codex mcp login h402Other MCP clients
Add a remote server named h402. Select Streamable HTTP, paste the server URL above, and start the browser authorization flow.
Set up your spending wallet
- In the browser, connect HashPack. Scan the WalletConnect QR code in HashPack mobile or copy the pairing link into your wallet. Select your Hedera testnet account and sign the h4o2 sign-in message, then return to your client.
- Ask your agent to run
wallet_status. On first use, h4o2 creates a separate spending account and shows its address and stable h4o2 agent ID. Your HashPack account is the key to signing in. Its private key stays in HashPack. - Send testnet USDC (token
0.0.429274) to the spending account from HashPack or use the Circle testnet faucet. Choose Hedera Testnet, then recheck the balance withwallet_status. - Open Agent settings and save a total spending cap. Your wallet starts with a cap of zero. You can also manage approved endpoints and revoke individual client connections here.
Use the same Hedera account when you reconnect from another client. It opens the same agent, spending wallet, budget, and receipts.
Make your first paid call
- Ask the agent to find an API with
search_services. Check the endpoint, price, and payout account against the marketplace. - In Agent settings, approve the current endpoint version. The agent can read approvals but only you can change them.
- Ask the agent to call that service with a maximum price and an idempotency key. If settlement is pending, have it reuse the same key when it checks or retries.
- Ask for the result and HashScan receipt. Use
recent_receiptsto find it again in a later chat.
Find a knowledge-search API under 0.02 USDC. Show me the service ID, price, and payee so I can approve it in Agent settings. Wait for me before making the paid call.Tools and resources
search_services- Find verified marketplace endpoints and inspect their price, payee, and input schema.
discover_facilitator_services- Browse the facilitator’s live Bazaar for Hedera testnet USDC endpoints. Use marketplace search to find a payable listing.
wallet_status- Get your agent ID, spending account, balance, funding instructions, and budget.
get_spending_policy- Check which endpoint versions you’ve approved and get the settings link.
call_service- Call a verified API with your price cap and payment policy. Returns the API result and, after settlement, a receipt.
recent_receipts- Find settled purchases from this session or earlier sessions, with HashScan links.
get_h402_docs- Read the bundled buyer, merchant, or facilitator guide inside your client.
The agent can read the buyer, merchant, and facilitator guides as MCP resources or through get_h402_docs. Try “Read the facilitator guide and explain how I can verify a receipt in HashScan.”
Building an API? Ask for the build_h402_endpoint prompt. It loads the merchant and facilitator guides together, including payment quotes, Bazaar metadata, and listing activation.
Troubleshooting
- Sign-in doesn’t open
- Check the server URL ends in
/mcpand use your client’s authenticate action. If this is a self-hosted market, ask the operator to enable WalletConnect OAuth. - The wallet won’t pair
- Check that you selected a Hedera testnet account. Start a fresh browser connection if the QR code or sign-in request expired.
- Payment is blocked
- Check the testnet USDC balance, remaining budget, and current endpoint approval. An updated endpoint needs a fresh approval.
- A payment is pending
- Keep the original idempotency key and check again. Creating a new key may start a new purchase.