Summary
x402_get_payment_info is described as a no-payment inspection tool, but it currently calls this.httpService.get(url) without overriding the default balance-check behavior. When a target returns a supported 402, HttpX402Service.get() defaults checkBalance to true, initializes FireblocksService, and requires FIREBLOCKS_API_KEY plus FIREBLOCKS_PRIVATE_KEY_PATH before it can return the payment preview.
That makes a read-only preview path depend on Fireblocks credentials even though no payment is being made.
Source path
In src/mcp-server.ts:
private async handleX402GetPaymentInfo(args: { url: string }) {
const { url } = args;
const response = await this.httpService.get(url);
In src/HttpX402Service.ts, get() defaults to balance checking:
const checkBalance = opts.checkBalance ?? true;
if (checkBalance) {
this.fireblocksService = new FireblocksService();
await this.fireblocksService.initialize(initChainId);
}
Impact
A user who only wants to inspect a merchant's 402 requirements from MCP can hit FIREBLOCKS_API_KEY not set in .env / private-key setup errors instead of seeing the amount/network/asset/payTo preview. This is especially surprising because the MCP tool description says it checks payment requirements without completing payment.
Suggested fix
Have x402_get_payment_info call the service in preview mode, for example:
const response = await this.httpService.get(url, {
checkBalance: false,
selection: "manual",
});
Optionally include a note in the returned preview that balance was not checked. x402_get_and_pay can keep check_balance=true as the default because that path may actually sign.
Verification
I ran a local build from a fresh clone of main:
Result: build passed. I did not use Fireblocks credentials, payment headers, wallets, private endpoints, or paid x402 calls.
Summary
x402_get_payment_infois described as a no-payment inspection tool, but it currently callsthis.httpService.get(url)without overriding the default balance-check behavior. When a target returns a supported402,HttpX402Service.get()defaultscheckBalancetotrue, initializesFireblocksService, and requiresFIREBLOCKS_API_KEYplusFIREBLOCKS_PRIVATE_KEY_PATHbefore it can return the payment preview.That makes a read-only preview path depend on Fireblocks credentials even though no payment is being made.
Source path
In
src/mcp-server.ts:In
src/HttpX402Service.ts,get()defaults to balance checking:Impact
A user who only wants to inspect a merchant's
402requirements from MCP can hitFIREBLOCKS_API_KEY not set in .env/ private-key setup errors instead of seeing the amount/network/asset/payTo preview. This is especially surprising because the MCP tool description says it checks payment requirements without completing payment.Suggested fix
Have
x402_get_payment_infocall the service in preview mode, for example:Optionally include a note in the returned preview that balance was not checked.
x402_get_and_paycan keepcheck_balance=trueas the default because that path may actually sign.Verification
I ran a local build from a fresh clone of
main:Result: build passed. I did not use Fireblocks credentials, payment headers, wallets, private endpoints, or paid x402 calls.