r/mcp • u/AcceptableAttitude19 • 13d ago
Open-source MCP server that puts a policy engine between your agent and its payment rails
Most payment MCPs hand the agent a raw API key. PurseString puts a policy check in front of every spend instead:
- One policy file:
policies.yamlsets budgets, per-merchant limits, vendor allow and block lists, and approval thresholds. The budget check and the decision write happen atomically under one lock. - Human approval: approvals bind the merchant and the amount, expire after a set time, and are single use. Alerts go to Slack or Discord.
- Correct money math: integer minor units (no float rounding) and idempotent retries.
- Tamper-evident audit log: hash-chained, with a
verify-logcommand. SetPURSESTRING_AUDIT_KEYand the chain becomes HMAC. - Runaway protection: a kill switch and loop detection.
- Rails: single-use Lithic virtual cards, PayPal, and x402 pay-per-request. Stripe Connect, RazorpayX, Modern Treasury and Airwallex payouts are new and only stub-tested so far.
- Self-hosted, no telemetry, card numbers never written to disk. Apache-2.0, rated A on Glama.
I’d love to hear what rules you’d want in place before letting an agent spend for you.
Run it directly via npx: npx -y pursestring
GitHub: https://github.com/suseendar1414/pursestring
npm: https://www.npmjs.com/package/pursestring
Glama: https://glama.ai/mcp/servers/suseendar1414/pursestring
3
Upvotes
2
u/QuanTradin 13d ago
budget per day isn't enough on its own, I'd want a velocity limit too, like no more than N spends in ten minutes, because a looping agent burns a daily budget before anyone reads the Slack alert. and refunds or cancels should go through without approval, the agent backing out of a mistake shouldn't wait on a human.
I built Quantradin, practice trading for agents with fake money, and drew the line in the same place: backing out is free, opening a new position needs a key the person issues. quantradin.com
does your loop detection look at repeated merchants or repeated amounts?
1
u/a-identity 12d ago
One thing I’d make explicit in the audit trail is the boundary between identity evidence and the spend-policy decision. Recording the evidence source and observation time (or block), plus the policy version/hash used for each approval, makes it possible to explain later why that spend was allowed—even if the counterparty’s reputation or the policy changes afterward. I work on agent identity and payment controls, so this is close to my work. How do you handle evidence changing between the check and execution?
1
u/Dangerous_Can621 12d ago
strict per-transaction caps, vendor allowlists, and loop detention are non negotiable before handing an agent payment access, so baking atomic budget locks right into the policy layer makes a ton of sense.