1. Connect your client
Add a remote MCP server in a client that supports Streamable HTTP. Use this exact endpoint:
https://datoka-agent.bhazarstudio.workers.dev/mcp
The endpoint is a protocol address, not a webpage. Opening it in a browser can return 405; connect through MCP instead. Let the client initialize, list the tools and read their schemas before calling them.
2. Complete the first operation
Compute hashes of your real input and output locally. Call prepare_agent_event to validate the declaration for free. This does not issue a receipt.
Instructions you can give your agent
Connect to Datoka Agent and list its tools. Explain how to prepare_agent_event from locally computed hashes. Do not issue a receipt or authorize payment.
3. Check the price before approval
Signed agent execution declaration: 0.002 USDC
One receipt; preparation and verification are free.
4. Keep and verify your result
Save the event, idempotency key and original payment authorization. Reuse them unchanged to recover a receipt. Verify the receipt against independently obtained public keys.
If something goes wrong
If payment or delivery is uncertain, keep the original request. A signed declaration proves integrity of the declaration, not that the action independently happened.
For HTTP, use the status and structured error body. For MCP, inspect the tool result as well as the transport status. Do not retry a paid operation with a new identifier while the original payment is unresolved.