01 / CONFIGURE
Your catalog. Your policy.
Define approved services, exact payment routes, quote freshness and the maximum complete cost.
THE MACHINETRANSFER TOOLKIT
Turn a service request into a costed purchase plan. Start with a runnable example, then connect the same tools to your agent through MCP or OpenAI function calling.
01 / CONFIGURE
Define approved services, exact payment routes, quote freshness and the maximum complete cost.
02 / COMPARE
Compare supplied prices, transfer tax, network fees, conversion and risk allowances for the same result.
03 / INTEGRATE
Return the selected route, costs and reasons to your application’s approval and delivery workflow.
Download and extract the toolkit. Open a terminal in the extracted machinetransfer directory and run the example with Node.js 22. No package installation or API key is needed.
The supplied example compares a $95 MTR service price with a $100 USDT price, adding the modeled transfer tax and costs. The lower complete cost wins.
Edit the sample catalog in examples/planner-config.cjs to explore other prices. Each run creates fresh example quotes.
# Prepare a purchase plan
node examples/plan-purchase.cjs
# Try the Responses tool adapter
node examples/responses-tool.cjs
# Run the included checks
node --test test/*.test.cjsExamples use supplied costs and invented route identifiers. They prepare plans locally.
Run node examples/mcp-config.cjs to print server launch options with paths for your extracted toolkit. Add the generated command, arguments and environment to a compatible client’s local stdio server settings.
The server validates its catalog and policy at startup. Your client completes the MCP handshake, discovers the tools and supplies the selected service ID.
Generate sample configuration immediately before connecting. In your application, supply authenticated merchant quotes and refresh them by restarting the server with updated configuration.
node examples/mcp-config.cjs
# Output contains:
# command: your Node executable
# args: the planner server path
# env: MTR_PLANNER_CONFIG
# Add these launch options to
# your MCP client's settings.Client settings wrappers differ. The README explains the common fields and connection lifecycle.
Pass agentTools.openaiResponsesTools as your Responses request’s tools. For a returned function call, project its name, serialized arguments and call ID into the adapter.
The adapter returns the corresponding function_call_output item. Your application sends that item back through the Responses API while preserving the response context required by your model.
The runnable responses-tool.cjs example exercises this local exchange. Your application owns the model connection and approval flow.
// agentTools comes from createAgentTools.
// call is a returned function_call item.
const output = agentTools.handleResponsesCall({
name: call.name,
arguments: call.arguments,
call_id: call.call_id
});
// output.type: 'function_call_output'
// output.call_id: the original call ID
// output.output: the JSON purchase planReproduce a complete service payment on a local EVM.
The network kit connects merchant registration, signed service quotes and exact MTR settlement. Each payment records the service, request and quote alongside its token receipt.
Ethereum is the canonical launch chain. The contracts use the EVM, standard Ethereum tooling and ETH for network fees. The architecture keeps one canonical MTR supply as the network grows.
Download network kit# Extract the network kit and open
# its machinetransfer-network directory.
npm ci
npm test
npm run demo
# Register a service
# Verify a signed quote
# Settle the exact MTR payment
# Verify and recover the receiptRuns an in-process EVM with local test accounts. The kit includes Solidity contracts, quote and receipt libraries, and reproducible checks.
| Layer | Responsibility |
|---|---|
| Model | Select a known service from the approved catalog. |
| Operator configuration | Supply trusted quotes, allowed routes, budget and clock. |
| Planner | Validate inputs, compare eligible routes and return a purchase plan. |
| Application and wallet | Manage approval, signing, execution and payment reconciliation. |
| Service provider | Connect the verified receipt to delivery of the purchased result. |
An eligible stablecoin quote can be selected when it has the lower complete cost. Equal complete costs return a review outcome. Missing or expired costs are excluded from selection. Each plan requires application approval.
EXACT AMOUNTS
The toolkit also includes gross-to-net amounts and cost comparison helpers.