[{"data":1,"prerenderedAt":214},["ShallowReactive",2],{"blog:\u002Fblog\u002Fx402-mcp-payments":3},{"id":4,"title":5,"body":6,"date":201,"description":202,"extension":203,"keywords":204,"meta":205,"navigation":206,"path":207,"readingMinutes":208,"seo":209,"stem":210,"tags":211,"__hash__":213},"blog\u002Fblog\u002Fx402-mcp-payments.md","x402 + MCP: durable payment memory for AI agents",{"type":7,"value":8,"toc":194},"minimark",[9,35,40,70,81,85,93,107,114,118,121,154,161,171,174,178,186],[10,11,12,13,17,18,22,23,26,27,30,31,34],"p",{},"Two standards are quietly converging around autonomous agents. ",[14,15,16],"strong",{},"x402"," gives an agent a way to\n",[19,20,21],"em",{},"pay"," for a resource over HTTP. The ",[14,24,25],{},"Model Context Protocol (MCP)"," gives an agent a standard way\nto reach ",[19,28,29],{},"tools, data, and memory",". Put them together and you get something neither delivers\nalone: an agent that can pay as it works ",[14,32,33],{},"and remember what it spent"," — durable payment memory,\navailable in-loop.",[36,37,39],"h2",{"id":38},"a-quick-refresher-on-each","A quick refresher on each",[41,42,43,61],"ul",{},[44,45,46,52,53,57,58],"li",{},[14,47,48],{},[49,50,16],"a",{"href":51},"\u002Fblog\u002Fwhat-is-x402"," is the payment rail: a server returns ",[54,55,56],"code",{},"402 Payment Required","\nwith a price, the agent pays on-chain, and retries with proof. It answers ",[19,59,60],{},"\"how does the agent\npay?\"",[44,62,63,66,67],{},[14,64,65],{},"MCP"," is the tool and context interface: a standard protocol that lets an agent call external\ntools and pull in context without bespoke integration for each one. It answers ",[19,68,69],{},"\"how does the\nagent reach capabilities and memory?\"",[10,71,72,73,76,77,80],{},"x402 moves the money. MCP is how the agent ",[19,74,75],{},"reasons about"," and ",[19,78,79],{},"reaches"," everything around the\nmoney.",[36,82,84],{"id":83},"the-gap-agents-pay-then-forget","The gap: agents pay, then forget",[10,86,87,88,92],{},"An agent making ",[49,89,91],{"href":90},"\u002Fblog\u002Fhow-ai-agents-pay","agentic payments"," in a loop has a memory problem. Within\na single run it might pay dozens of times; across runs it has no idea what it already spent. That\nleads to predictable failure modes:",[41,94,95,98,101],{},[44,96,97],{},"Paying again for something it already bought this session.",[44,99,100],{},"Blowing past an implicit budget because nothing told it the budget existed.",[44,102,103,104],{},"No way to answer a simple question mid-task: ",[19,105,106],{},"\"have I spent too much on this domain today?\"",[10,108,109,110,113],{},"The payment rail alone can't fix this. Spend memory lives outside the agent, and the agent needs a\n",[19,111,112],{},"standard way to ask for it",". That's precisely the shape of an MCP tool.",[36,115,117],{"id":116},"the-combination-spend-as-an-mcp-tool","The combination: spend as an MCP tool",[10,119,120],{},"Expose spend and budget as MCP tools and the loop closes. An agent gains capabilities like:",[41,122,123,132,145],{},[44,124,125,128,129],{},[54,126,127],{},"get_spend"," — ",[19,130,131],{},"\"how much have I spent today, this session, on this domain?\"",[44,133,134,128,137,140,141,144],{},[54,135,136],{},"check_budget",[19,138,139],{},"\"am I allowed to make this payment?\""," — called ",[14,142,143],{},"before"," paying.",[44,146,147,128,150,153],{},[54,148,149],{},"recent_payments",[19,151,152],{},"\"what did I already pay for here?\""," — so it doesn't double-pay.",[10,155,156,157,160],{},"Now the agent can make a ",[19,158,159],{},"decision"," around a payment instead of firing blindly:",[162,163,169],"pre",{"className":164,"code":166,"language":167,"meta":168},[165],"language-text","1. Agent is about to pay a 402 challenge for premium data.\n2. It calls check_budget via MCP → \"domain X is at 90% of today's cap.\"\n3. It calls recent_payments → \"you fetched this resource 4 minutes ago.\"\n4. Agent skips the payment and reuses the earlier result.\n","text","",[54,170,166],{"__ignoreMap":168},[10,172,173],{},"That's durable payment memory: the spend history isn't a report a human reads after the fact, it's\ncontext the agent itself can query while it works.",[36,175,177],{"id":176},"why-durable-memory-beats-per-run-tracking","Why durable memory beats per-run tracking",[10,179,180,181,185],{},"Per-run counters die when the run ends. Durable, queryable spend memory persists across sessions\nand agents, which is what makes real governance possible — budgets that hold over a day, not just\na loop, and ",[49,182,184],{"href":183},"\u002Fblog\u002Fagent-spend-observability","observability"," that spans your whole fleet. It also\nmeans the same source of truth powers both the human dashboard and the agent's in-loop decisions.",[10,187,188,189,193],{},"402.report pairs non-custodial x402 spend tracking with an MCP server, so your agents can query\ntheir own spend in-loop while you watch the fleet from the outside.\n",[49,190,192],{"href":191},"\u002F#waitlist","Join the waitlist"," for early access.",{"title":168,"searchDepth":195,"depth":195,"links":196},2,[197,198,199,200],{"id":38,"depth":195,"text":39},{"id":83,"depth":195,"text":84},{"id":116,"depth":195,"text":117},{"id":176,"depth":195,"text":177},"2026-06-20","The Model Context Protocol gives agents tools and context; x402 gives them a way to pay. Combine them and an agent can check its budget, pay per request, and query its own spend in-loop — durable payment memory.","md","MCP payments, Model Context Protocol, x402 MCP, agent payment tools, AI agent tools, in-loop spend, agent budget",{},true,"\u002Fblog\u002Fx402-mcp-payments",5,{"title":5,"description":202},"blog\u002Fx402-mcp-payments",[65,16,212],"architecture","5d66TpF45zr92awoq1lbAhPwz6EtdclyO2YFA25k9Qw",1784841653230]