@@ -798,9 +798,12 @@ export class AzethKit {
798798 // Routes x402 payments through PaymentAgreementModule.pay() to capture
799799 // protocol fees on-chain. The module validates the transferWithAuth calldata,
800800 // checks guardian spending limits, executes the payment, and adds the fee.
801+ // Accept serverUrl as a bundler source — the server proxies bundler requests
802+ // via its own Pimlico key, so MCP users don't need AZETH_BUNDLER_URL.
801803 let smartAccountTransfer : SmartAccountTransferCallback | undefined ;
802804 const payModuleAddr = this . addresses . paymentAgreementModule ;
803- if ( smartAccount && this . _bundlerUrl && payModuleAddr ) {
805+ const hasBundler = ! ! ( this . _bundlerUrl || this . serverUrl ) ;
806+ if ( smartAccount && hasBundler && payModuleAddr ) {
804807 smartAccountTransfer = async ( params ) => {
805808 const sac = await this . _getSmartAccountClient ( smartAccount ) ;
806809 const payData = encodeFunctionData ( {
@@ -919,7 +922,8 @@ export class AzethKit {
919922 // Build smartAccountTransfer callback — routes through pay() for fee capture
920923 let smartAccountTransfer : SmartAccountTransferCallback | undefined ;
921924 const payModuleAddr2 = this . addresses . paymentAgreementModule ;
922- if ( smartAccount && this . _bundlerUrl && payModuleAddr2 ) {
925+ const hasBundler2 = ! ! ( this . _bundlerUrl || this . serverUrl ) ;
926+ if ( smartAccount && hasBundler2 && payModuleAddr2 ) {
923927 smartAccountTransfer = async ( params ) => {
924928 const sac = await this . _getSmartAccountClient ( smartAccount ) ;
925929 const payData = encodeFunctionData ( {
0 commit comments