
Payagent Mcp
io.github.stevemilton由 GitHub 帳號 stevemilton 發布v4.0.0更新於 Oct 24, 2026
Pay x402 APIs in USDC on Base, Solana, and BNB Chain with spend mandates, receipts, idempotency.
概覽
一個本機 MCP 伺服器,讓 AI 助理在 Base、Solana 和 BNB Chain 上以 USDC 支付 x402 API,支援支出上限、收據和冪等。
- 可以做什麼
- 探索與檢查付費 API:依意圖和預算搜尋目錄,並在不付款的情況下讀取某個 URL 的價格和付款要求。支付 x402 資源:執行請求、402 挑戰、政策驗證、付款和收據的完整流程,並以冪等鍵確保重試安全。查看餘額與歷史:顯示目前身分、入金地址、鏈上 USDC 餘額、額度上限和近期付款。購買付款訊號:取得關於某個 x402 資源是否真正結算並交付的簽章探測證據。管理錢包:在啟用 admin 設定時建立、入金、列出和重新命名代理。
- 適用情境
- 當助理需要呼叫按請求收費的 x402 API,並希望在對話中完成付款時使用,可選擇託管式支出上限或自託管錢包私鑰。適合需要預算上限、收據和安全重試的代理工作流程,而非一次性手動付款。
- 執行需求
- 以 stdio 在本機執行,通常透過 MCP 用戶端設定中的 npx 啟動;啟動時不需要任何環境變數。之後選擇錢包模式:託管模式透過 setup 用電子郵件自助開通帳戶,或設定 PAYAGENT_PRIVATE_KEY 為已入金的 EVM 私鑰以在本機簽章、免註冊。ARISPAY_API_KEY 為選用,設定 PAYAGENT_MCP_PROFILE=admin 會載入錢包管理工具。需要連線至 ArisPay API 和相關區塊鏈的網路。
安裝
在 SourceWeft 中
- 開啟 儀表板中的 Payagent Mcp,將其新增到工作區。
- 為需要使用其工具的對話啟用該服務。
Desktop only,透過 STDIO。 STDIO 服務會啟動本機處理程序,因此需要 SourceWeft 桌面主機。
其他 MCP 客戶端
參照 儲存庫 中的啟動說明。
README
@arispay/payagent-mcp
One coherent USDC payment product for AI agents: call x402-paid APIs, with spend mandates, receipts, and idempotency. Works with Claude Desktop, Cursor, Windsurf, or any MCP client. A thin wrapper around the payagent SDK.
Two ways to hold the wallet:
- Local key (zero signup). Set
PAYAGENT_PRIVATE_KEYto a funded EOA key.paysigns EIP-3009 locally — no ArisPay account, no email. The only guardrail is the wallet balance; use a dedicated low-balance wallet. - Delegated custody (managed, recommended).
setup({ email })self-provisions an account, a CDP-managed wallet, and a spend mandate in one call. ArisPay enforces per-transaction, daily, and monthly limits server-side before signing; no private key ever lives in this process.
Tools
Seven core tools (the default surface):
Wallet administration (create_agent, fund_agent, list_agents, rename_agent) loads only when the host config sets PAYAGENT_MCP_PROFILE=admin.
Every tool declares MCP safety annotations (readOnlyHint, destructiveHint, idempotentHint, openWorldHint); pay and check_payment_signal are the only destructive tools — both spend real money.
Support matrix
Notes:
- All prices are quoted by sellers in the 402 challenge;
payprefers an EVM variant and falls back to Solana when the seller offers no EVM option. - Delegated mandates are integer cents, validated server-side before any signature exists. Local mode has no server-side cap.
- Settlement is a single on-chain
transferWithAuthorization(EIP-3009): it succeeds or reverts atomically. When the seller returnsX-PAYMENT-RESPONSE, the receipt carries the settlement transaction hash. - ArisPay's own facilitator (
facilitator.arispay.app) charges no facilitator fee; sellers may use any facilitator, and their fee/finality policy applies.
Setup
Add the server to your MCP client config. No environment variables are required — pick a wallet mode later, from inside the chat, or set one of the env options below.
Claude Desktop
Edit ~/Library/Application Support/Claude/claude_desktop_config.json:
For the zero-signup mode, add the key to the env block:
Cursor
Same server block in .cursor/mcp.json. Windsurf: same pattern in ~/.codeium/windsurf/mcp_config.json.
Cold start, from nothing
- Zero signup: generate a key with
npx payagent wallet new, put it in the host config asPAYAGENT_PRIVATE_KEY, send USDC on Base to the printed address.balanceshows the deposit address;paypays. - Managed: ask the agent to run
setup({ email: "[email protected]" })— it returns the wallet address and mandate. Fund the wallet with USDC, confirm withbalance, thenpay. Credentials persist to~/.payagent/config.jsonand are shared with thepayagentCLI.
Environment variables (all optional)
Migrating from v3
v4 is a breaking release: the surface collapsed to one x402/USDC product.
Receipts and idempotency
pay requires a caller-chosen idempotencyKey (min 8 chars — use a UUID). Every completed payment writes a machine-readable receipt (amount, asset, network, wallet, settlement tx, remaining mandate) to ~/.payagent/mcp-receipts.json. Re-calling pay with a key that already paid returns the stored receipt and does not pay again — including when the paid request failed mid-flight. history lists receipts in self-custody mode; delegated mode reads the authoritative server feed.
How it works
- The agent calls
paywith a URL and anidempotencyKey; the seller answers HTTP 402 with its price. - With
PAYAGENT_PRIVATE_KEYset,payagentsigns the EIP-3009 authorization locally. Otherwise ArisPay validates the request against the agent's mandate and signs via Coinbase CDP. payagentretries with the signed payment header; the seller's facilitator settles USDC on-chain.- The tool returns the paid response plus a structured receipt.
In delegated mode, no private key lives in this process and payments that breach the mandate are rejected before any on-chain action. In local mode, the key is yours and stays in your process.
Install
Or invoke directly via npx @arispay/payagent-mcp from an MCP client config — no pre-install required. npx buyforme-mcp is the same server under the consumer brand.
Related
- payagent — the SDK + CLI for programmatic use
- facilitator.arispay.app — ArisPay's open x402 facilitator, where paid 402s settle
- x402 protocol — HTTP 402 payment standard
License
MIT
來源:README.md,提交 ba86a72
工具
0版本歷史
1- v4.0.0最新Sep 16, 2026
評分
已滿足適用檢查項的 50%
該評分衡量此收錄條目的完整程度,依據註冊中心條目、端點與公開來源計算得出。它不是對伺服器本身的評價,也不表示伺服器安全或目前可用:可連通性是帶日期的檢查結果,評分也不包含安裝量或使用者評價。
- 近 30 天內可連通25 分
請保持端點能夠回應 MCP 握手;SourceWeft 每 30 天探測一次。
- 已宣告認證方式10 分
請在註冊中心條目中宣告憑證請求標頭,或保持端點能夠回應探測,以便判定其認證方式。
- 已列出工具15 分
請讓伺服器在無憑證時回應 tools/list,或發布可在沙箱中無憑證啟動的軟體包。
- 描述必需15 分
- 圖示10 分
- 文件15 分
- 授權條款10 分