three.ws Agent Payments
io.github.nirholasPublished by GitHub account nirholasv0.1.5Updated Nov 1, 2026
Governed x402 payment sessions: pay any endpoint with budget, allowlist & per-tx caps, no key.
The publisher's own server: Payments Ai Mcp
Overview
Governed x402 payment sessions for AI agents: create budgeted, allowlisted sessions and pay paid HTTP endpoints without exposing wallet keys.
- What you can do
- Create, list, inspect and cancel payment sessions funded from three.ws credits, with budget, expiry, per-transaction cap and host allowlist.
- Pay x402 HTTP endpoints through a session token, with the platform wallet signing and policy enforced server-side.
- Review a session's remaining budget, status and recent payments, or list all sessions with aggregate stats.
- Cancel a session to refund unspent budget to credits.
- When to use it
- Use it when an agent needs to call paid x402 APIs and you want spending bounded by a budget, per-transaction ceiling and host allowlist rather than handing over a wallet key. Also useful for auditing or cancelling agent spend after the fact.
- Requirements
- Runs locally via npx (Node.js). A three.ws account with credits is needed to fund sessions. THREE_WS_SESSION (the value of the __Host-sid browser cookie) is required for session management tools; PAYMENT_SESSION_TOKEN (a pss_ bearer token) is the default for pay_with_session. Optional THREE_WS_BASE and THREE_WS_TIMEOUT_MS. Network access to the three.ws API and on-chain settlement.
Installation
In SourceWeft
- Open three.ws Agent Payments in the dashboard and add it to a workspace.
- Enable the server for the chats that should use its tools.
Desktop only via STDIO. STDIO servers start a local process, so they need the SourceWeft desktop host.
Other MCP clients
Follow the launch instructions in the repository.
README
@three-ws/agentcore-payments-mcp
MCP server for three.ws Agent Payment Sessions — govern agent x402 spending without exposing private keys.
Concept
The agent does not hold a wallet. It proposes spend. Governance enforces policy.
A Payment Session is a budget envelope you fund once from your three.ws credits. You hand an agent the session bearer token; the agent calls paid x402 endpoints through this server. The platform's wallet signs every transaction. The session's allowlist, per-transaction ceiling, and total budget are enforced atomically on the server — the agent can never overspend.
Quick start
MCP client config (~/.cursor/mcp.json, Claude Desktop, etc.):
Environment variables
Tools
create_payment_session
Create a new session funded from your credits.
Returns { session, token }. The token is shown once — store it immediately.
pay_with_session
Pay an x402 endpoint using a session token. The platform wallet signs; your session's policy is enforced.
Returns { ok, paid, result, payment, session } with the tx hash, explorer link, and updated budget.
If session_token is omitted, the PAYMENT_SESSION_TOKEN env var is used.
check_payment_session
Inspect a session's budget, status, and recent payments.
list_payment_sessions
List all sessions for the authenticated user, with aggregate stats.
cancel_payment_session
Cancel a session and refund the un-spent budget to your credits.
Network support
Integrating with @three-ws/x402-mcp
The existing pay_and_call tool in @three-ws/x402-mcp now accepts session_token directly:
This routes the payment through /api/pay/execute instead of signing locally — the session's governance policy applies.
Examples
Runnable, no-payment examples live in examples/:
Neither one holds a wallet, reads a credential, or calls pay_with_session, so
nothing is signed and nothing is spent. plan-a-session.mjs is the habit worth
copying: read what an endpoint actually charges before you decide what budget to
authorize. See examples/README.md.
Session lifecycle
Programmatic use
The package entry point exports TOOLS (every tool definition: name, title,
description, inputSchema, annotations, handler) and buildServer(), which returns a
fully-registered McpServer with no transport attached. Importing is side-effect free and needs
no credential, so you can mount these tools inside a host of your own or inspect the surface
offline; a credential is only required when a handler actually runs.
Security properties
- No key exposure: the session token is a time-bounded, HMAC-signed grant. Compromising it lets an attacker spend up to the remaining budget at allowed hosts — nothing more.
- Atomic budget enforcement: concurrent payments use a SQL
UPDATE … WHERE remaining >= amount RETURNING— two simultaneous requests can never collectively overspend. - Allowlist: if
allowed_hostsis set, the governor rejects any request to a host not on the list before signing. - Per-transaction cap:
max_per_tx_usdprevents a single large payment draining the entire budget. - SSRF protection: all x402 target URLs are validated against a public-IP allowlist and DNS-resolved server-side before any payment is signed.
Source: packages/agentcore-payments-mcp/README.md at commit c8f2cde
Tools
0Version history
2- v0.1.5LatestOct 10, 2026
- v0.1.4Sep 16, 2026
Score
50% of the applicable checks met
How complete this listing is, computed from the registry entry, the endpoint and public sources. Not a rating of the server and not a statement that it is safe or working today: reachability is a dated check, and no installs or reviews go into the score.
- Reached in the last 30 days25 pts
Keep the endpoint answering the MCP handshake; SourceWeft probes it every 30 days.
- Auth declared10 pts
Declare the credential headers in the registry entry, or keep the endpoint answering the probe so its auth can be classified.
- Tools listed15 pts
Answer tools/list without a credential, or ship a package that starts in a sandbox without one.
- DescriptionRequired15 pts
- Logo10 pts
- Documentation15 pts
- License10 pts
Other Payments integrations
Payments Ai Mcp
ai.payments.managedOfficial publisher
Remote MCP endpoint from Payments AI, a Merchant of Record, for launching products and branded checkouts for AI-built apps.

Qut Pay (Kaspi QR payments)
kz.qutOfficial publisher
Qut Pay MCP server for Kaspi QR payments in Kazakhstan: create, check, cancel and refund invoices, and simulate sandbox payments.

walletcap for Coinbase payments MCP
Published by GitHub account coriolislabs
Spend-limit guard for Coinbase payments MCP wallets: a per-payment cap and a rolling 24-hour USDC budget shared across processes on one host.

FawryPay cash payments (unofficial)
Published by GitHub account mohamedaly-cloud
Unofficial local MCP server that lets an assistant work with FawryPay Pay-at-Fawry cash payments in Egypt, including optional refund and cancel tools.

Toss Payments
Published by GitHub account groove79
Local MCP server for Toss Payments that lets an assistant look up payments, list transactions and settlements, and cancel or refund with human approval.