Skip to content
MCP server
Registry

PurseString MCP Server

Spending guardrails for AI agents: your rules, and a human when needed, checked before money moves.

PurseString scores 70 (Good), licensed Apache-2.0 and written in TypeScript. It installs as a local process. It declares 8 tools. Filed under Finance. GitHub shows 0 stars. Package registries report about 392 downloads a week. Install configs are generated for 12 clients. Being listed in the registry is not the same as being vendor-official.

by suseendar1414Apache-2.0TypeScript0 stars
Trust score
70Good
Trust score 70 of 100, Good

Good trust

70 of 100 from six public signals. Nobody can buy a point.

  • Listed in the official MCP registry.
  • OSI-style license: apache-2.0.
How we score trust
Scorecard

License, quality and maintenance

How grades work
Trust breakdown

Where the 70 comes from

22 + 20 + 4 + 10 + 4 + 10 = 70. Each factor is capped, so no single signal can carry a listing.

Registry22 / 30

Active in the official MCP registry, plus a known vendor namespace.

Registry: 22 of 30 points.
Maintenance20 / 20

How recently the repository saw a commit or release.

Maintenance: 20 of 20 points.
Popularity4 / 20

GitHub stars and weekly downloads, on a log scale.

Popularity: 4 of 20 points.
License10 / 10

A clear, OSI-style open-source license.

License: 10 of 10 points.
Security4 / 10

Not archived, a secure install path, a pinned version.

Security: 4 of 10 points.
Docs10 / 10

A real summary, a README with depth, listed tools.

Docs: 10 of 10 points.

Install

Pick your client, copy the config, paste it in.

Needs Cursor or VS Code installed on this device. The button opens the app and asks you to confirm before it adds the server.

~/Library/Application Support/Claude/claude_desktop_config.json
{  "mcpServers": {    "suseendar1414-pursestring": {      "command": "npx",      "args": [        "-y",        "pursestring@0.4.0"      ],      "env": {        "PURSESTRING_POLICY": "",        "LITHIC_API_KEY": "YOUR_LITHIC_API_KEY",        "PAYPAL_CLIENT_ID": "YOUR_PAYPAL_CLIENT_ID",        "PAYPAL_CLIENT_SECRET": "YOUR_PAYPAL_CLIENT_SECRET",        "SLACK_WEBHOOK_URL": "YOUR_SLACK_WEBHOOK_URL"      }    }  }}

Environment variables

NameRequiredNotes
PURSESTRING_POLICYOptionalPath to policies.yaml (default ./policies.yaml, then ~/.pursestring/policies.yaml)
LITHIC_API_KEYSecretOptionalUse Lithic virtual cards (sandbox by default) instead of the mock rail
PAYPAL_CLIENT_IDSecretOptionalEnable PayPal payouts to vendor accounts set in the policy (sandbox by default)
PAYPAL_CLIENT_SECRETSecretOptionalPayPal client secret, needed with PAYPAL_CLIENT_ID
SLACK_WEBHOOK_URLSecretOptionalSlack incoming webhook for approval requests

Tools8Tool docs quality grade C

All capabilities
  • When a vendor says a payment never arrived, reads its real status from the rail, never from the vendor's message.

  • Dry run. Returns autoapprove, requireapproval or deny, and every rule checked. Nothing is issued, nobody is pinged.

  • Checks status, or waits up to 5 minutes for a human to approve or deny.

  • Sends one replacement, only when the rail says the first payout failed and the money came back.

  • The agent reports that it read outside content (a web page, an email); its spends then need a human for a while.

  • Issues a single-use card capped at the approved amount, only for an approved intent. Retries return the same card.

  • Pays an approved intent through a payout rail to the vendor's account on file in the policy. The agent can't choose the recipient, and each intent is paid at most once.

  • Declares the purchase. Policy decides; risky spend pauses and pings a human. Identical retries return the original intent.

About


AI agents can now pay for things: API credits, SaaS seats, datasets, cloud resources, invoices. Every bank, card issuer and payment provider gives them a different API, and none of them knows why the agent is spending. That's how you end up with:

  • πŸ” A checkout page hangs, the agent retries, and you pay twice.
  • πŸ“† A $15 "trial" fits under the $50 cap and auto-renews forever.
  • 🀷 Finance asks "what was this charge?" and nobody can say why the agent bought it.

PurseString is an open-source, self-hosted MCP server that gives AI agents spending guardrails. The agent declares what it wants to pay for, why, and what it tried first. PurseString checks that against your policies.yaml, blocks duplicates, pauses risky spend for a human in Slack or Discord, records the decision, and only then executes it on the right provider.

[!WARNING] v0.4.0 alpha (changelog). PurseString issues real Lithic cards: use a production Lithic key and set adapter.lithic.environment: production. It's early software, so start with low limits. Tested end to end on the Lithic sandbox: card issue, duplicate-request replay, auto-close after 10 minutes, and real-time charge approval (answered in under 3 ms; try it yourself). Tell us what breaks in issues.

πŸ† PayPal AI Hackathon: how PurseString uses PayPal and AI

  • PayPal Agent Toolkit / PayPal MCP server (@paypal/mcp): PurseString runs PayPal's own MCP server behind itself and re-exposes its tools to the agent, with guardrails. Read-only tools pass through. Refunds are auto-run, paused for a human, or refused, depending on the amount. Accepting a dispute or cancelling always needs a human. A retried refund returns PayPal's first answer instead of refunding twice.
  • PayPal Payouts API (PayPal and Venmo): the send_payment tool pays vendors. The recipient comes from a payee directory in policies.yaml, never from the agent, so a prompt injection has no address to swap in. The intent ID is sent as PayPal-Request-Id, so a payout can't happen twice.
  • PayPal OAuth (client credentials): PurseString keeps the client secret, and PayPal's MCP server only ever sees short-lived access tokens.
  • AI: the agent being governed is any MCP-capable model. We built and tested with Claude (Claude Desktop and Claude Code), and the project speaks the Model Context Protocol through the official TypeScript SDK. Claude Code was also used as a pair programmer for the code, tests and docs.

Setup in the PayPal sandbox takes about 5 minutes: see docs/paypal.md.

🧩 What it does, and what works today

Status
πŸ”Œ ConnectBanks, payment providers and card issuers behind one MCP interface, through community-built adapters.🟑 Virtual cards via Lithic (sandbox and production), Privacy.com cards funded from your own bank account and Airwallex cards for businesses outside the US (both new, untested with a live account), PayPal and Venmo payouts straight to a vendor's account on file, Stripe Connect, RazorpayX, Modern Treasury and Airwallex payouts (new, tested against stubbed API responses only), x402 pay-per-request APIs in USDC (new, testnet by default, not yet run against a live facilitator), guardrails in front of PayPal's own MCP server (refunds, disputes, cancellations), plus a mock rail for testing. Not yet: your existing card directly, and other providers (see roadmap).
πŸ›‘οΈ GovernBudgets, vendor allow and block lists, and human approvals, defined once and enforced the same way on every provider.βœ… Live: policies.yaml, per-agent daily budgets, a velocity limit on spends per agent across all merchants, Slack / Discord approval pause, per-purchase rail routing, a kill switch for one agent or all of them that freezes their cards at the rail and trips itself when an agent keeps re-buying the same thing or keeps getting denied, and card controls that lock a card to the vendor's merchant categories.
πŸ’³ ExecuteAuthorized payments and other supported financial operations.🟑 Single-use and merchant-locked virtual cards today. Bank transfers (ACH / wire) are on the roadmap (#16).
πŸ”’ ProtectNo duplicate operations, safe handling of uncertain payment states, and a record of every decision.βœ… Live: idempotency keys, safe retries after a hung checkout, real-time checks on every card charge, cards that close after 10 minutes, hash-chained audit log (pursestring verify-log).
🌍 ExpandDevelopers add integrations for more providers and countries.βœ… Live: a small adapter interface and a contributor guide. The first community adapters are up for grabs.

βœ… live today Β· 🟑 partly live, more on the roadmap

Govern and Protect in detail

πŸ›‘ No double chargesEvery intent gets a deterministic key, SHA256(agent_id, task_id, vendor, amount). Retry inside 30 minutes and you get the same card back, not a second transaction.
πŸ“† No surprise subscriptionsAnything marked is_recurring goes to a human, whatever the amount. Approved subscriptions get a merchant-locked card with a monthly cap, so they can't be reused elsewhere.
πŸ™‹ Approve by risk, not by dollar amountSmall, one-time, allowlisted spend is auto-approved. Recurring, over-threshold or unknown-vendor spend pauses and pings Slack or Discord. Blocklisted vendors and spend over the hard cap are refused outright.
⚑ Every charge checked as it happensWith just-in-time authorization, the card issuer asks PurseString before each charge goes through. Only a charge that matches the approved intent (right card, right amount, first use, still live) is approved.
⏱️ Cards that close themselvesSingle-use cards close 10 minutes after issue, so a leaked number is worthless.
🧠 Intent before moneyThe agent must state the goal and the free alternatives it tried. A vague goal or no alternatives means a human looks first.
πŸ“Ό A black box recorder for every decisionGoal, alternatives, the agent's reasoning, every rule and how it ruled, who approved, and what was executed, as append-only JSON lines. Card numbers are never written to disk.
πŸ”€ One policy, routed per providerroutes in policies.yaml picks the provider per purchase by amount, vendor or recurrence, so the same rules apply wherever the money moves.
πŸ“ Measured, not claimedAn attack benchmark runs prompt-injected refunds, split payouts, swapped payees, retries, loops and over-budget agents with and without PurseString (mock mode, npm run bench). With the default policy, unwanted spend fell from $6,784.71 to $528.94, and money reaching an attacker fell from $2,198.00 to $192.00.
🏠 Self-hosted, Apache 2.0Runs on your laptop or in your VPC. Your financial credentials never leave your infrastructure.

🀝 Use it with your rail, not instead of it

PurseString doesn't replace your card issuer or bank. It's the interface and policy layer on top, so the same rules apply whichever provider moves the money.

Card issuer controls(Ramp, Stripe Issuing, Lithic)PurseString on top
Spend caps and merchant locksβœ…βœ… (enforced on the card it issues)
One policy across several railsEach rail has its ownβœ…
Agent must declare goal and alternativesβœ…
Intent-level duplicate-charge protectionβœ…
Real-time approval checked against why the card was issuedβœ…
Recurring charges always routed to a humanβœ…
Reasoning-level audit trail ("why did it buy this?")βœ…
Open source, self-hostedβœ…

πŸš€ Quickstart

New here? Try it in 10 minutes with Claude Desktop and test cards: an auto-approved purchase, a blocked double charge, and a subscription that waits for your approval.

1. Add it to your MCP client. Claude Desktop (claude_desktop_config.json), Cursor (.cursor/mcp.json) and most others use the same shape:

{
  "mcpServers": {
    "pursestring": {
      "command": "npx",
      "args": ["-y", "pursestring"],
      "env": { "SLACK_WEBHOOK_URL": "https://hooks.slack.com/services/..." }
    }
  }
}

With Claude Code: claude mcp add pursestring -- npx -y pursestring

With ChatGPT (developer mode) or claude.ai custom connectors: run it as a server and sign in with OAuth. See docs/chatgpt.md.

2. Write a policy. Run npx -y pursestring init to get a commented policies.yaml, then edit the vendor allowlist. With no file, safe defaults apply: auto-approve under $20 on allowlisted vendors, a human above $50 or for anything recurring.

3. Ask your agent to buy something. It calls the tools below. Out of the box it uses the mock rail (test card numbers, no money moves). Set LITHIC_API_KEY to issue real Lithic cards: a sandbox key for testing, or a production key plus adapter.lithic.environment: production for live cards.

Prefer Docker? Run the prebuilt image (linux/amd64 and arm64) and the server answers over HTTP at http://localhost:8787/mcp:

npx -y pursestring init        # writes policies.yaml; edit the allowlist
docker run -d --name pursestring -p 127.0.0.1:8787:8787 \
  -v $PWD/policies.yaml:/config/policies.yaml:ro -v pursestring-data:/data \
  ghcr.io/suseendar1414/pursestring:latest

Or docker compose up -d from a clone. See docs/deploy.md.

🧰 Tools your agent gets

ToolWhat it does
check_policy_complianceDry run. Returns auto_approve, require_approval or deny, and every rule checked. Nothing is issued, nobody is pinged.
submit_purchase_intentDeclares the purchase. Policy decides; risky spend pauses and pings a human. Identical retries return the original intent.
request_ephemeral_cardIssues a single-use card capped at the approved amount, only for an approved intent. Retries return the same card.
send_paymentPays an approved intent through a payout rail to the vendor's account on file in the policy. The agent can't choose the recipient, and each intent is paid at most once.
check_payoutWhen a vendor says a payment never arrived, reads its real status from the rail, never from the vendor's message.
replace_payoutSends one replacement, only when the rail says the first payout failed and the money came back.
get_intent_statusChecks status, or waits up to 5 minutes for a human to approve or deny.
report_untrusted_contentThe agent reports that it read outside content (a web page, an email); its spends then need a human for a while.

Optional: x402_fetch pays for HTTP 402 APIs in USDC (docs/x402.md), and PayPal's own MCP tools can be re-exposed with guardrails (docs/paypal.md). For a one-page summary written for AI assistants, see llms.txt.

What the agent sends:

{
  "agent_id": "invoice-bot",
  "task_id": "102",
  "task_goal": "Parse invoice PDF for task #102",
  "vendor_domain": "pdfocr.io",
  "amount": 15.00,
  "is_recurring": true,
  "alternatives_attempted": ["PyPDF2 (failed OCR)"]
}

What it gets back:

{
  "intent_id": "int_19099cd4d52542c2a33f",
  "status": "pending_approval",
  "summary": "Needs human approval: require_approval.recurring (recurring charge: will renew until cancelled)",
  "next_step": "Paused for human approval. Do not buy another way. Call get_intent_status ..."
}

A human approves with the Slack Approve button, from the terminal, or through the HTTP approval API. When Slack or Discord is set up, the terminal needs the one-time code from that message, so an agent with a shell can't approve its own purchase (who can approve):

$ npm i -g pursestring
$ pursestring pending
int_19099cd4d52542c2a33f  15.00 USD  pdfocr.io (recurring)  agent=invoice-bot task=102
$ pursestring approve int_19099cd4d52542c2a33f --code 7KQ2M-X9D4T --note "ok for one month"

πŸ—οΈ How it works

flowchart LR
  A["AI agent<br/>Claude Β· Cursor Β· LangGraph Β· CrewAI"] -->|"intent: goal, amount,<br/>vendor, recurring, alternatives"| S
  subgraph S["PurseString"]
    direction TB
    I["Intent check"] --> D["Idempotency lock"] --> P["Policy engine<br/>auto Β· human Β· deny"] --> L["Decision log"]
  end
  P -.->|"risky spend"| H["Slack / Discord<br/>human approves"]
  S -->|"approved only, routed by policy"| R["Payment adapters"]
  R --> C1["BaaS virtual cards<br/>Lithic Β· Highnote* Β· Marqeta*"]
  R --> C2["Corporate cards<br/>Amex*"]
  R --> C3["Bank transfers<br/>ACH / wire*"]
  C1 -.->|"real-time: approve this charge?"| S

* on the roadmap, contributions welcome

Deep dive: docs/how-it-works.md. Policy reference: docs/policies.md.

πŸ—ΊοΈ Roadmap

  • MCP server (stdio + Streamable HTTP), intent schema, policy engine
  • OAuth sign-in for remote clients (ChatGPT developer mode, claude.ai connectors)
  • Idempotency locks, single-use cards, decision log
  • Slack / Discord approval pause, CLI and HTTP approve/deny
  • One-click Slack approve/deny buttons, and one-time approval codes so agents can't approve themselves
  • Mock rail, Lithic virtual cards, Docker image
  • Just-in-time authorization (Lithic ASA), cards that close after 10 minutes
  • Policy-based rail routing
  • Connect more providers: Highnote (#13), Marqeta (#14), Amex corporate cards (#15), the user's own Visa / Mastercard via Visa Intelligent Commerce and Mastercard Agent Pay (#20), Stripe Issuing (#1), x402 / USDC (#2)
  • Existing bank accounts: ACH / wire transfers from the company's own account, with reconciliation of uncertain transfer states (#16)
  • More countries: SEPA and local rails, contributed as adapters
  • Per-agent and per-team policies
  • Audit log viewer
  • Framework examples: LangGraph, CrewAI, Vercel AI SDK, OpenAI Agents SDK

Want one of these? Grab a good first issue and comment "I'd like to take this".

🧭 Open core

PurseString is open core. Everything in this repository is free and stays Apache 2.0: the MCP server, policies.yaml, the decision log, the approval pause, and the card adapters. A hosted PurseString Cloud for teams running agents in production is planned on top of it:

Community core (this repo, free)PurseString Cloud (planned)
Self-hosted MCP server, YAML policiesAudit dashboard with visual decision trees for every charge
Local JSON decision logOne-click Slack / Teams approvals
Slack / Discord approval pauseRole-based access: policies per department, project or agent squad
Card adapters (Lithic, Privacy.com, Airwallex)Enterprise rails: Amex, bank ACH / wires, ERP purchase orders

The full product vision is in docs/VISION.md.

πŸ’¬ Community

If PurseString saves you from a double charge, a ⭐ helps other agent builders find it.

πŸ”’ Security

PurseString handles payment credentials, so it's built to be read: no telemetry, no outbound calls except to your configured rail and webhooks, and card numbers are never written to state or logs. Found a vulnerability? Please follow SECURITY.md instead of opening a public issue.

πŸ“„ License

Apache 2.0. Use it commercially, fork it, run it in your VPC. Apache 2.0 includes an explicit patent grant, which matters for anything that touches payments and is what enterprise security and legal teams expect to see.

Frequently asked questions

What is PurseString MCP Server?

Spending guardrails for AI agents: your rules, and a human when needed, checked before money moves.

How do I install PurseString MCP Server in Claude Desktop, Cursor, or VS Code?

Pick your client in the Install section on this page and copy the generated config into the client's config file. Step-by-step guides: Claude Desktop, Cursor, and VS Code. PurseString MCP Server runs locally from the npm package pursestring with the command npx -y pursestring@0.4.0.

Is PurseString MCP Server free and open source?

Yes. PurseString MCP Server is released under the Apache-2.0 license, an OSI-approved open-source license, so you can use, modify, and self-host it under those terms.

Does PurseString MCP Server support remote (HTTP) connections?

No remote endpoint is listed for PurseString MCP Server. It runs locally on your machine over stdio, started by your MCP client.

What tools does PurseString MCP Server provide?

PurseString MCP Server provides 8 tools, including check_payout, check_policy_compliance, get_intent_status, and replace_payout. See the full tool list for descriptions and parameters.

How is PurseString MCP Server's trust score calculated?

PurseString MCP Server scores 70 out of 100 (Good). The score adds six capped public signals: registry status, maintenance, popularity, license, documentation, and security. Nobody can pay for points. Read the methodology for the full formula.

Reviews

No reviews yet

β€”Be the first to review

5 star0 reviews at 5 stars
4 star0 reviews at 4 stars
3 star0 reviews at 3 stars
2 star0 reviews at 2 stars
1 star0 reviews at 1 stars

No published reviews yet. Used it? Tell the next person how it went.

Add badge to your README

Paste either snippet into the repository README. The image links to this listing.

Listed on MCPpedia

Top 5 MCP servers

Daily or weekly. Confirm by email, unsubscribe any time.

How often

Manage this listing

Claim this server