r/ethdev • u/Plane-Preference6245 • 28d ago
Tutorial I made an MCP server that lets agents pay, with limits the agent can't talk its way around
Purser gives an agent a wallet over MCP, but the spending limits live in a smart contract, not in the prompt. So even a jailbroken agent can't go over them.
Each payment comes back as one of three things: done (with the budget left), waiting for the owner (with a request id), or refused (with a reason the model can act on).
Try it: docker run --rm -it -p 127.0.0.1:8787:8787 ghcr.io/ahmad-codex/purser:demo claude mcp add --transport http purser http://localhost:8787/mcp
then ask Claude to "pay the merchant 0.3 ETH" and watch the approval request show up in the console.
Early, not audited, local/testnet only. MIT: https://github.com/ahmad-codex/purser
Anyone letting agents spend money today? How do you limit it?
2
u/kantorcodes1 28d ago
Does
refusedseparate an exhausted daily budget from a contract validation failure? An agent would need to know whether another attempt is pointless or whether the owner can fix something.2
u/Lushniak_Masjid 28d ago
Yea prompt limits on agent spending are the first thing a jailbreak eats.
1
u/[deleted] 28d ago
[removed] — view removed comment